@iqual/nuxt-icms 1.6.1 → 1.6.2-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +86 -0
- package/__tests__/anchors.spec.ts +43 -0
- package/__tests__/contract/blokkliComponents.spec.ts +59 -0
- package/__tests__/contract/componentFragments.spec.ts +24 -0
- package/__tests__/contract/languages.spec.ts +63 -0
- package/__tests__/contract/project.ts +144 -0
- package/__tests__/hreflang.spec.ts +39 -0
- package/{tests → __tests__}/pages.spec.ts +14 -5
- package/app.config.ts +15 -0
- package/app.vue +3 -21
- package/assets/css/backend.css +56 -0
- package/assets/css/base/base.css +2 -2
- package/assets/css/base/typography.css +2 -2
- package/assets/css/ckeditor.css +3 -4
- package/assets/css/components/decorations.css +1 -1
- package/assets/css/components/editor.css +1 -1
- package/assets/css/components/grid-container.css +19 -19
- package/assets/css/fe-fixes.css +6 -12
- package/assets/css/theme/colors/color-primary.css +33 -11
- package/assets/css/theme/colors/color-secondary.css +33 -11
- package/assets/css/utilities/utilities.css +1 -1
- package/assets/symbols/anchor.svg +3 -0
- package/blokkli.editAdapter.ts +56 -0
- package/bundles.ts +6 -6
- package/cache/__tests__/pageCache.spec.ts +540 -0
- package/cache/cacheTagRegistry.ts +124 -0
- package/cache/enabledForRequest.ts +21 -0
- package/cache/multiCache.serverOptions.ts +58 -0
- package/cache/pageCache.ts +360 -0
- package/components/Blokkli/Anchor/icon.svg +3 -0
- package/components/Blokkli/Anchor/index.vue +13 -0
- package/components/Blokkli/AnchorNavigation/icon.svg +8 -0
- package/components/Blokkli/AnchorNavigation/index.vue +9 -0
- package/components/Blokkli/Card/Element/index.vue +0 -1
- package/components/Blokkli/Collapsible/Element/index.vue +5 -0
- package/components/Blokkli/FAQ/Element/index.vue +0 -1
- package/components/Blokkli/Fragment/Separator/icon.svg +4 -0
- package/components/Blokkli/Fragment/Separator/index.vue +87 -0
- package/components/Blokkli/Gallery/index.vue +1 -3
- package/components/Blokkli/IconText/Element/index.vue +0 -1
- package/components/Blokkli/Introduction/index.vue +0 -1
- package/components/Blokkli/Listing/icon.svg +9 -0
- package/components/Blokkli/Listing/index.vue +24 -0
- package/components/Blokkli/Logo/Element/index.vue +0 -1
- package/components/Blokkli/Table/index.vue +0 -1
- package/components/Blokkli/Team/Element/index.vue +0 -1
- package/components/Blokkli/Team/Layout/index.vue +0 -1
- package/components/Blokkli/Testimonial/Element/index.vue +0 -1
- package/components/Blokkli/Text/index.vue +0 -1
- package/components/DesignSystem/Atoms/Button.vue +3 -0
- package/components/DesignSystem/Atoms/GridRow.vue +3 -1
- package/components/DesignSystem/Molecules/ButtonGroup.vue +5 -4
- package/components/DesignSystem/Molecules/IconText.vue +6 -6
- package/components/DesignSystem/Molecules/MediaLightbox.vue +8 -8
- package/components/DesignSystem/Molecules/MediaSlider.vue +9 -11
- package/components/DesignSystem/Molecules/Partnership.vue +7 -4
- package/components/DesignSystem/Molecules/Table.vue +35 -19
- package/components/DesignSystem/Molecules/TitleComposition.vue +46 -15
- package/components/DesignSystem/Molecules/iFrame.vue +2 -2
- package/components/DesignSystem/Organisms/CallToAction.vue +8 -7
- package/components/DesignSystem/Organisms/CallToActionFeature.vue +8 -7
- package/components/DesignSystem/Organisms/CallToActionFullwidth.vue +9 -8
- package/components/DesignSystem/Organisms/ContentBlock.vue +26 -16
- package/components/DesignSystem/Organisms/FacetedListing.vue +38 -17
- package/components/DesignSystem/Organisms/FactCard.vue +6 -7
- package/components/DesignSystem/Organisms/FeatureCard.vue +14 -14
- package/components/DesignSystem/Organisms/FlipTeaser.vue +19 -19
- package/components/DesignSystem/Organisms/HeaderHero.vue +11 -11
- package/components/DesignSystem/Organisms/HeaderTextImage.vue +10 -10
- package/components/DesignSystem/Organisms/LinkList.vue +20 -12
- package/components/DesignSystem/Organisms/LogoElement.vue +7 -4
- package/components/DesignSystem/Organisms/Map.vue +1 -1
- package/components/DesignSystem/Organisms/SearchResults.vue +15 -6
- package/components/DesignSystem/Organisms/SpotlightCard.vue +18 -18
- package/components/DesignSystem/Organisms/TeamElement.vue +19 -18
- package/components/DesignSystem/Organisms/TeaserCard.vue +16 -17
- package/components/DesignSystem/Organisms/TeaserSimple.vue +4 -31
- package/components/DesignSystem/Organisms/Testimonial.vue +13 -13
- package/components/DesignSystem/Organisms/TextCard.vue +10 -10
- package/components/DesignSystem/Organisms/TimelineElement.vue +20 -19
- package/components/DesignSystem/Organisms/TwoColumnTextElement.vue +5 -5
- package/components/DesignSystem/README.md +59 -40
- package/components/Drupal/Breadcrumb/index.vue +25 -12
- package/components/Drupal/Messages/index.vue +9 -4
- package/components/Drupal/Webform/index.vue +271 -51
- package/components/Drupal/Webform/mutation.graphql +17 -1
- package/components/Form/HiddenInput.vue +1 -4
- package/components/Form/SelectInput.vue +1 -1
- package/components/Form/SubmitButton.vue +2 -2
- package/components/Form/TextAreaInput.vue +3 -3
- package/components/Form/TextEmailInput.vue +1 -1
- package/components/Form/TextInput.vue +1 -1
- package/components/Form/TextPhoneInput.vue +1 -1
- package/components/Form/WebformMarkup.vue +1 -1
- package/components/Form/composables/useFormDefaultValue.ts +9 -13
- package/components/Form/composables/useFormElement.ts +5 -3
- package/components/Form/utils/types.ts +3 -3
- package/components/Media/Image/fragment.graphql +4 -0
- package/components/Media/Image/index.vue +27 -17
- package/components/Media/RemoteVideo/index.vue +3 -3
- package/components/Media/Video/index.vue +1 -1
- package/components/Node/Icms/Page/SearchResult/fragment.graphql +1 -1
- package/components/Node/Icms/Page/SearchResult/index.vue +2 -2
- package/components/Node/Icms/Page/Teaser/index.vue +1 -1
- package/components/Node/Icms/Page/index.vue +8 -2
- package/components/Paragraph/Anchor/fragment.graphql +4 -0
- package/components/Paragraph/Anchor/index.vue +48 -0
- package/components/Paragraph/AnchorNavigation/fragment.graphql +3 -0
- package/components/Paragraph/AnchorNavigation/index.vue +154 -0
- package/components/Paragraph/BlokkliFragment/fragment.graphql +5 -0
- package/components/Paragraph/Button/Element/fragment.graphql +1 -1
- package/components/Paragraph/Button/Element/index.vue +13 -8
- package/components/Paragraph/Card/Element/index.vue +1 -1
- package/components/Paragraph/Card/Layout/index.vue +9 -9
- package/components/Paragraph/Collapsible/Element/index.vue +2 -2
- package/components/Paragraph/Collapsible/Layout/index.vue +19 -18
- package/components/Paragraph/Contact/index.vue +17 -17
- package/components/Paragraph/Downloads/fragment.graphql +1 -1
- package/components/Paragraph/Downloads/index.vue +13 -13
- package/components/Paragraph/FAQ/Element/index.vue +4 -3
- package/components/Paragraph/FAQ/Layout/index.vue +42 -21
- package/components/Paragraph/FromLibrary/fragment.graphql +17 -0
- package/components/Paragraph/Gallery/index.vue +14 -14
- package/components/Paragraph/HeroImage/index.vue +26 -19
- package/components/Paragraph/IconText/Element/index.vue +4 -4
- package/components/Paragraph/IconText/Layout/index.vue +12 -12
- package/components/Paragraph/Introduction/index.vue +17 -17
- package/components/Paragraph/LinkLists/Element/fragment.graphql +1 -1
- package/components/Paragraph/LinkLists/Element/index.vue +5 -5
- package/components/Paragraph/LinkLists/Layout/index.vue +9 -9
- package/components/Paragraph/Listing/fragment.graphql +14 -0
- package/components/Paragraph/Listing/index.vue +91 -0
- package/components/Paragraph/Logo/Element/fragment.graphql +1 -1
- package/components/Paragraph/Logo/Element/index.vue +7 -4
- package/components/Paragraph/Media/index.vue +23 -21
- package/components/Paragraph/Partnerships/Element/fragment.graphql +1 -1
- package/components/Paragraph/Partnerships/Element/index.vue +10 -7
- package/components/Paragraph/Partnerships/Layout/index.vue +13 -13
- package/components/Paragraph/SingleTestimonial/index.vue +13 -13
- package/components/Paragraph/Table/index.vue +12 -12
- package/components/Paragraph/Team/Element/index.vue +16 -14
- package/components/Paragraph/Team/Layout/index.vue +9 -9
- package/components/Paragraph/Teasers/index.vue +14 -17
- package/components/Paragraph/Testimonial/Element/index.vue +19 -18
- package/components/Paragraph/Testimonial/Layout/index.vue +24 -18
- package/components/Paragraph/Text/fragment.graphql +1 -1
- package/components/Paragraph/Text/index.vue +8 -8
- package/components/Paragraph/TextMedia/index.vue +22 -22
- package/components/Paragraph/Timeline/Element/index.vue +19 -19
- package/components/Paragraph/Timeline/Layout/index.vue +51 -20
- package/components/Paragraph/TwoColumnText/Element/index.vue +13 -13
- package/components/Paragraph/TwoColumnText/Layout/index.vue +1 -1
- package/components/Paragraph/iFrame/index.vue +8 -8
- package/components/Search/Facets/FacetDropdownUI.vue +25 -31
- package/components/Search/Facets/FacetedSearchUI.vue +72 -48
- package/components/Search/Facets/fragment.graphql +20 -15
- package/components/Section/Footer/index.vue +55 -32
- package/components/Section/Header/Buttons.vue +4 -5
- package/components/Section/Header/DesktopMainMenu.vue +5 -4
- package/components/Section/Header/DesktopMainMenuDropdown.vue +5 -5
- package/components/Section/Header/LanguageDropdown.vue +2 -3
- package/components/Section/Header/Logo.vue +3 -3
- package/components/Section/Header/MainButtons.vue +4 -5
- package/components/Section/Header/MetaButtons.vue +5 -6
- package/components/Section/Header/MetaMenu.vue +1 -1
- package/components/Section/Header/MobileMainMenu.vue +1 -1
- package/components/Section/Header/MobileMainMenuItem.vue +2 -2
- package/components/Section/Header/index.vue +6 -13
- package/composables/__tests__/useImageSources.spec.ts +91 -0
- package/composables/breadcrumb.ts +12 -7
- package/composables/useAccordionScroll.ts +12 -4
- package/composables/useAllowedFragments.ts +14 -0
- package/composables/useAnchors.ts +48 -0
- package/composables/useChildTitleWeight.ts +1 -1
- package/composables/useCurrentLangcodeEnum.ts +1 -1
- package/composables/useCurrentNodeId.ts +8 -0
- package/composables/useDrupalUrl.ts +15 -0
- package/composables/useEnrichFacetLabels.ts +8 -6
- package/composables/useEntityRegistry.ts +3 -3
- package/composables/useGlobalConfig.ts +1 -2
- package/composables/useGraphqlCacheability.ts +12 -1
- package/composables/useHreflangLinks.ts +54 -0
- package/composables/useImageSources.ts +70 -28
- package/composables/useInitData.ts +1 -2
- package/composables/useIsHomepage.ts +1 -1
- package/composables/useLinkUrl.ts +30 -0
- package/composables/useMediaLightbox.ts +62 -50
- package/composables/useMenu.ts +1 -3
- package/composables/useMessageBus.ts +14 -7
- package/composables/useMobileMenuOverlayBus.ts +1 -1
- package/composables/useNavigationOffset.ts +49 -6
- package/composables/usePageCache.ts +33 -0
- package/composables/useSiteShell.ts +11 -0
- package/composables/useTheme.ts +17 -13
- package/config/__tests__/stubs/nuxt-multi-cache-config.ts +2 -0
- package/config/blokkli.ts +7 -13
- package/config/easyTexts.ts +1 -1
- package/config/graphqlMiddleware.ts +11 -4
- package/config/index.ts +5 -2
- package/config/languageNegotiation.ts +1 -1
- package/config/multiCache.ts +6 -1
- package/config/postcss-drupal/postcss.config.cjs +2 -2
- package/config/runtimeConfig.ts +7 -2
- package/config/svgIconSprite.ts +1 -2
- package/config/vuepal.ts +16 -18
- package/error.vue +1 -22
- package/layouts/default.vue +2 -6
- package/layouts/error.vue +7 -15
- package/modules/blokkliFragments.ts +76 -0
- package/modules/dynamicEntityComponentResolver.ts +47 -47
- package/modules/dynamicParagraphResolver.ts +43 -8
- package/modules/pageCache.ts +106 -0
- package/nuxt.config.ts +62 -33
- package/package.json +20 -19
- package/pages/[...slug]/index.vue +25 -4
- package/pages/index.vue +3 -3
- package/pages/node/[nid]/index.vue +2 -3
- package/patches/@blokkli+editor+2.0.0-alpha.13.patch +15 -1
- package/plugins/currentNode.ts +17 -0
- package/plugins/graphqlMiddleware.ts +10 -2
- package/plugins/initData.ts +15 -7
- package/plugins/registerNodeIcmsPageComponents.ts +6 -2
- package/plugins/siteShell.client.ts +94 -0
- package/queries/facetTermLabels.graphql +1 -5
- package/queries/fragment.linkUrl.graphql +12 -0
- package/queries/query.contentSearch.graphql +17 -2
- package/queries/query.initData.graphql +1 -1
- package/scripts/create-shade.ts +13 -4
- package/scripts/update-icms.ts +3 -1
- package/server/__tests__/graphqlMiddleware.serverOptions.spec.ts +2 -2
- package/server/__tests__/turnstile.spec.ts +119 -0
- package/server/api/icms/blokkli/last-changed.get.ts +24 -0
- package/server/api/icon/[...params].ts +3 -9
- package/server/graphqlMiddleware.serverOptions.ts +9 -8
- package/server/helpers/index.ts +0 -1
- package/server/middleware/turnstile.ts +51 -0
- package/server/plugins/frameAncestors.ts +20 -0
- package/server/plugins/pageCache.ts +59 -0
- package/server/utils/__tests__/accessDeniedHandover.spec.ts +49 -0
- package/server/utils/__tests__/backendRequestHeaders.spec.ts +115 -0
- package/server/utils/accessDeniedHandover.ts +48 -0
- package/server/utils/backendRequestHeaders.ts +51 -0
- package/server/utils/cacheability.ts +4 -4
- package/shared/__tests__/blokkliState.spec.ts +54 -0
- package/shared/__tests__/csp.spec.ts +53 -0
- package/shared/__tests__/drupalUrl.spec.ts +50 -0
- package/shared/blokkliState.ts +40 -0
- package/shared/csp.ts +47 -0
- package/shared/drupalUrl.ts +30 -0
- package/tailwind.config.ts +0 -5
- package/types/breadcrumb.ts +22 -0
- package/types/global.ts +15 -14
- package/types/langcode.ts +16 -0
- package/types/layerConfig.ts +84 -0
- package/utils/pageCache.ts +95 -0
- package/utils/turnstile.ts +35 -0
- package/composables/useWebformEnrichment.ts +0 -68
- package/server/__tests__/graphqlMiddleware.ts +0 -41
- package/server/multiCache.serverOptions.ts +0 -32
- package/vitest.config.mts +0 -28
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
>
|
|
31
31
|
<DesignSystemOrganismsContentBlock
|
|
32
32
|
:pretitle="pretitle"
|
|
33
|
-
:
|
|
33
|
+
:pretitle-class="themedClass('pretitleClass')"
|
|
34
34
|
:title="title"
|
|
35
|
-
:
|
|
36
|
-
:
|
|
37
|
-
:
|
|
38
|
-
:
|
|
35
|
+
:title-class="themedClass('titleClass', 'mb-0')"
|
|
36
|
+
:title-weight="titleWeight"
|
|
37
|
+
:title-style="titleStyle"
|
|
38
|
+
:color-scheme="colorScheme"
|
|
39
39
|
/>
|
|
40
40
|
</div>
|
|
41
41
|
<div
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
>
|
|
52
52
|
<DesignSystemOrganismsContentBlock
|
|
53
53
|
:text="text"
|
|
54
|
-
:
|
|
55
|
-
:
|
|
54
|
+
:text-class="themedClass('textClass')"
|
|
55
|
+
:color-scheme="colorScheme"
|
|
56
56
|
/>
|
|
57
57
|
</div>
|
|
58
58
|
</DesignSystemAtomsGridRow>
|
|
@@ -79,12 +79,12 @@
|
|
|
79
79
|
:load-more-text="$texts('listing.load_more', 'Load more')"
|
|
80
80
|
:color-scheme="colorScheme"
|
|
81
81
|
:debug="false"
|
|
82
|
-
:
|
|
83
|
-
@results-updated="onResultsUpdated"
|
|
82
|
+
:align-horizontal-full="alignHorizontalFull"
|
|
84
83
|
:conjunction="conjunction"
|
|
84
|
+
@results-updated="onResultsUpdated"
|
|
85
85
|
>
|
|
86
86
|
<template #results="{ results }">
|
|
87
|
-
<slot name="preResults" :results="results"
|
|
87
|
+
<slot name="preResults" :results="results" />
|
|
88
88
|
<div
|
|
89
89
|
v-if="!slider"
|
|
90
90
|
:class="
|
|
@@ -95,19 +95,19 @@
|
|
|
95
95
|
"
|
|
96
96
|
>
|
|
97
97
|
<component
|
|
98
|
-
v-for="teaser in results?.results"
|
|
99
98
|
:is="teaserComponent(teaser?.bundle)"
|
|
99
|
+
v-for="(teaser, teaserIndex) in results?.results"
|
|
100
|
+
:key="`${teaser?.bundle}-${teaserIndex}`"
|
|
100
101
|
v-bind="teaser"
|
|
101
102
|
/>
|
|
102
103
|
</div>
|
|
103
104
|
<div v-else class="relative mt-10">
|
|
104
105
|
<UCarousel
|
|
105
|
-
v-model="carouselIndex"
|
|
106
106
|
:items="results?.results || []"
|
|
107
107
|
:arrows="(results?.results?.length || 0) > sliderColumns"
|
|
108
108
|
:watch-drag="(results?.results?.length || 0) > sliderColumns"
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
next-icon="i-lucide-chevron-right"
|
|
110
|
+
prev-icon="i-lucide-chevron-left"
|
|
111
111
|
:ui="{
|
|
112
112
|
viewport: themedClass('carouselViewport'),
|
|
113
113
|
item: sliderItemClass,
|
|
@@ -166,6 +166,15 @@ const props = withDefaults(
|
|
|
166
166
|
prefilter?: Record<string, Array<{ id?: string; name?: string } | null>>
|
|
167
167
|
availableFacets?: string[]
|
|
168
168
|
contentTypeFilter?: string[]
|
|
169
|
+
/**
|
|
170
|
+
* Whether to exclude the node the listing sits on from its own results.
|
|
171
|
+
*
|
|
172
|
+
* Only meaningful for indexes whose datasource is nodes: the condition
|
|
173
|
+
* filters on `nid`, and search_api rejects a query naming a field the
|
|
174
|
+
* index does not have. Listings over another entity type — the event
|
|
175
|
+
* bundle indexes occurrence paragraphs — must switch it off.
|
|
176
|
+
*/
|
|
177
|
+
excludeCurrentNode?: boolean
|
|
169
178
|
additionalFilters?: Array<{ field: string; value: any; operator?: string }>
|
|
170
179
|
containerClass?: string
|
|
171
180
|
firstRowClass?: string
|
|
@@ -187,8 +196,11 @@ const props = withDefaults(
|
|
|
187
196
|
}>(),
|
|
188
197
|
{
|
|
189
198
|
availableFacets: () => ['topics'],
|
|
199
|
+
excludeCurrentNode: true,
|
|
190
200
|
index: 'content_search',
|
|
191
201
|
debug: false,
|
|
202
|
+
prefilter: () => ({}),
|
|
203
|
+
sliderColumns: 1,
|
|
192
204
|
},
|
|
193
205
|
)
|
|
194
206
|
|
|
@@ -199,7 +211,7 @@ const { $texts } = useNuxtApp()
|
|
|
199
211
|
const hasResults = ref(true)
|
|
200
212
|
|
|
201
213
|
// Handle results updates from SearchFacetsFacetedSearchUI
|
|
202
|
-
const onResultsUpdated = (hasResultsValue: boolean,
|
|
214
|
+
const onResultsUpdated = (hasResultsValue: boolean, _count: number) => {
|
|
203
215
|
hasResults.value = hasResultsValue
|
|
204
216
|
}
|
|
205
217
|
|
|
@@ -230,6 +242,8 @@ const listingType = computed(() => {
|
|
|
230
242
|
return 'all' // default fallback
|
|
231
243
|
})
|
|
232
244
|
|
|
245
|
+
const currentNodeId = useCurrentNodeId()
|
|
246
|
+
|
|
233
247
|
// Configuration for the faceted search
|
|
234
248
|
const baseFilter = computed(() => {
|
|
235
249
|
const conditions: any[] = []
|
|
@@ -239,6 +253,15 @@ const baseFilter = computed(() => {
|
|
|
239
253
|
conditions.push({ field: 'type', value: props?.contentTypeFilter })
|
|
240
254
|
}
|
|
241
255
|
|
|
256
|
+
// Exclude the node the listing is placed on from its own results
|
|
257
|
+
if (props.excludeCurrentNode && currentNodeId.value) {
|
|
258
|
+
conditions.push({
|
|
259
|
+
field: 'nid',
|
|
260
|
+
value: [currentNodeId.value],
|
|
261
|
+
operator: 'NOT_EQUAL',
|
|
262
|
+
})
|
|
263
|
+
}
|
|
264
|
+
|
|
242
265
|
// Add custom field conditions
|
|
243
266
|
if (props?.additionalFilters && props.additionalFilters.length > 0) {
|
|
244
267
|
conditions.push(...props.additionalFilters)
|
|
@@ -273,8 +296,6 @@ const teaserComponent = (bundle?: string) => {
|
|
|
273
296
|
return null
|
|
274
297
|
}
|
|
275
298
|
|
|
276
|
-
const carouselIndex = ref(0)
|
|
277
|
-
|
|
278
299
|
const viewport = useViewport()
|
|
279
300
|
|
|
280
301
|
const sliderItemClass = computed(() => {
|
|
@@ -3,13 +3,13 @@
|
|
|
3
3
|
<div :class="card({ colorScheme })">
|
|
4
4
|
<slot name="content">
|
|
5
5
|
<DesignSystemOrganismsContentBlock
|
|
6
|
-
:
|
|
6
|
+
:container-class="'flex h-full flex-col justify-between'"
|
|
7
7
|
:title="title"
|
|
8
|
-
:
|
|
9
|
-
:
|
|
10
|
-
:
|
|
8
|
+
:title-weight="titleWeight"
|
|
9
|
+
:title-style="'heading-2'"
|
|
10
|
+
:title-class="themedClass('titleClass', 'mb-6 font-bold')"
|
|
11
11
|
:text="text"
|
|
12
|
-
:
|
|
12
|
+
:text-class="
|
|
13
13
|
themedClass(
|
|
14
14
|
'textClass',
|
|
15
15
|
'text-sm mt-auto [&>p:last-of-type]:mb-0 opacity-60',
|
|
@@ -17,14 +17,13 @@
|
|
|
17
17
|
"
|
|
18
18
|
/>
|
|
19
19
|
</slot>
|
|
20
|
-
<slot name="links"
|
|
20
|
+
<slot name="links" />
|
|
21
21
|
</div>
|
|
22
22
|
</div>
|
|
23
23
|
</template>
|
|
24
24
|
|
|
25
25
|
<script lang="ts" setup>
|
|
26
26
|
import type { ColorScheme } from '@iqual/nuxt-icms/types/global'
|
|
27
|
-
import type { MediaFragment } from '#graphql-operations'
|
|
28
27
|
import { tv } from 'tailwind-variants'
|
|
29
28
|
|
|
30
29
|
const themedClass = useTheme('DesignSystemOrganismsFactCard')
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
<Media
|
|
12
12
|
v-if="image"
|
|
13
13
|
:media="image"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
:
|
|
17
|
-
:
|
|
18
|
-
:
|
|
14
|
+
image-aspect-ratios="16/9"
|
|
15
|
+
image-sizes="xs:100vw sm:100vw md:50vw lg:50vw"
|
|
16
|
+
:media-class="themedClass('mediaClass')"
|
|
17
|
+
:figcaption-class="themedClass('figcaptionClass')"
|
|
18
|
+
:element-class="themedClass('elementClass')"
|
|
19
19
|
/>
|
|
20
20
|
<div v-if="icon" :class="cardIconWrapper({ colorScheme })">
|
|
21
21
|
<Media :media="icon" />
|
|
@@ -38,23 +38,23 @@
|
|
|
38
38
|
<slot name="content">
|
|
39
39
|
<DesignSystemOrganismsContentBlock
|
|
40
40
|
:pretitle="pretitle"
|
|
41
|
-
:
|
|
41
|
+
:pretitle-class="
|
|
42
42
|
themedClass(
|
|
43
43
|
'pretitleClass',
|
|
44
44
|
'text-center @xl:text-left [&>p:last-of-type]:mb-0 text-base lg:text-base font-medium',
|
|
45
45
|
)
|
|
46
46
|
"
|
|
47
47
|
:title="title"
|
|
48
|
-
:
|
|
49
|
-
:
|
|
50
|
-
:
|
|
48
|
+
:title-weight="titleWeight"
|
|
49
|
+
:title-style="'heading-5'"
|
|
50
|
+
:title-class="
|
|
51
51
|
themedClass(
|
|
52
52
|
'titleClass',
|
|
53
53
|
'mb-2 text-center @xl:text-left font-semibold',
|
|
54
54
|
)
|
|
55
55
|
"
|
|
56
56
|
:text="text"
|
|
57
|
-
:
|
|
57
|
+
:text-class="
|
|
58
58
|
themedClass(
|
|
59
59
|
'textClass',
|
|
60
60
|
'text-center @xl:text-left [&>p:last-of-type]:mb-0',
|
|
@@ -78,10 +78,10 @@
|
|
|
78
78
|
:title="$texts('teaser_card.link_label', 'Read more')"
|
|
79
79
|
:link="link?.path"
|
|
80
80
|
:target-blank="false"
|
|
81
|
-
:
|
|
82
|
-
:
|
|
83
|
-
:
|
|
84
|
-
:
|
|
81
|
+
:button-style="'focus'"
|
|
82
|
+
:color-scheme="colorScheme"
|
|
83
|
+
:button-class="themedClass('buttonClass')"
|
|
84
|
+
:label-class="themedClass('labelClass')"
|
|
85
85
|
/>
|
|
86
86
|
</div>
|
|
87
87
|
</slot>
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
<Media
|
|
11
11
|
v-if="image"
|
|
12
12
|
:media="image"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
:
|
|
16
|
-
:
|
|
17
|
-
:
|
|
13
|
+
image-sizes="xs:100vw sm:100vw md:50vw lg:320px"
|
|
14
|
+
image-aspect-ratios="1/1"
|
|
15
|
+
:media-class="themedClass('mediaClass', 'w-full')"
|
|
16
|
+
:figcaption-class="themedClass('figcaptionClass')"
|
|
17
|
+
:element-class="themedClass('elementClass')"
|
|
18
18
|
/>
|
|
19
19
|
<!-- Opaque Overlay -->
|
|
20
20
|
<div :class="opaqueOverlay({ colorScheme })" />
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
<div v-if="icon" :class="cardIconWrapper({ colorScheme })">
|
|
34
34
|
<Media
|
|
35
35
|
:media="icon"
|
|
36
|
-
:
|
|
36
|
+
:media-class="
|
|
37
37
|
themedClass(
|
|
38
38
|
'iconMediaClass',
|
|
39
39
|
'w-full h-full object-scale-down object-center',
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
/>
|
|
43
43
|
</div>
|
|
44
44
|
<DesignSystemOrganismsContentBlock
|
|
45
|
-
|
|
45
|
+
container-class="mt-auto"
|
|
46
46
|
:title="title"
|
|
47
|
-
:
|
|
48
|
-
:
|
|
49
|
-
:
|
|
47
|
+
:title-weight="titleWeight"
|
|
48
|
+
:title-style="'heading-5'"
|
|
49
|
+
:title-class="themedClass('titleClass', 'font-semibold mb-0')"
|
|
50
50
|
/>
|
|
51
51
|
</div>
|
|
52
52
|
|
|
@@ -65,30 +65,30 @@
|
|
|
65
65
|
<div>
|
|
66
66
|
<DesignSystemOrganismsContentBlock
|
|
67
67
|
:pretitle="pretitle"
|
|
68
|
-
:
|
|
68
|
+
:pretitle-class="
|
|
69
69
|
themedClass(
|
|
70
70
|
'overlayPretitleClass',
|
|
71
71
|
'text-gray-300 font-medium text-base lg:text-base mb-2',
|
|
72
72
|
)
|
|
73
73
|
"
|
|
74
74
|
:title="title"
|
|
75
|
-
:
|
|
76
|
-
:
|
|
77
|
-
:
|
|
75
|
+
:title-style="'heading-5'"
|
|
76
|
+
:title-weight="titleWeight"
|
|
77
|
+
:title-class="themedClass('overlayTitleClass', 'mb-2')"
|
|
78
78
|
:subtitle="subtitle"
|
|
79
|
-
:
|
|
79
|
+
:subtitle-class="themedClass('overlaySubtitleClass')"
|
|
80
80
|
:text="text"
|
|
81
|
-
:
|
|
81
|
+
:text-class="
|
|
82
82
|
themedClass(
|
|
83
83
|
'overlayTextClass',
|
|
84
84
|
'text-sm line-clamp-3 [&>p:last-of-type]:mb-0',
|
|
85
85
|
)
|
|
86
86
|
"
|
|
87
|
-
:
|
|
87
|
+
:color-scheme="colorScheme"
|
|
88
88
|
/>
|
|
89
89
|
</div>
|
|
90
90
|
|
|
91
|
-
<slot name="links"
|
|
91
|
+
<slot name="links" />
|
|
92
92
|
</div>
|
|
93
93
|
</slot>
|
|
94
94
|
|
|
@@ -113,7 +113,7 @@ import cn from '@iqual/nuxt-icms/composables/useCn'
|
|
|
113
113
|
|
|
114
114
|
const themedClass = useTheme('DesignSystemOrganismsFlipTeaser')
|
|
115
115
|
|
|
116
|
-
|
|
116
|
+
defineProps<{
|
|
117
117
|
image?: MediaFragment
|
|
118
118
|
icon?: MediaFragment
|
|
119
119
|
pretitle?: string
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
<Media
|
|
14
14
|
v-if="image"
|
|
15
15
|
:media="image"
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
:
|
|
16
|
+
image-sizes="xs:100vw sm:100vw md:100vw lg:100vw"
|
|
17
|
+
image-aspect-ratios="xs:1/1 sm:1/1 md:16/9 lg:16/9"
|
|
18
|
+
:media-class="
|
|
19
19
|
themedClass('mediaClass', 'header-grid-item max-h-[1080px] h-full')
|
|
20
20
|
"
|
|
21
|
-
:
|
|
22
|
-
:
|
|
21
|
+
:figcaption-class="themedClass('figcaptionClass')"
|
|
22
|
+
:element-class="
|
|
23
23
|
themedClass('elementClass', 'size-full object-cover object-center')
|
|
24
24
|
"
|
|
25
25
|
/>
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
'header-grid-item z-10 w-full self-stretch bg-black opacity-50',
|
|
34
34
|
)
|
|
35
35
|
"
|
|
36
|
-
|
|
36
|
+
/>
|
|
37
37
|
|
|
38
38
|
<!-- Content row -->
|
|
39
39
|
<DesignSystemAtomsGridRow
|
|
@@ -42,11 +42,11 @@
|
|
|
42
42
|
<div :class="themedClass('columnClass', 'col-span-12')">
|
|
43
43
|
<DesignSystemOrganismsContentBlock
|
|
44
44
|
:pretitle="pretitle"
|
|
45
|
-
:
|
|
45
|
+
:pretitle-class="themedClass('pretitleClass')"
|
|
46
46
|
:title="title"
|
|
47
|
-
:
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
:title-class="themedClass('titleClass', 'mb-0')"
|
|
48
|
+
title-weight="h1"
|
|
49
|
+
color-scheme="dark"
|
|
50
50
|
/>
|
|
51
51
|
|
|
52
52
|
<slot name="subtitle">
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
</template>
|
|
110
110
|
|
|
111
111
|
<script lang="ts" setup>
|
|
112
|
-
import {
|
|
112
|
+
import type { MediaFragment } from '#graphql-operations'
|
|
113
113
|
|
|
114
114
|
defineProps<{
|
|
115
115
|
title?: string
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
<slot name="content">
|
|
13
13
|
<DesignSystemOrganismsContentBlock
|
|
14
14
|
:title="title"
|
|
15
|
-
|
|
16
|
-
:
|
|
15
|
+
title-weight="p"
|
|
16
|
+
:title-class="themedClass('titleClass', 'text-h1 mb-4')"
|
|
17
17
|
:text="description"
|
|
18
|
-
:
|
|
18
|
+
:text-class="themedClass('textClass', 'text-h6')"
|
|
19
19
|
/>
|
|
20
20
|
</slot>
|
|
21
|
-
<slot name="extra"
|
|
21
|
+
<slot name="extra" />
|
|
22
22
|
</div>
|
|
23
23
|
|
|
24
24
|
<div
|
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
<Media
|
|
33
33
|
v-if="image"
|
|
34
34
|
:media="image"
|
|
35
|
-
|
|
36
|
-
:
|
|
37
|
-
:
|
|
38
|
-
:
|
|
39
|
-
|
|
35
|
+
image-sizes="xs:100vw sm:100vw md:800px lg:800px"
|
|
36
|
+
:media-class="themedClass('mediaClass')"
|
|
37
|
+
:figcaption-class="themedClass('figcaptionClass')"
|
|
38
|
+
:element-class="themedClass('elementClass', 'rounded-lg')"
|
|
39
|
+
image-aspect-ratios="4/3"
|
|
40
40
|
/>
|
|
41
41
|
</div>
|
|
42
42
|
</DesignSystemAtomsGridRow>
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
</template>
|
|
45
45
|
|
|
46
46
|
<script lang="ts" setup>
|
|
47
|
-
import {
|
|
47
|
+
import type { MediaFragment } from '#graphql-operations'
|
|
48
48
|
|
|
49
49
|
defineProps<{
|
|
50
50
|
title?: string
|
|
@@ -2,19 +2,21 @@
|
|
|
2
2
|
<div :class="linkList({ colorScheme, teaserStyle })">
|
|
3
3
|
<DesignSystemOrganismsContentBlock
|
|
4
4
|
:title="title"
|
|
5
|
-
:
|
|
6
|
-
:
|
|
7
|
-
:
|
|
5
|
+
:title-weight="titleWeight"
|
|
6
|
+
:title-style="'heading-5'"
|
|
7
|
+
:title-class="themedClass('titleClass', 'mb-0 font-semibold')"
|
|
8
8
|
/>
|
|
9
9
|
|
|
10
10
|
<ul :class="themedClass('listClass', 'flex flex-col gap-2')">
|
|
11
11
|
<li
|
|
12
|
-
v-for="link in
|
|
13
|
-
:key="link
|
|
12
|
+
v-for="link in resolvedLinks"
|
|
13
|
+
:key="link.url + '-' + link.title"
|
|
14
14
|
:class="themedClass('listItemClass')"
|
|
15
15
|
>
|
|
16
16
|
<NuxtLink
|
|
17
|
-
:to="link
|
|
17
|
+
:to="link.url"
|
|
18
|
+
:external="link.isFile"
|
|
19
|
+
:target="link.isFile ? '_blank' : undefined"
|
|
18
20
|
:class="linkLabel({ colorScheme, teaserStyle })"
|
|
19
21
|
>
|
|
20
22
|
<div :class="bulletPointContainer({ colorScheme, teaserStyle })">
|
|
@@ -29,9 +31,9 @@
|
|
|
29
31
|
</ul>
|
|
30
32
|
|
|
31
33
|
<DesignSystemOrganismsContentBlock
|
|
32
|
-
|
|
34
|
+
container-class="mt-auto"
|
|
33
35
|
:text="text"
|
|
34
|
-
:
|
|
36
|
+
:text-class="
|
|
35
37
|
themedClass(
|
|
36
38
|
'textClass',
|
|
37
39
|
'mt-6 text-xs [&>p:last-of-type]:mb-0 opacity-75',
|
|
@@ -43,24 +45,30 @@
|
|
|
43
45
|
|
|
44
46
|
<script lang="ts" setup>
|
|
45
47
|
import type { ColorScheme, TeaserStyle } from '@iqual/nuxt-icms/types/global'
|
|
48
|
+
import type { LinkFieldUri } from '@iqual/nuxt-icms/composables/useLinkUrl'
|
|
46
49
|
import { tv } from 'tailwind-variants'
|
|
47
50
|
|
|
48
51
|
const themedClass = useTheme('DesignSystemOrganismsLinkList')
|
|
49
52
|
|
|
50
|
-
defineProps<{
|
|
53
|
+
const props = defineProps<{
|
|
51
54
|
title?: string
|
|
52
55
|
titleWeight?: string
|
|
53
56
|
text?: string
|
|
54
57
|
links?: ({
|
|
55
58
|
title?: string
|
|
56
|
-
uri?:
|
|
57
|
-
path?: string
|
|
58
|
-
}
|
|
59
|
+
uri?: LinkFieldUri
|
|
59
60
|
} | null)[]
|
|
60
61
|
colorScheme?: ColorScheme
|
|
61
62
|
teaserStyle?: TeaserStyle
|
|
62
63
|
}>()
|
|
63
64
|
|
|
65
|
+
const resolvedLinks = computed(() =>
|
|
66
|
+
(props.links ?? []).map((link) => ({
|
|
67
|
+
title: link?.title,
|
|
68
|
+
...resolveLinkUrl(link?.uri),
|
|
69
|
+
})),
|
|
70
|
+
)
|
|
71
|
+
|
|
64
72
|
const linkList = tv({
|
|
65
73
|
base: themedClass('linkListBase', 'flex flex-col gap-8 p-8'),
|
|
66
74
|
variants: {
|
|
@@ -2,16 +2,17 @@
|
|
|
2
2
|
<NuxtLink
|
|
3
3
|
:to="link"
|
|
4
4
|
:title="title"
|
|
5
|
+
:external="external"
|
|
5
6
|
:target="targetBlank ? '_blank' : '_self'"
|
|
6
7
|
:class="logoElement({ colorScheme })"
|
|
7
8
|
>
|
|
8
9
|
<Media
|
|
9
10
|
v-if="logo"
|
|
10
11
|
:media="logo"
|
|
11
|
-
|
|
12
|
-
:
|
|
13
|
-
:
|
|
14
|
-
:
|
|
12
|
+
image-sizes="xs:200px"
|
|
13
|
+
:media-class="themedClass('mediaClass', 'w-full h-full')"
|
|
14
|
+
:figcaption-class="themedClass('figcaptionClass')"
|
|
15
|
+
:element-class="
|
|
15
16
|
themedClass('elementClass', 'w-full h-full object-scale-down')
|
|
16
17
|
"
|
|
17
18
|
/>
|
|
@@ -29,6 +30,8 @@ defineProps<{
|
|
|
29
30
|
logo?: MediaFragment
|
|
30
31
|
link?: string
|
|
31
32
|
title?: string
|
|
33
|
+
/** Force a native browser navigation (bypasses the Vue router), e.g. for file downloads. */
|
|
34
|
+
external?: boolean
|
|
32
35
|
targetBlank?: boolean
|
|
33
36
|
colorScheme?: ColorScheme
|
|
34
37
|
mediaClass?: string
|
|
@@ -13,22 +13,31 @@
|
|
|
13
13
|
</span>
|
|
14
14
|
</p>
|
|
15
15
|
<component
|
|
16
|
-
v-for="teaser in results?.results"
|
|
17
16
|
:is="teaserComponent(teaser?.bundle!)"
|
|
17
|
+
v-for="(teaser, index) in results?.results"
|
|
18
|
+
:key="`${teaser?.bundle}-${index}`"
|
|
18
19
|
v-bind="teaser"
|
|
19
20
|
/>
|
|
20
21
|
</div>
|
|
21
22
|
</template>
|
|
22
23
|
|
|
23
24
|
<script setup lang="ts">
|
|
24
|
-
import type {
|
|
25
|
+
import type { LayoutOverviewResultsSearchQuery } from '#graphql-operations'
|
|
25
26
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
/**
|
|
28
|
+
* One display group as passed by FacetedSearchUI: either a facet group, which
|
|
29
|
+
* adds a label and a count, or the ungrouped result list.
|
|
30
|
+
*/
|
|
31
|
+
type SearchResultGroup = {
|
|
32
|
+
label?: string
|
|
33
|
+
count?: number
|
|
34
|
+
results: NonNullable<
|
|
35
|
+
LayoutOverviewResultsSearchQuery['searchApiQuery']
|
|
36
|
+
>['results']
|
|
37
|
+
}
|
|
29
38
|
|
|
30
39
|
defineProps<{
|
|
31
|
-
results:
|
|
40
|
+
results: SearchResultGroup
|
|
32
41
|
}>()
|
|
33
42
|
|
|
34
43
|
const themedClass = useTheme('DesignSystemOrganismsSearchResults')
|
|
@@ -11,15 +11,15 @@
|
|
|
11
11
|
<Media
|
|
12
12
|
v-if="image"
|
|
13
13
|
:media="image"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
:
|
|
17
|
-
:
|
|
18
|
-
:
|
|
14
|
+
image-aspect-ratios="3/4"
|
|
15
|
+
image-sizes="xs:100vw sm:100vw md:50vw lg:33vw"
|
|
16
|
+
:media-class="themedClass('mediaClass')"
|
|
17
|
+
:figcaption-class="themedClass('figcaptionClass')"
|
|
18
|
+
:element-class="themedClass('elementClass')"
|
|
19
19
|
/>
|
|
20
20
|
</div>
|
|
21
21
|
|
|
22
|
-
<div v-if="image" :class="overlay({ colorScheme })"
|
|
22
|
+
<div v-if="image" :class="overlay({ colorScheme })" />
|
|
23
23
|
|
|
24
24
|
<div
|
|
25
25
|
:class="
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
<div v-if="icon" :class="cardIconWrapper({ colorScheme })">
|
|
33
33
|
<Media
|
|
34
34
|
:media="icon"
|
|
35
|
-
:
|
|
35
|
+
:media-class="
|
|
36
36
|
themedClass(
|
|
37
37
|
'iconMediaClass',
|
|
38
38
|
'w-full h-full object-scale-down object-center',
|
|
@@ -44,21 +44,21 @@
|
|
|
44
44
|
<DesignSystemOrganismsContentBlock
|
|
45
45
|
class="mt-auto"
|
|
46
46
|
:pretitle="pretitle"
|
|
47
|
-
:
|
|
47
|
+
:pretitle-class="
|
|
48
48
|
themedClass(
|
|
49
49
|
'pretitleClass',
|
|
50
50
|
'[&>p:last-of-type]:mb-0 text-base lg:text-base font-medium',
|
|
51
51
|
)
|
|
52
52
|
"
|
|
53
53
|
:title="title"
|
|
54
|
-
:
|
|
55
|
-
:
|
|
56
|
-
:
|
|
54
|
+
:title-weight="titleWeight"
|
|
55
|
+
:title-style="'heading-5'"
|
|
56
|
+
:title-class="themedClass('titleClass', 'mb-2 font-semibold')"
|
|
57
57
|
:text="text"
|
|
58
|
-
:
|
|
58
|
+
:text-class="themedClass('textClass', '[&>p:last-of-type]:mb-0')"
|
|
59
59
|
/>
|
|
60
60
|
</slot>
|
|
61
|
-
<slot name="links"
|
|
61
|
+
<slot name="links" />
|
|
62
62
|
</div>
|
|
63
63
|
</div>
|
|
64
64
|
</div>
|
|
@@ -71,7 +71,7 @@ import { tv } from 'tailwind-variants'
|
|
|
71
71
|
|
|
72
72
|
const themedClass = useTheme('DesignSystemOrganismsSpotlightCard')
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
defineProps<{
|
|
75
75
|
pretitle?: string
|
|
76
76
|
title?: string
|
|
77
77
|
text?: string
|
|
@@ -140,19 +140,19 @@ const overlay = tv({
|
|
|
140
140
|
colorScheme: {
|
|
141
141
|
none: themedClass(
|
|
142
142
|
'overlayVariantsColorSchemeNone',
|
|
143
|
-
'bg-
|
|
143
|
+
'bg-linear-to-t from-white/90 via-white/50 to-white/0',
|
|
144
144
|
),
|
|
145
145
|
dark: themedClass(
|
|
146
146
|
'overlayVariantsColorSchemeDark',
|
|
147
|
-
'bg-
|
|
147
|
+
'bg-linear-to-t from-black/90 via-black/50 to-black/0',
|
|
148
148
|
),
|
|
149
149
|
light: themedClass(
|
|
150
150
|
'overlayVariantsColorSchemeLight',
|
|
151
|
-
'bg-
|
|
151
|
+
'bg-linear-to-t from-white/90 via-white/50 to-white/0',
|
|
152
152
|
),
|
|
153
153
|
accent: themedClass(
|
|
154
154
|
'overlayVariantsColorSchemeAccent',
|
|
155
|
-
'bg-
|
|
155
|
+
'bg-linear-to-t from-black/90 via-black/50 to-black/0',
|
|
156
156
|
),
|
|
157
157
|
},
|
|
158
158
|
},
|