spoko-design-system 1.1.0 → 1.1.2
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/.claude/settings.local.json +2 -1
- package/.github/workflows/code-quality.yml +3 -3
- package/.github/workflows/sonarcloud.yml +1 -1
- package/.prettierrc +1 -0
- package/CHANGELOG.md +12 -0
- package/package.json +8 -2
- package/src/MyComponent.astro +1 -1
- package/src/components/Badge.vue +2 -2
- package/src/components/Badges.vue +17 -7
- package/src/components/Breadcrumbs.vue +47 -39
- package/src/components/Button.vue +31 -30
- package/src/components/ButtonCopy.astro +12 -17
- package/src/components/ButtonCopy.vue +26 -25
- package/src/components/Card.astro +4 -6
- package/src/components/Carousel.astro +4 -4
- package/src/components/Category/CategoriesCarousel.astro +75 -75
- package/src/components/Category/CategoryDetails.astro +75 -79
- package/src/components/Category/CategoryLink.vue +8 -12
- package/src/components/Category/CategorySidebarToggler.vue +2 -7
- package/src/components/Category/CategoryTile.astro +3 -3
- package/src/components/Category/CategoryViewToggler.astro +18 -18
- package/src/components/Category/SubCategoryLink.vue +13 -13
- package/src/components/Faq.astro +16 -17
- package/src/components/FaqItem.astro +27 -27
- package/src/components/FeaturesList.vue +19 -29
- package/src/components/FuckRussia.vue +40 -27
- package/src/components/HandDrive.astro +11 -15
- package/src/components/Header/Header.astro +165 -166
- package/src/components/Header/SkipToContent.astro +1 -1
- package/src/components/Headline.vue +44 -27
- package/src/components/Image.astro +5 -7
- package/src/components/Input.vue +143 -153
- package/src/components/Jumbotron/index.astro +143 -156
- package/src/components/Jumbotron/types.ts +28 -29
- package/src/components/Jumbotron/variants/Default.astro +44 -40
- package/src/components/Jumbotron/variants/Hero.astro +45 -53
- package/src/components/Jumbotron/variants/Post.astro +68 -64
- package/src/components/Jumbotron/variants/PostSplit.astro +89 -81
- package/src/components/Jumbotron.astro +12 -12
- package/src/components/LanguageSuggestion.astro +66 -69
- package/src/components/LeftSidebar.astro +10 -10
- package/src/components/MainColors.vue +2 -2
- package/src/components/MainInput.vue +6 -3
- package/src/components/Modal.astro +2 -2
- package/src/components/PartNumber.vue +2 -3
- package/src/components/Post/PostCategories.astro +2 -4
- package/src/components/Post/PostCategories.vue +2 -2
- package/src/components/PostHeader.astro +4 -6
- package/src/components/PrCode.vue +20 -19
- package/src/components/Product/ProductButton.vue +2 -5
- package/src/components/Product/ProductCarousel.astro +38 -27
- package/src/components/Product/ProductColors.vue +46 -42
- package/src/components/Product/ProductDetailName.vue +22 -22
- package/src/components/Product/ProductDetails.vue +115 -99
- package/src/components/Product/ProductDoc.vue +27 -25
- package/src/components/Product/ProductEngineType.vue +13 -10
- package/src/components/Product/ProductImage.astro +18 -19
- package/src/components/Product/ProductLink.vue +55 -58
- package/src/components/Product/ProductLinkInfo.astro +15 -18
- package/src/components/Product/ProductModel.vue +25 -24
- package/src/components/Product/ProductModels.vue +29 -33
- package/src/components/Product/ProductName.vue +15 -15
- package/src/components/Product/ProductNumber.astro +23 -31
- package/src/components/Product/ProductPositions.vue +32 -34
- package/src/components/ProductCarousel.astro +5 -5
- package/src/components/ProductCodes.vue +12 -14
- package/src/components/ProductDetailName.vue +18 -20
- package/src/components/ProductDetailsList.vue +48 -27
- package/src/components/Quote.vue +8 -6
- package/src/components/ReloadPrompt.astro +39 -47
- package/src/components/SlimBanner.vue +44 -19
- package/src/components/Table.vue +4 -6
- package/src/components/Translations.vue +17 -8
- package/src/components/flags/FlagPL.vue +4 -3
- package/src/components/flags/FlagUA.vue +2 -2
- package/src/components/layout/CallToAction.astro +17 -12
- package/src/components/layout/Container.astro +3 -1
- package/src/components/layout/Header.astro +12 -21
- package/src/config.ts +43 -43
- package/src/design.config.ts +63 -63
- package/src/env.d.ts +4 -4
- package/src/layouts/Layout.astro +10 -19
- package/src/layouts/MainLayout.astro +13 -19
- package/src/layouts/partials/FooterCommon.astro +2 -2
- package/src/layouts/partials/HeadCommon.astro +9 -9
- package/src/layouts/partials/HeadSEO.astro +12 -5
- package/src/pages/components/icons.astro +130 -121
- package/src/pages/core/shadows.astro +18 -11
- package/src/pages/index.astro +178 -75
- package/src/pwa.ts +4 -4
- package/src/styles/base/base.css +14 -19
- package/src/styles/base/grid.css +54 -58
- package/src/styles/base/typography.css +40 -40
- package/src/styles/content.css +25 -23
- package/src/styles/main.css +5 -6
- package/src/types/Product.ts +31 -31
- package/src/types/astro.d.ts +1 -1
- package/src/types/index.ts +234 -237
- package/src/utils/api/getCategories.ts +9 -9
- package/src/utils/category/getMainCategoryList.ts +22 -22
- package/src/utils/category/getSortedCategories.ts +7 -11
- package/src/utils/product/getPriceFormatted.ts +14 -11
- package/src/utils/product/getProductChecklist.ts +10 -11
- package/src/utils/product/useFormatProductNumber.ts +18 -9
- package/src/utils/seo/getShorterDescription.ts +6 -4
- package/src/utils/text/formatDate.ts +2 -3
- package/src/utils/text/formatLocaleNumber.ts +2 -2
- package/src/utils/text/formatPad.ts +2 -2
- package/src/utils/text/getNumberFormatted.ts +10 -10
- package/src/utils/text/getTranslatedLink.ts +3 -3
- package/src/utils/text.ts +11 -8
|
@@ -3,27 +3,30 @@
|
|
|
3
3
|
VAG group (VW/Audi/Skoda/Seat/Porsche/Bentley/Lamborghini/Ducati/Cupra/Scania/MAN) manufacturer PR-Code
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import type { PropType } from 'vue'
|
|
6
|
+
import type { PropType } from 'vue';
|
|
7
7
|
|
|
8
8
|
const props = defineProps({
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
})
|
|
9
|
+
prcode: {
|
|
10
|
+
type: String,
|
|
11
|
+
default: null,
|
|
12
|
+
required: true,
|
|
13
|
+
},
|
|
14
|
+
isPdp: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false,
|
|
17
|
+
required: false,
|
|
18
|
+
},
|
|
19
|
+
});
|
|
20
20
|
</script>
|
|
21
21
|
|
|
22
22
|
<template>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
<span
|
|
24
|
+
data-pagefind-filter="PR-Code"
|
|
25
|
+
class="btn-prcode"
|
|
26
|
+
:class="`btn-prcode--${props.prcode} ${props.isPdp ? ' btn-prcode--pdp' : ''}`"
|
|
27
|
+
>
|
|
28
|
+
{{ props.prcode }}
|
|
29
|
+
</span>
|
|
27
30
|
</template>
|
|
28
31
|
|
|
29
32
|
<style>
|
|
@@ -137,6 +140,4 @@ const props = defineProps({
|
|
|
137
140
|
.btn-prcode--2JD::before {
|
|
138
141
|
content: 'GTI';
|
|
139
142
|
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
</style>
|
|
143
|
+
</style>
|
|
@@ -5,14 +5,11 @@ const props = defineProps({
|
|
|
5
5
|
default: false,
|
|
6
6
|
required: false,
|
|
7
7
|
},
|
|
8
|
-
})
|
|
8
|
+
});
|
|
9
9
|
</script>
|
|
10
10
|
|
|
11
11
|
<template>
|
|
12
|
-
<button
|
|
13
|
-
class="product-button"
|
|
14
|
-
:class="props.shadow ? 'drop-shadow hover:(drop-shadow-md)' : ''"
|
|
15
|
-
>
|
|
12
|
+
<button class="product-button" :class="props.shadow ? 'drop-shadow hover:(drop-shadow-md)' : ''">
|
|
16
13
|
<slot />
|
|
17
14
|
</button>
|
|
18
15
|
</template>
|
|
@@ -1,36 +1,47 @@
|
|
|
1
1
|
---
|
|
2
|
-
import ProductLink from
|
|
2
|
+
import ProductLink from './ProductLink.astro';
|
|
3
3
|
|
|
4
4
|
// Get the product directly from the prop on render
|
|
5
5
|
const { locale, class: className, products, isShopProduct = false, ...rest } = Astro.props;
|
|
6
|
-
|
|
7
6
|
---
|
|
8
7
|
|
|
9
|
-
|
|
10
8
|
{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
9
|
+
products && products.length && (
|
|
10
|
+
<swiper-container
|
|
11
|
+
slides-per-view="auto"
|
|
12
|
+
space-between="0"
|
|
13
|
+
class="flex"
|
|
14
|
+
itemscope
|
|
15
|
+
itemtype="https://schema.org/ItemList"
|
|
16
|
+
>
|
|
17
|
+
{products.map((product, index) => (
|
|
18
|
+
<swiper-slide
|
|
19
|
+
class="product-carousel"
|
|
20
|
+
itemprop="itemListElement"
|
|
21
|
+
itemscope
|
|
22
|
+
itemtype="https://schema.org/ListItem"
|
|
23
|
+
>
|
|
24
|
+
<ProductLink
|
|
25
|
+
productObject={product}
|
|
26
|
+
locale={locale}
|
|
27
|
+
index={index + 1}
|
|
28
|
+
bigTile
|
|
29
|
+
loading="eager"
|
|
30
|
+
isShopProduct={isShopProduct}
|
|
31
|
+
/>
|
|
32
|
+
<div class="swiper-lazy-preloader" />
|
|
33
|
+
</swiper-slide>
|
|
34
|
+
))}
|
|
35
|
+
</swiper-container>
|
|
36
|
+
)
|
|
37
|
+
}
|
|
30
38
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
39
|
+
<style>
|
|
40
|
+
.similar-section {
|
|
41
|
+
@apply relative z-20;
|
|
42
|
+
|
|
43
|
+
&:hover {
|
|
44
|
+
content-visibility: visible;
|
|
34
45
|
}
|
|
35
|
-
|
|
36
|
-
|
|
46
|
+
}
|
|
47
|
+
</style>
|
|
@@ -1,42 +1,46 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import type { PropType } from 'vue'
|
|
3
|
-
|
|
4
|
-
const props = defineProps({
|
|
5
|
-
colors: {
|
|
6
|
-
type: Array as PropType<{id: number
|
|
7
|
-
default: null,
|
|
8
|
-
required: true,
|
|
9
|
-
},
|
|
10
|
-
small: {
|
|
11
|
-
type: Boolean,
|
|
12
|
-
required: false,
|
|
13
|
-
},
|
|
14
|
-
isPdp: {
|
|
15
|
-
type: Boolean,
|
|
16
|
-
required: false,
|
|
17
|
-
default: false,
|
|
18
|
-
},
|
|
19
|
-
filterName: {
|
|
20
|
-
type: String,
|
|
21
|
-
required: false,
|
|
22
|
-
default: 'Color'
|
|
23
|
-
}
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
colors: {
|
|
6
|
+
type: Array as PropType<{ id: number; slug: string; name: string }[]>,
|
|
7
|
+
default: null,
|
|
8
|
+
required: true,
|
|
9
|
+
},
|
|
10
|
+
small: {
|
|
11
|
+
type: Boolean,
|
|
12
|
+
required: false,
|
|
13
|
+
},
|
|
14
|
+
isPdp: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
required: false,
|
|
17
|
+
default: false,
|
|
18
|
+
},
|
|
19
|
+
filterName: {
|
|
20
|
+
type: String,
|
|
21
|
+
required: false,
|
|
22
|
+
default: 'Color',
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<span
|
|
29
|
+
v-for="(color, index) in colors"
|
|
30
|
+
:key="index"
|
|
31
|
+
class="product-color"
|
|
32
|
+
:data-pagefind-filter="filterName"
|
|
33
|
+
>
|
|
34
|
+
{{ color.name }}
|
|
35
|
+
</span>
|
|
36
|
+
</template>
|
|
37
|
+
|
|
38
|
+
<style>
|
|
39
|
+
.product-color:not(:last-child) {
|
|
40
|
+
@apply mr-1;
|
|
41
|
+
|
|
42
|
+
&:after {
|
|
43
|
+
content: ',';
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
</style>
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
const props = defineProps({
|
|
3
|
-
text: {
|
|
4
|
-
type: String,
|
|
5
|
-
default: '',
|
|
6
|
-
required: true,
|
|
7
|
-
},
|
|
8
|
-
styles: {
|
|
9
|
-
type: String,
|
|
10
|
-
default: '',
|
|
11
|
-
required: false,
|
|
12
|
-
}
|
|
13
|
-
})
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<template>
|
|
17
|
-
<div class="font-bold detail-name w-full sm:w-50 flex">
|
|
18
|
-
<span class="colon-after" :class="styles && styles.length ? styles : 'mt-auto'">
|
|
19
|
-
{{ props.text }}
|
|
20
|
-
</span>
|
|
21
|
-
</div>
|
|
22
|
-
</template>
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
text: {
|
|
4
|
+
type: String,
|
|
5
|
+
default: '',
|
|
6
|
+
required: true,
|
|
7
|
+
},
|
|
8
|
+
styles: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: '',
|
|
11
|
+
required: false,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div class="font-bold detail-name w-full sm:w-50 flex">
|
|
18
|
+
<span class="colon-after" :class="styles && styles.length ? styles : 'mt-auto'">
|
|
19
|
+
{{ props.text }}
|
|
20
|
+
</span>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
@@ -1,99 +1,115 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import type { PropType } from 'vue'
|
|
3
|
-
import type { DetailList, DetailObject } from '../../types/index'
|
|
4
|
-
import ProductDetailName from './ProductDetailName.vue'
|
|
5
|
-
import {getTranslation} from
|
|
6
|
-
// import ProductColors from "@components/Product/ProductColors.vue"
|
|
7
|
-
|
|
8
|
-
const props = defineProps({
|
|
9
|
-
details: {
|
|
10
|
-
type: Array as PropType<DetailList[]> | null,
|
|
11
|
-
default: null,
|
|
12
|
-
required: false,
|
|
13
|
-
},
|
|
14
|
-
small: {
|
|
15
|
-
type: Boolean,
|
|
16
|
-
required: false,
|
|
17
|
-
},
|
|
18
|
-
colors: {
|
|
19
|
-
type: Array as PropType<string[] | null>,
|
|
20
|
-
default: null,
|
|
21
|
-
required: false,
|
|
22
|
-
},
|
|
23
|
-
locale: {
|
|
24
|
-
type: String,
|
|
25
|
-
default: 'en',
|
|
26
|
-
required: false,
|
|
27
|
-
},
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
<template
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
</
|
|
51
|
-
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
<span
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
<
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
</
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { PropType } from 'vue';
|
|
3
|
+
import type { DetailList, DetailObject } from '../../types/index';
|
|
4
|
+
import ProductDetailName from './ProductDetailName.vue';
|
|
5
|
+
import { getTranslation } from '../../utils/text';
|
|
6
|
+
// import ProductColors from "@components/Product/ProductColors.vue"
|
|
7
|
+
|
|
8
|
+
const props = defineProps({
|
|
9
|
+
details: {
|
|
10
|
+
type: Array as PropType<DetailList[]> | null,
|
|
11
|
+
default: null,
|
|
12
|
+
required: false,
|
|
13
|
+
},
|
|
14
|
+
small: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
required: false,
|
|
17
|
+
},
|
|
18
|
+
colors: {
|
|
19
|
+
type: Array as PropType<string[] | null>,
|
|
20
|
+
default: null,
|
|
21
|
+
required: false,
|
|
22
|
+
},
|
|
23
|
+
locale: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: 'en',
|
|
26
|
+
required: false,
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
</script>
|
|
30
|
+
|
|
31
|
+
<template>
|
|
32
|
+
<template
|
|
33
|
+
v-for="(detail, index) in details"
|
|
34
|
+
:key="index"
|
|
35
|
+
class=""
|
|
36
|
+
v-if="details && details.length"
|
|
37
|
+
>
|
|
38
|
+
<!-- PDP PAGE - PRODUCT ROW -->
|
|
39
|
+
<!-- <pre>{{ JSON.stringify(details) }}</pre> -->
|
|
40
|
+
<li
|
|
41
|
+
v-if="props.small"
|
|
42
|
+
class="text-xs md:text-sm text-slate-darkest dark:text-neutral-light leading-tight font-textlight md:font-textregular"
|
|
43
|
+
>
|
|
44
|
+
<span v-if="detail.id" class="inline-block mr-1 items--0">
|
|
45
|
+
{{ getTranslation(`detail.${detail.id}`) }}:
|
|
46
|
+
</span>
|
|
47
|
+
|
|
48
|
+
<span v-if="detail.translated" :class="detail.id ? 'font-semibold' : ''" class="items--1">
|
|
49
|
+
{{ detail.value }}
|
|
50
|
+
</span>
|
|
51
|
+
|
|
52
|
+
<div
|
|
53
|
+
v-else-if="detail.value !== undefined && detail.id === 'color' && detail.isArrayValue"
|
|
54
|
+
class="items--2 inline-block"
|
|
55
|
+
>
|
|
56
|
+
<span class="comma" v-for="(color, indexColor) in detail.value" :key="indexColor">
|
|
57
|
+
{{ color['name'] }}
|
|
58
|
+
</span>
|
|
59
|
+
</div>
|
|
60
|
+
|
|
61
|
+
<span v-else-if="detail.id !== 'paint-marks' && !detail.isArrayValue" class="items--3">
|
|
62
|
+
{{ locale === 'en' ? String(detail.value).replace(/,/g, '.') : String(detail.value) }}
|
|
63
|
+
</span>
|
|
64
|
+
|
|
65
|
+
<span v-else-if="detail.id && detail.id === 'paint-marks'" class="items items--4">
|
|
66
|
+
{{ detail.value }}
|
|
67
|
+
<!-- <span v-for="(mark, index2) in JSON.parse(String(detail.value))" :key="index2" class="item">
|
|
68
|
+
{{ mark[0] }} x <span>{{ getTranslation(`color.${mark[1]}`) }}</span>
|
|
69
|
+
</span> -->
|
|
70
|
+
</span>
|
|
71
|
+
</li>
|
|
72
|
+
|
|
73
|
+
<div
|
|
74
|
+
v-else
|
|
75
|
+
class="text-sm mt-1 md:mt-4 mb-4 grid grid-cols-2 sm:(grid-cols-details-desktop grid-flow-col auto-cols-max) gap-4"
|
|
76
|
+
>
|
|
77
|
+
<!-- PRODUCT CARD -->
|
|
78
|
+
<ProductDetailName v-if="detail.id" :text="getTranslation(`detail.${detail.id}`)" />
|
|
79
|
+
<div v-if="detail.value" class="leading-4 flex items-end">
|
|
80
|
+
<span
|
|
81
|
+
v-if="detail.translated && !detail.isArrayValue"
|
|
82
|
+
:class="detail.id === 'light-function' ? 'whitespace-pre-line' : ''"
|
|
83
|
+
>
|
|
84
|
+
{{ getTranslation(`detail.value.${detail.value}`) }}
|
|
85
|
+
</span>
|
|
86
|
+
|
|
87
|
+
<span v-else-if="detail.id !== 'paint-marks' && !detail.isArrayValue" class="">
|
|
88
|
+
{{ detail.value }}
|
|
89
|
+
</span>
|
|
90
|
+
|
|
91
|
+
<span
|
|
92
|
+
v-else-if="
|
|
93
|
+
detail.value !== undefined && detail.id === 'for-exterior-colour' && detail.isArrayValue
|
|
94
|
+
"
|
|
95
|
+
class=""
|
|
96
|
+
>
|
|
97
|
+
<div v-for="(color, indexColor) in JSON.parse(String(detail.value))" :key="indexColor">
|
|
98
|
+
<span class="font-mono">{{ color }}</span> - {{ getTranslation(`colorCodes.${color}`) }}
|
|
99
|
+
</div>
|
|
100
|
+
</span>
|
|
101
|
+
|
|
102
|
+
<span v-else-if="detail.id && detail.id === 'paint-marks'" class="items">
|
|
103
|
+
<span v-for="(mark, index) in JSON.parse(String(detail.value))" :key="index" class="item">
|
|
104
|
+
{{ mark[0] }} x <span>{{ getTranslation(`color.${mark[1]}`) }}</span>
|
|
105
|
+
</span>
|
|
106
|
+
</span>
|
|
107
|
+
<ul v-else-if="detail.id && detail.isArrayValue" class="items">
|
|
108
|
+
<li v-for="(d, index3) in JSON.parse(String(detail.value))" :key="index3" class="item">
|
|
109
|
+
· {{ d }}
|
|
110
|
+
</li>
|
|
111
|
+
</ul>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
</template>
|
|
115
|
+
</template>
|
|
@@ -1,25 +1,27 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
const props = defineProps({
|
|
3
|
-
file: {
|
|
4
|
-
type: Object,
|
|
5
|
-
default: null,
|
|
6
|
-
required: true,
|
|
7
|
-
},
|
|
8
|
-
locale: {
|
|
9
|
-
type: String,
|
|
10
|
-
default: 'en',
|
|
11
|
-
required: false
|
|
12
|
-
}
|
|
13
|
-
})
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<template>
|
|
17
|
-
<li v-if="props.file">
|
|
18
|
-
<a
|
|
19
|
-
:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
</
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
const props = defineProps({
|
|
3
|
+
file: {
|
|
4
|
+
type: Object,
|
|
5
|
+
default: null,
|
|
6
|
+
required: true,
|
|
7
|
+
},
|
|
8
|
+
locale: {
|
|
9
|
+
type: String,
|
|
10
|
+
default: 'en',
|
|
11
|
+
required: false,
|
|
12
|
+
},
|
|
13
|
+
});
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<li v-if="props.file">
|
|
18
|
+
<a
|
|
19
|
+
:href="`${locale !== 'en' ? `/${locale}` : ''}/docs/${props.file.name}/`"
|
|
20
|
+
:title="props.file.path"
|
|
21
|
+
class="flex items-center hover:underline underline-offset-2 hover:underline-1"
|
|
22
|
+
>
|
|
23
|
+
<div i-system-uicons-document-justified class="text-blue-lightest dark:text-accent-light" />
|
|
24
|
+
<span>{{ props.file.name }}</span>
|
|
25
|
+
</a>
|
|
26
|
+
</li>
|
|
27
|
+
</template>
|
|
@@ -4,17 +4,20 @@ interface Engine {
|
|
|
4
4
|
name: string;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
const props = withDefaults(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
const props = withDefaults(
|
|
8
|
+
defineProps<{
|
|
9
|
+
engines: Engine[];
|
|
10
|
+
}>(),
|
|
11
|
+
{
|
|
12
|
+
engines: () => [],
|
|
13
|
+
}
|
|
14
|
+
);
|
|
12
15
|
</script>
|
|
13
16
|
|
|
14
17
|
<template>
|
|
15
18
|
<ul v-if="engines.length" class="engine-types">
|
|
16
|
-
<li
|
|
17
|
-
v-for="(engine, index) in engines"
|
|
19
|
+
<li
|
|
20
|
+
v-for="(engine, index) in engines"
|
|
18
21
|
:key="engine.id"
|
|
19
22
|
class="engine-type"
|
|
20
23
|
:class="{ 'with-comma': index !== engines.length - 1 }"
|
|
@@ -24,7 +27,7 @@ const props = withDefaults(defineProps<{
|
|
|
24
27
|
</ul>
|
|
25
28
|
</template>
|
|
26
29
|
|
|
27
|
-
<style
|
|
30
|
+
<style>
|
|
28
31
|
.engine-types {
|
|
29
32
|
@apply flex flex-wrap items-center;
|
|
30
33
|
}
|
|
@@ -34,10 +37,10 @@ const props = withDefaults(defineProps<{
|
|
|
34
37
|
|
|
35
38
|
&.with-comma {
|
|
36
39
|
@apply mr-1;
|
|
37
|
-
|
|
40
|
+
|
|
38
41
|
&:after {
|
|
39
42
|
content: ',';
|
|
40
43
|
}
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
|
-
</style>
|
|
46
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
import { Image } from 'astro:assets'
|
|
2
|
+
import { Image } from 'astro:assets';
|
|
3
3
|
interface ImageObject {
|
|
4
4
|
src: string;
|
|
5
5
|
alt?: string;
|
|
@@ -11,31 +11,30 @@ interface ImageObject {
|
|
|
11
11
|
index?: number;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
const { imageObject } = Astro.props as { imageObject: ImageObject
|
|
14
|
+
const { imageObject } = Astro.props as { imageObject: ImageObject };
|
|
15
15
|
|
|
16
16
|
let inputProps = {};
|
|
17
17
|
|
|
18
|
-
|
|
19
18
|
if (imageObject.index && imageObject.index === 1) {
|
|
20
19
|
inputProps['data-pagefind-meta'] = 'image[src], image_alt[alt]';
|
|
21
|
-
imageObject.loading = 'eager'
|
|
20
|
+
imageObject.loading = 'eager';
|
|
22
21
|
}
|
|
23
22
|
|
|
24
23
|
if (imageObject.srcset && imageObject.srcset.length) {
|
|
25
|
-
inputProps['widths'] = imageObject.srcset
|
|
24
|
+
inputProps['widths'] = imageObject.srcset;
|
|
26
25
|
}
|
|
27
|
-
|
|
28
26
|
---
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
27
|
+
|
|
28
|
+
<Image
|
|
29
|
+
src={imageObject.src}
|
|
30
|
+
alt={imageObject.alt}
|
|
31
|
+
height={Number(imageObject.height)}
|
|
32
|
+
width={Number(imageObject.width)}
|
|
33
|
+
loading={imageObject.loading ? imageObject.loading : 'lazy'}
|
|
34
|
+
itemprop="image"
|
|
35
|
+
format="avif"
|
|
36
|
+
data-pagefind-index-attrs={imageObject.alt}
|
|
37
|
+
onerror="this.style.display='none';"
|
|
38
|
+
class={`product-image ${imageObject.class || ''}`}
|
|
39
|
+
{...inputProps}
|
|
40
|
+
/>
|