@iqual/nuxt-icms 1.5.15 → 1.5.17
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.
|
@@ -13,6 +13,7 @@ const blokkliData = defineBlokkli({
|
|
|
13
13
|
'spacingTop',
|
|
14
14
|
'spacingBottom',
|
|
15
15
|
'width',
|
|
16
|
+
'imageFormat',
|
|
16
17
|
'colorScheme',
|
|
17
18
|
],
|
|
18
19
|
options: {
|
|
@@ -20,7 +21,7 @@ const blokkliData = defineBlokkli({
|
|
|
20
21
|
type: 'checkbox',
|
|
21
22
|
label: 'Show captions',
|
|
22
23
|
default: false,
|
|
23
|
-
}
|
|
24
|
-
}
|
|
24
|
+
},
|
|
25
|
+
},
|
|
25
26
|
})
|
|
26
27
|
</script>
|
|
@@ -10,11 +10,14 @@
|
|
|
10
10
|
v-if="media && media.length > 1"
|
|
11
11
|
:media="media"
|
|
12
12
|
:imageSizes="imageSizes"
|
|
13
|
-
:
|
|
13
|
+
:imageFormat="imageFormat"
|
|
14
14
|
:containerClass="themedClass('mediaSliderContainerClass')"
|
|
15
15
|
:mediaClass="themedClass('mediaSliderMediaClass')"
|
|
16
16
|
:elementClass="
|
|
17
|
-
themedClass(
|
|
17
|
+
themedClass(
|
|
18
|
+
'mediaSliderElementClass',
|
|
19
|
+
'block w-full h-auto max-h-dvh object-cover object-center',
|
|
20
|
+
)
|
|
18
21
|
"
|
|
19
22
|
:figcaptionClass="themedClass('mediaSliderFigcaptionClass')"
|
|
20
23
|
:carouselClass="themedClass('mediaSliderCarouselClass')"
|
|
@@ -34,9 +37,14 @@
|
|
|
34
37
|
v-else-if="media && media.length === 1 && media[0]"
|
|
35
38
|
:media="media[0]"
|
|
36
39
|
:imageSizes="imageSizes"
|
|
37
|
-
:
|
|
40
|
+
:imageFormat="imageFormat"
|
|
38
41
|
:mediaClass="themedClass('mediaMediaClass')"
|
|
39
|
-
:elementClass="
|
|
42
|
+
:elementClass="
|
|
43
|
+
themedClass(
|
|
44
|
+
'mediaElementClass',
|
|
45
|
+
'block w-full h-auto max-h-dvh object-cover object-center',
|
|
46
|
+
)
|
|
47
|
+
"
|
|
40
48
|
:figcaptionClass="themedClass('mediaFigcaptionClass')"
|
|
41
49
|
:showCaption="showCaptions"
|
|
42
50
|
/>
|
|
@@ -73,6 +81,10 @@ const showCaptions = computed(() => {
|
|
|
73
81
|
return options.value.showCaptions
|
|
74
82
|
})
|
|
75
83
|
|
|
84
|
+
const imageFormat = computed(() => {
|
|
85
|
+
return options.value.imageFormat
|
|
86
|
+
})
|
|
87
|
+
|
|
76
88
|
const rowClassList = computed(() => {
|
|
77
89
|
const classList = ['grid grid-cols-12 gap-6']
|
|
78
90
|
if (options.value.width === 'wide') {
|
|
@@ -95,18 +107,6 @@ const imageSizes = computed(() => {
|
|
|
95
107
|
return 'xs:100vw sm:100vw md:50vw lg:640px'
|
|
96
108
|
})
|
|
97
109
|
|
|
98
|
-
const imageAspectRatios = computed(() => {
|
|
99
|
-
if (options.value.width === 'wide') {
|
|
100
|
-
return '3/1'
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
if (options.value.width === 'medium') {
|
|
104
|
-
return '16/9'
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
return '4/3'
|
|
108
|
-
})
|
|
109
|
-
|
|
110
110
|
const columnClassList = computed(() => {
|
|
111
111
|
const classList = ['col-span-12']
|
|
112
112
|
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
v-if="media && media.length"
|
|
39
39
|
:media="media"
|
|
40
40
|
imageSizes="xs:100vw sm:100vw md:50vw lg:640px"
|
|
41
|
-
:
|
|
41
|
+
:imageFormat="imageFormat"
|
|
42
42
|
:containerClass="themedClass('containerClass', 'my-0')"
|
|
43
43
|
:mediaClass="themedClass('mediaClass')"
|
|
44
44
|
:elementClass="themedClass('elementClass')"
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
|
|
64
64
|
<script lang="ts" setup>
|
|
65
65
|
import type { ParagraphIcmsLayoutTextMediaFragment } from '#graphql-operations'
|
|
66
|
-
import type { ColorScheme } from '@iqual/nuxt-icms/types/global'
|
|
66
|
+
import type { ColorScheme, ImageFormat } from '@iqual/nuxt-icms/types/global'
|
|
67
67
|
import { useTheme } from '@iqual/nuxt-icms/composables/useTheme'
|
|
68
68
|
import cn from '@iqual/nuxt-icms/composables/useCn'
|
|
69
69
|
|
|
@@ -130,19 +130,6 @@ const imageColumnClassList = computed(() => {
|
|
|
130
130
|
return classList.join(' ')
|
|
131
131
|
})
|
|
132
132
|
|
|
133
|
-
const imageAspectRatios = computed(() => {
|
|
134
|
-
const width = options.value.textWidth
|
|
135
|
-
|
|
136
|
-
switch (width) {
|
|
137
|
-
case 'narrow':
|
|
138
|
-
return '2/1'
|
|
139
|
-
case 'medium':
|
|
140
|
-
return '16/9'
|
|
141
|
-
default:
|
|
142
|
-
return '3/2'
|
|
143
|
-
}
|
|
144
|
-
})
|
|
145
|
-
|
|
146
133
|
const parentColorScheme = inject<ColorScheme>('colorScheme', 'none')
|
|
147
134
|
const colorScheme = computed(() => {
|
|
148
135
|
if (options.value.colorScheme !== undefined) {
|
|
@@ -156,5 +143,9 @@ const spacing = computed(() => {
|
|
|
156
143
|
return { bottom: options.value.spacingBottom, top: options.value.spacingTop }
|
|
157
144
|
})
|
|
158
145
|
|
|
146
|
+
const imageFormat = computed(() => {
|
|
147
|
+
return options.value.imageFormat
|
|
148
|
+
})
|
|
149
|
+
|
|
159
150
|
provide('colorScheme', colorScheme)
|
|
160
151
|
</script>
|
package/config/svgIconSprite.ts
CHANGED