spoko-design-system 0.2.45 → 0.2.48
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/index.ts +8 -0
- package/package.json +1 -1
- package/src/components/Breadcrumbs.vue +17 -20
- package/src/components/Category/CategoriesCarousel.astro +2 -2
- package/src/components/Category/CategoriesSidebar.astro +1 -1
- package/src/components/Category/CategoryDetails.astro +1 -1
- package/src/components/Category/CategorySection.astro +1 -1
- package/src/components/FeaturesList.vue +1 -1
- package/src/components/FuckRussia.vue +17 -35
- package/src/components/HandDrive.astro +1 -1
- package/src/components/Header/Header.astro +151 -155
- package/src/components/Headline.vue +1 -1
- package/src/components/Jumbatron.vue +1 -1
- package/src/components/Modal.astro +1 -1
- package/src/components/PostHeader.astro +1 -1
- package/src/components/PrCode.vue +111 -126
- package/src/components/Product/ProductCodes.vue +103 -96
- package/src/components/Product/ProductColors.vue +42 -0
- package/src/components/Product/ProductDetailName.vue +22 -0
- package/src/components/Product/ProductDetails.vue +99 -0
- package/src/components/Product/ProductDoc.vue +25 -0
- package/src/components/Product/ProductEngineType.vue +1 -1
- package/src/components/Product/ProductModel.vue +24 -0
- package/src/components/Product/ProductModels.vue +31 -0
- package/src/components/Product/ProductName.vue +15 -0
- package/src/components/Product/ProductPositions.vue +34 -0
- package/src/components/ProductDetailName.vue +2 -2
- package/src/components/ProductDetailsList.vue +1 -1
- package/src/components/layout/Header.astro +1 -1
- package/tsconfig.json +1 -1
|
@@ -26,132 +26,117 @@ const props = defineProps({
|
|
|
26
26
|
</span>
|
|
27
27
|
</template>
|
|
28
28
|
|
|
29
|
-
<style
|
|
30
|
-
.btn-prcode {
|
|
31
|
-
|
|
32
|
-
|
|
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
|
-
&--1ZD,
|
|
75
|
-
&--1ZC,
|
|
76
|
-
&--1LN {
|
|
77
|
-
&:before {
|
|
78
|
-
content: '⌀ 288 mm; LUCAS';
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
&--2JZ {
|
|
83
|
-
@apply: text-lightBlue-500;
|
|
84
|
-
|
|
85
|
-
&:before {
|
|
86
|
-
content: 'Bluemotion';
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
&--7L6 {
|
|
91
|
-
@apply: text-lightBlue-500;
|
|
92
|
-
|
|
93
|
-
&:before {
|
|
94
|
-
content: 'Bluemotion (CFWA + start-stop)';
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
&--1KK,
|
|
99
|
-
&--1KT,
|
|
100
|
-
&--1KV,
|
|
101
|
-
&--1LV,
|
|
102
|
-
&--2EJ {
|
|
103
|
-
&:before {
|
|
104
|
-
content: '⌀ 230 mm';
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
&--2JE {
|
|
109
|
-
@apply text-lightBlue-700;
|
|
110
|
-
|
|
111
|
-
&:before {
|
|
112
|
-
content: 'BlueGT';
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
&--2JP {
|
|
117
|
-
&:before {
|
|
118
|
-
content: 'R-Line';
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
// WRC Street R
|
|
123
|
-
&--E5M,
|
|
124
|
-
|
|
125
|
-
// emblems/stickers
|
|
126
|
-
&--1KD,
|
|
127
|
-
|
|
128
|
-
//brakes
|
|
129
|
-
&--1ZP,
|
|
130
|
-
|
|
131
|
-
//brakes
|
|
132
|
-
&--2JQ,
|
|
133
|
-
|
|
134
|
-
//bumpers / engine parts
|
|
135
|
-
&--TA2 {
|
|
136
|
-
color: blue;
|
|
137
|
-
|
|
138
|
-
&:before {
|
|
139
|
-
content: 'R WRC Street';
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// GTI
|
|
144
|
-
&--1KV,
|
|
145
|
-
&--1ZD,
|
|
146
|
-
&--1ZR,
|
|
147
|
-
&--0NH,
|
|
148
|
-
&--2JD {
|
|
149
|
-
color: red;
|
|
150
|
-
|
|
151
|
-
&:before {
|
|
152
|
-
content: 'GTI';
|
|
153
|
-
}
|
|
154
|
-
}
|
|
29
|
+
<style scoped>
|
|
30
|
+
.btn-prcode--pdp {
|
|
31
|
+
@apply mb-1;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.btn-prcode::before {
|
|
35
|
+
@apply rounded-2 shadow-sm py-0.5 px-2 bg-gray-100 whitespace-nowrap text-xs dark:text-black dark:bg-lightBlue-500 text-center z-50;
|
|
36
|
+
display: none;
|
|
37
|
+
position: absolute;
|
|
38
|
+
top: -10px;
|
|
39
|
+
transform: translateY(-50%) translateX(-50%);
|
|
40
|
+
left: 50%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.btn-prcode:hover::before {
|
|
44
|
+
display: block;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.btn-prcode--2JK {
|
|
48
|
+
color: #f3881d;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.btn-prcode--2JK::before {
|
|
52
|
+
content: 'CROSS';
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.btn-prcode--1LR::before,
|
|
56
|
+
.btn-prcode--1ZG::before,
|
|
57
|
+
.btn-prcode--1ZJ::before {
|
|
58
|
+
content: '⌀ 256 mm';
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.btn-prcode--1KD::before,
|
|
62
|
+
.btn-prcode--1ZP::before,
|
|
63
|
+
.btn-prcode--1ZR::before {
|
|
64
|
+
content: '⌀ 310 mm';
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.btn-prcode--1ZD::before,
|
|
68
|
+
.btn-prcode--1ZC::before,
|
|
69
|
+
.btn-prcode--1LN::before {
|
|
70
|
+
content: '⌀ 288 mm; LUCAS';
|
|
71
|
+
}
|
|
155
72
|
|
|
73
|
+
.btn-prcode--2JZ {
|
|
74
|
+
@apply text-lightBlue-500;
|
|
156
75
|
}
|
|
76
|
+
|
|
77
|
+
.btn-prcode--2JZ::before {
|
|
78
|
+
content: 'Bluemotion';
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.btn-prcode--7L6 {
|
|
82
|
+
@apply text-lightBlue-500;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.btn-prcode--7L6::before {
|
|
86
|
+
content: 'Bluemotion (CFWA + start-stop)';
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.btn-prcode--1KK::before,
|
|
90
|
+
.btn-prcode--1KT::before,
|
|
91
|
+
.btn-prcode--1KV::before,
|
|
92
|
+
.btn-prcode--1LV::before,
|
|
93
|
+
.btn-prcode--2EJ::before {
|
|
94
|
+
content: '⌀ 230 mm';
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.btn-prcode--2JE {
|
|
98
|
+
@apply text-lightBlue-700;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.btn-prcode--2JE::before {
|
|
102
|
+
content: 'BlueGT';
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.btn-prcode--2JP::before {
|
|
106
|
+
content: 'R-Line';
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.btn-prcode--E5M,
|
|
110
|
+
.btn-prcode--1KD,
|
|
111
|
+
.btn-prcode--1ZP,
|
|
112
|
+
.btn-prcode--2JQ,
|
|
113
|
+
.btn-prcode--TA2 {
|
|
114
|
+
color: blue;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.btn-prcode--E5M::before,
|
|
118
|
+
.btn-prcode--1KD::before,
|
|
119
|
+
.btn-prcode--1ZP::before,
|
|
120
|
+
.btn-prcode--2JQ::before,
|
|
121
|
+
.btn-prcode--TA2::before {
|
|
122
|
+
content: 'R WRC Street';
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.btn-prcode--1KV,
|
|
126
|
+
.btn-prcode--1ZD,
|
|
127
|
+
.btn-prcode--1ZR,
|
|
128
|
+
.btn-prcode--0NH,
|
|
129
|
+
.btn-prcode--2JD {
|
|
130
|
+
color: red;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.btn-prcode--1KV::before,
|
|
134
|
+
.btn-prcode--1ZD::before,
|
|
135
|
+
.btn-prcode--1ZR::before,
|
|
136
|
+
.btn-prcode--0NH::before,
|
|
137
|
+
.btn-prcode--2JD::before {
|
|
138
|
+
content: 'GTI';
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
|
|
157
142
|
</style>
|
|
@@ -45,123 +45,130 @@ const settings = {
|
|
|
45
45
|
|
|
46
46
|
</template>
|
|
47
47
|
|
|
48
|
-
<style
|
|
48
|
+
<style scoped>
|
|
49
49
|
.btn-prcode {
|
|
50
50
|
@apply relative inline-block leading-none px-1 py-0.5 mr-1 cursor-pointer font-mono border-solid border-1 border-gray-200 select-none text-gray-500 last:mr-0 dark:border-white dark:border-opacity-10 dark:text-gray-300 dark:bg-white dark:bg-opacity-30 not-last:mr-2 not-last:after:content-[+] dark:after:text-white/50 after:pl-0.5 after:text-blue-700 after:absolute after:w-4 text-center;
|
|
51
|
+
}
|
|
51
52
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
53
|
+
.btn-prcode--pdp {
|
|
54
|
+
@apply mb-1;
|
|
55
|
+
}
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
z-index: 50;
|
|
67
|
-
}
|
|
57
|
+
.btn-prcode::before {
|
|
58
|
+
@apply rounded-2 shadow-sm py-0.5 px-2 bg-gray-100 whitespace-nowrap text-xs dark:text-black dark:bg-lightBlue-500;
|
|
59
|
+
display: none;
|
|
60
|
+
position: absolute;
|
|
61
|
+
text-align: center;
|
|
62
|
+
top: -10px;
|
|
63
|
+
transform: translateY(-50%) translateX(-50%);
|
|
64
|
+
left: 50%;
|
|
65
|
+
z-index: 50;
|
|
66
|
+
}
|
|
68
67
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
.btn-prcode:hover::before {
|
|
69
|
+
display: block;
|
|
70
|
+
}
|
|
72
71
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
content: 'CROSS';
|
|
77
|
-
}
|
|
78
|
-
}
|
|
72
|
+
.btn-prcode--2JK {
|
|
73
|
+
color: #f3881d;
|
|
74
|
+
}
|
|
79
75
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
&:before {
|
|
84
|
-
content: '⌀ 256 mm';
|
|
85
|
-
}
|
|
86
|
-
}
|
|
76
|
+
.btn-prcode--2JK::before {
|
|
77
|
+
content: 'CROSS';
|
|
78
|
+
}
|
|
87
79
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
80
|
+
.btn-prcode--1LR,
|
|
81
|
+
.btn-prcode--1ZG,
|
|
82
|
+
.btn-prcode--1ZJ {
|
|
83
|
+
&::before {
|
|
84
|
+
content: '⌀ 256 mm';
|
|
94
85
|
}
|
|
86
|
+
}
|
|
95
87
|
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
}
|
|
88
|
+
.btn-prcode--1KD,
|
|
89
|
+
.btn-prcode--1ZP,
|
|
90
|
+
.btn-prcode--1ZR {
|
|
91
|
+
&::before {
|
|
92
|
+
content: '⌀ 310 mm';
|
|
102
93
|
}
|
|
94
|
+
}
|
|
103
95
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
96
|
+
.btn-prcode--1ZD,
|
|
97
|
+
.btn-prcode--1ZC,
|
|
98
|
+
.btn-prcode--1LN {
|
|
99
|
+
&::before {
|
|
100
|
+
content: '⌀ 288 mm; LUCAS';
|
|
109
101
|
}
|
|
102
|
+
}
|
|
110
103
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
content: 'Bluemotion (CFWA + start-stop)';
|
|
115
|
-
}
|
|
116
|
-
}
|
|
104
|
+
.btn-prcode--2JZ {
|
|
105
|
+
@apply text-lightBlue-500;
|
|
106
|
+
}
|
|
117
107
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
&--1LV,
|
|
122
|
-
&--2EJ {
|
|
123
|
-
&:before {
|
|
124
|
-
content: '⌀ 230 mm';
|
|
125
|
-
}
|
|
126
|
-
}
|
|
108
|
+
.btn-prcode--2JZ::before {
|
|
109
|
+
content: 'Bluemotion';
|
|
110
|
+
}
|
|
127
111
|
|
|
128
|
-
|
|
129
|
-
|
|
112
|
+
.btn-prcode--7L6 {
|
|
113
|
+
@apply text-lightBlue-500;
|
|
114
|
+
}
|
|
130
115
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
}
|
|
116
|
+
.btn-prcode--7L6::before {
|
|
117
|
+
content: 'Bluemotion (CFWA + start-stop)';
|
|
118
|
+
}
|
|
135
119
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
120
|
+
.btn-prcode--1KK,
|
|
121
|
+
.btn-prcode--1KT,
|
|
122
|
+
.btn-prcode--1KV,
|
|
123
|
+
.btn-prcode--1LV,
|
|
124
|
+
.btn-prcode--2EJ {
|
|
125
|
+
&::before {
|
|
126
|
+
content: '⌀ 230 mm';
|
|
140
127
|
}
|
|
128
|
+
}
|
|
141
129
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
&--1ZP, //brakes
|
|
146
|
-
&--2JQ,//bumpers
|
|
147
|
-
&--TA2 { //engine parts
|
|
148
|
-
color: blue;
|
|
149
|
-
&:before {
|
|
150
|
-
content: 'R WRC Street';
|
|
151
|
-
}
|
|
152
|
-
}
|
|
130
|
+
.btn-prcode--2JE {
|
|
131
|
+
@apply text-lightBlue-700;
|
|
132
|
+
}
|
|
153
133
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
&--1ZR,
|
|
158
|
-
&--0NH,
|
|
159
|
-
&--2JD {
|
|
160
|
-
color: red;
|
|
161
|
-
&:before {
|
|
162
|
-
content: 'GTI';
|
|
163
|
-
}
|
|
164
|
-
}
|
|
134
|
+
.btn-prcode--2JE::before {
|
|
135
|
+
content: 'BlueGT';
|
|
136
|
+
}
|
|
165
137
|
|
|
138
|
+
.btn-prcode--2JP::before {
|
|
139
|
+
content: 'R-Line';
|
|
166
140
|
}
|
|
141
|
+
|
|
142
|
+
.btn-prcode--E5M,
|
|
143
|
+
.btn-prcode--1KD,
|
|
144
|
+
.btn-prcode--1ZP,
|
|
145
|
+
.btn-prcode--2JQ,
|
|
146
|
+
.btn-prcode--TA2 {
|
|
147
|
+
color: blue;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.btn-prcode--E5M::before,
|
|
151
|
+
.btn-prcode--1KD::before,
|
|
152
|
+
.btn-prcode--1ZP::before,
|
|
153
|
+
.btn-prcode--2JQ::before,
|
|
154
|
+
.btn-prcode--TA2::before {
|
|
155
|
+
content: 'R WRC Street';
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
.btn-prcode--1KV,
|
|
159
|
+
.btn-prcode--1ZD,
|
|
160
|
+
.btn-prcode--1ZR,
|
|
161
|
+
.btn-prcode--0NH,
|
|
162
|
+
.btn-prcode--2JD {
|
|
163
|
+
color: red;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.btn-prcode--1KV::before,
|
|
167
|
+
.btn-prcode--1ZD::before,
|
|
168
|
+
.btn-prcode--1ZR::before,
|
|
169
|
+
.btn-prcode--0NH::before,
|
|
170
|
+
.btn-prcode--2JD::before {
|
|
171
|
+
content: 'GTI';
|
|
172
|
+
}
|
|
173
|
+
|
|
167
174
|
</style>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { PropType } from 'vue'
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
colors: {
|
|
6
|
+
type: Object 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
|
+
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<span v-for="(color, index) in colors" :key="index" class="product-color" :data-pagefind-filter="filterName">
|
|
30
|
+
{{ color.name }}
|
|
31
|
+
</span>
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<style >
|
|
35
|
+
.product-color:not(:last-child) {
|
|
36
|
+
@apply mr-1;
|
|
37
|
+
|
|
38
|
+
&:after {
|
|
39
|
+
content: ','
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
</style>
|
|
@@ -0,0 +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>
|
|
@@ -0,0 +1,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
|
+
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<template>
|
|
33
|
+
<template v-for="(detail, index) in details" :key="index" class="" v-if="details && details.length">
|
|
34
|
+
<!-- PDP PAGE - PRODUCT ROW -->
|
|
35
|
+
<!-- <pre>{{ JSON.stringify(details) }}</pre> -->
|
|
36
|
+
<li v-if="props.small" class="text-xs md:text-sm text-gray-900 dark:text-gray-300 leading-tight font-textlight md:font-textregular">
|
|
37
|
+
|
|
38
|
+
<span v-if="detail.id" class="inline-block mr-1 items--0">
|
|
39
|
+
{{ getTranslation(`detail.${detail.id}`) }}:
|
|
40
|
+
</span>
|
|
41
|
+
|
|
42
|
+
<span v-if="detail.translated" :class="detail.id ? 'font-semibold' : ''" class="items--1">
|
|
43
|
+
{{ detail.value }}
|
|
44
|
+
</span>
|
|
45
|
+
|
|
46
|
+
<div v-else-if="detail.value !== undefined && detail.id === 'color' && detail.isArrayValue" class="items--2 inline-block">
|
|
47
|
+
<span class="comma" v-for="(color, indexColor) in detail.value" :key="indexColor">
|
|
48
|
+
{{ color['name'] }}
|
|
49
|
+
</span>
|
|
50
|
+
</div>
|
|
51
|
+
|
|
52
|
+
<span v-else-if="detail.id !== 'paint-marks' && !detail.isArrayValue" class="items--3">
|
|
53
|
+
{{ locale === 'en' ? String(detail.value).replace(/,/g, '.') : String(detail.value) }}
|
|
54
|
+
</span>
|
|
55
|
+
|
|
56
|
+
<span v-else-if="detail.id && detail.id === 'paint-marks'" class="items items--4">
|
|
57
|
+
{{ detail.value }}
|
|
58
|
+
<!-- <span v-for="(mark, index2) in JSON.parse(String(detail.value))" :key="index2" class="item">
|
|
59
|
+
{{ mark[0] }} x <span>{{ getTranslation(`color.${mark[1]}`) }}</span>
|
|
60
|
+
</span> -->
|
|
61
|
+
</span>
|
|
62
|
+
|
|
63
|
+
</li>
|
|
64
|
+
|
|
65
|
+
<div v-else class="text-sm mt-1 md:mt-4 mb-4 grid grid-cols-2
|
|
66
|
+
sm:(grid-cols-details-desktop grid-flow-col auto-cols-max) gap-4">
|
|
67
|
+
<!-- PRODUCT CARD -->
|
|
68
|
+
<ProductDetailName v-if="detail.id" :text="getTranslation(`detail.${detail.id}`)" />
|
|
69
|
+
<div v-if="detail.value"
|
|
70
|
+
class="leading-4 flex items-end">
|
|
71
|
+
|
|
72
|
+
<span v-if="detail.translated && !detail.isArrayValue" :class="detail.id === 'light-function' ? 'whitespace-pre-line' : ''">
|
|
73
|
+
{{ getTranslation(`detail.value.${detail.value}`) }}
|
|
74
|
+
</span>
|
|
75
|
+
|
|
76
|
+
<span v-else-if="detail.id !== 'paint-marks' && !detail.isArrayValue" class="">
|
|
77
|
+
{{ detail.value }}
|
|
78
|
+
</span>
|
|
79
|
+
|
|
80
|
+
<span v-else-if="detail.value !== undefined && detail.id === 'for-exterior-colour' && detail.isArrayValue" class="">
|
|
81
|
+
<div v-for="(color, indexColor) in JSON.parse(String(detail.value))" :key="indexColor">
|
|
82
|
+
<span class="font-mono">{{ color }}</span> - {{ getTranslation(`colorCodes.${color}`) }}
|
|
83
|
+
</div>
|
|
84
|
+
</span>
|
|
85
|
+
|
|
86
|
+
<span v-else-if="detail.id && detail.id === 'paint-marks'" class="items">
|
|
87
|
+
<span v-for="(mark, index) in JSON.parse(String(detail.value))" :key="index" class="item">
|
|
88
|
+
{{ mark[0] }} x <span>{{ getTranslation(`color.${mark[1]}`) }}</span>
|
|
89
|
+
</span>
|
|
90
|
+
</span>
|
|
91
|
+
<ul v-else-if="detail.id && detail.isArrayValue" class="items">
|
|
92
|
+
<li v-for="(d, index3) in JSON.parse(String(detail.value))" :key="index3" class="item">
|
|
93
|
+
· {{ d }}
|
|
94
|
+
</li>
|
|
95
|
+
</ul>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
</template>
|
|
99
|
+
</template>
|
|
@@ -0,0 +1,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 :href="`${locale !== 'en' ? `/${locale}` : ''}/docs/${props.file.name}/`"
|
|
19
|
+
:title="props.file.path"
|
|
20
|
+
class="flex items-center hover:underline underline-offset-2 hover:underline-1"
|
|
21
|
+
>
|
|
22
|
+
<div i-system-uicons-document-justified class="text-blue-500 dark:text-lightBlue-500" /> <span>{{ props.file.name }}</span>
|
|
23
|
+
</a>
|
|
24
|
+
</li>
|
|
25
|
+
</template>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import type { Model } from 'types/index';
|
|
3
|
+
import type { PropType } from 'vue';
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
carModel: {
|
|
7
|
+
type: Object as PropType<Model>,
|
|
8
|
+
required: true,
|
|
9
|
+
},
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
</script>
|
|
13
|
+
<template>
|
|
14
|
+
<strong class="product-model" :data-pagefind-filter="`model:${props.carModel.name}`">{{ props.carModel.name }}</strong>
|
|
15
|
+
</template>
|
|
16
|
+
<style >
|
|
17
|
+
.product-model:not(:last-child) {
|
|
18
|
+
@apply mr-1;
|
|
19
|
+
|
|
20
|
+
&:after {
|
|
21
|
+
content: ','
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
</style>
|