@lightspeed/crane 2.0.5 → 3.0.0
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/CHANGELOG.md +34 -0
- package/UPGRADE.md +96 -0
- package/dist/cli.mjs +44 -25
- package/package.json +6 -3
- package/template/blank/sections/blank-section/BlankSection.vue +9 -0
- package/template/blank/sections/blank-section/assets/blank_section_showcase_1_preview.jpg +0 -0
- package/template/blank/sections/blank-section/client.ts +6 -0
- package/template/blank/sections/blank-section/server.ts +6 -0
- package/template/blank/sections/blank-section/settings/content.ts +2 -0
- package/template/blank/sections/blank-section/settings/design.ts +2 -0
- package/template/blank/sections/blank-section/settings/layout.ts +2 -0
- package/template/blank/sections/blank-section/settings/translations.ts +8 -0
- package/template/blank/sections/blank-section/showcases/1.ts +15 -0
- package/template/blank/sections/blank-section/showcases/translations.ts +10 -0
- package/template/blank/sections/blank-section/type.ts +5 -0
- package/template/collections/assets/collection_cover_image.png +0 -0
- package/template/collections/example-collection/configuration.ts +21 -0
- package/template/crane.config.json +1 -1
- package/template/footers/example-footer/ExampleFooter.vue +4 -4
- package/template/footers/example-footer/component/LegalLinks.vue +1 -1
- package/template/footers/example-footer/component/MadeWith.vue +1 -1
- package/template/footers/example-footer/component/ReportAbuse.vue +1 -1
- package/template/footers/example-footer/settings/design.ts +5 -4
- package/template/footers/example-footer/settings/translations.ts +4 -3
- package/template/footers/example-footer/showcases/1.ts +4 -2
- package/template/footers/example-footer/showcases/translations.ts +4 -2
- package/template/headers/example-header/ExampleHeader.vue +1 -1
- package/template/headers/example-header/component/Account.vue +1 -1
- package/template/headers/example-header/component/CategoriesDropdown.vue +1 -1
- package/template/headers/example-header/component/Logo.vue +7 -7
- package/template/headers/example-header/component/NavigationMenu.vue +1 -1
- package/template/headers/example-header/settings/content.ts +8 -1
- package/template/headers/example-header/settings/design.ts +7 -1
- package/template/headers/example-header/settings/layout.ts +1 -1
- package/template/headers/example-header/settings/translations.ts +4 -2
- package/template/headers/example-header/showcases/1.ts +15 -11
- package/template/headers/example-header/showcases/2.ts +12 -8
- package/template/headers/example-header/showcases/translations.ts +4 -2
- package/template/layouts/catalog/example-catalog/components/Icon.vue +14 -14
- package/template/layouts/catalog/example-catalog/slots/custom-bottom-bar/CustomBottomBar.vue +1 -1
- package/template/package.json +1 -0
- package/template/page-templates/example-template/configuration.ts +8 -10
- package/template/page-templates/example-template/pages/catalog.ts +3 -6
- package/template/page-templates/example-template/pages/category.ts +3 -6
- package/template/page-templates/example-template/pages/home.ts +42 -57
- package/template/page-templates/example-template/pages/product.ts +3 -6
- package/template/preview/sections/preview.html +10 -6
- package/template/preview/shared/api-routes.ts +235 -102
- package/template/preview/shared/logger.ts +9 -0
- package/template/preview/shared/preview.ts +108 -72
- package/template/preview/shared/utils.ts +63 -43
- package/template/preview/ssr-server.ts +1 -1
- package/template/reference/sections/about-us/AboutUs.vue +20 -22
- package/template/reference/sections/about-us/component/Image.vue +18 -18
- package/template/reference/sections/about-us/component/Stats.vue +40 -40
- package/template/reference/sections/about-us/component/Title.vue +1 -1
- package/template/reference/sections/about-us/settings/content.ts +15 -19
- package/template/reference/sections/about-us/settings/design.ts +14 -18
- package/template/reference/sections/about-us/settings/layout.ts +7 -5
- package/template/reference/sections/about-us/settings/translations.ts +4 -2
- package/template/reference/sections/about-us/showcases/1.ts +48 -62
- package/template/reference/sections/about-us/showcases/2.ts +44 -56
- package/template/reference/sections/about-us/showcases/translations.ts +4 -2
- package/template/reference/sections/featured-products/FeaturedProducts.vue +12 -6
- package/template/reference/sections/featured-products/component/ProductItem.vue +18 -1
- package/template/reference/sections/featured-products/component/ProductPlaceholder.vue +42 -0
- package/template/reference/sections/featured-products/component/Title.vue +1 -1
- package/template/reference/sections/featured-products/settings/content.ts +8 -10
- package/template/reference/sections/featured-products/settings/design.ts +7 -7
- package/template/reference/sections/featured-products/settings/translations.ts +4 -2
- package/template/reference/sections/featured-products/showcases/1.ts +8 -12
- package/template/reference/sections/featured-products/showcases/translations.ts +4 -2
- package/template/reference/sections/intro-slider/IntroSlider.vue +6 -6
- package/template/reference/sections/intro-slider/component/Slider.vue +42 -43
- package/template/reference/sections/intro-slider/component/Title.vue +7 -7
- package/template/reference/sections/intro-slider/settings/content.ts +33 -36
- package/template/reference/sections/intro-slider/settings/design.ts +17 -22
- package/template/reference/sections/intro-slider/settings/layout.ts +6 -4
- package/template/reference/sections/intro-slider/settings/translations.ts +4 -2
- package/template/reference/sections/intro-slider/showcases/1.ts +52 -75
- package/template/reference/sections/intro-slider/showcases/2.ts +50 -72
- package/template/reference/sections/intro-slider/showcases/translations.ts +4 -2
- package/template/reference/sections/tag-lines/TagLines.vue +41 -47
- package/template/reference/sections/tag-lines/component/HighlightedText.vue +1 -1
- package/template/reference/sections/tag-lines/component/SectionImage.vue +18 -18
- package/template/reference/sections/tag-lines/component/Title.vue +1 -1
- package/template/reference/sections/tag-lines/settings/content.ts +47 -47
- package/template/reference/sections/tag-lines/settings/design.ts +15 -19
- package/template/reference/sections/tag-lines/settings/layout.ts +6 -4
- package/template/reference/sections/tag-lines/settings/translations.ts +4 -2
- package/template/reference/sections/tag-lines/showcases/1.ts +40 -50
- package/template/reference/sections/tag-lines/showcases/2.ts +40 -50
- package/template/reference/sections/tag-lines/showcases/translations.ts +4 -2
- package/template/reference/sections/trending-categories/TrendingCategories.vue +1 -1
- package/template/reference/sections/trending-categories/component/CategoryItem.vue +18 -1
- package/template/reference/sections/trending-categories/component/Title.vue +1 -1
- package/template/reference/sections/trending-categories/settings/content.ts +8 -10
- package/template/reference/sections/trending-categories/settings/design.ts +7 -7
- package/template/reference/sections/trending-categories/settings/translations.ts +4 -2
- package/template/reference/sections/trending-categories/showcases/1.ts +14 -15
- package/template/reference/sections/trending-categories/showcases/translations.ts +4 -2
- package/template/reference/shared/components/Button.vue +6 -6
- package/template/reference/shared/components/SectionWrapper.vue +5 -5
- package/template/reference/shared/components/Tagline.vue +12 -11
- package/template/reference/templates/reference-template-apparel/configuration.ts +8 -8
- package/template/reference/templates/reference-template-apparel/pages/catalog.ts +3 -6
- package/template/reference/templates/reference-template-apparel/pages/category.ts +3 -6
- package/template/reference/templates/reference-template-apparel/pages/home.ts +14 -18
- package/template/reference/templates/reference-template-apparel/pages/product.ts +3 -6
- package/template/reference/templates/reference-template-bike/configuration.ts +9 -9
- package/template/reference/templates/reference-template-bike/pages/catalog.ts +3 -6
- package/template/reference/templates/reference-template-bike/pages/category.ts +3 -6
- package/template/reference/templates/reference-template-bike/pages/home.ts +14 -18
- package/template/reference/templates/reference-template-bike/pages/product.ts +3 -6
- package/template/sections/example-section/ExampleSection.vue +3 -5
- package/template/sections/example-section/component/button/Button.vue +1 -1
- package/template/sections/example-section/component/image/Image.vue +43 -43
- package/template/sections/example-section/component/image/ImagesGrid.vue +21 -32
- package/template/sections/example-section/component/selectbox/Selectbox.vue +1 -1
- package/template/sections/example-section/component/title/Title.vue +1 -1
- package/template/sections/example-section/component/toggle/Toggle.vue +4 -4
- package/template/sections/example-section/settings/content.ts +25 -34
- package/template/sections/example-section/settings/design.ts +15 -19
- package/template/sections/example-section/settings/layout.ts +15 -14
- package/template/sections/example-section/settings/translations.ts +4 -2
- package/template/sections/example-section/showcases/1.ts +52 -79
- package/template/sections/example-section/showcases/2.ts +46 -62
- package/template/sections/example-section/showcases/3.ts +50 -76
- package/template/sections/example-section/showcases/translations.ts +4 -2
- package/template/shared/components/LanguageSelector.vue +1 -1
- package/template/shared/components/SectionWrapper.vue +5 -5
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import {
|
|
2
|
+
content,
|
|
3
|
+
design,
|
|
4
|
+
showcase,
|
|
5
|
+
} from '@lightspeed/crane-api';
|
|
6
|
+
|
|
7
|
+
export default showcase.init({
|
|
2
8
|
showcaseId: '2',
|
|
3
9
|
previewImage: {
|
|
4
10
|
set: {
|
|
@@ -10,12 +16,10 @@ export default {
|
|
|
10
16
|
layoutId: 'Images_Without_Border_Radius',
|
|
11
17
|
blockName: '$label.showcase_2.blockName',
|
|
12
18
|
content: {
|
|
13
|
-
title: {
|
|
14
|
-
type: 'INPUTBOX',
|
|
19
|
+
title: content.default.inputbox({
|
|
15
20
|
text: '$label.showcase_2.section_title.text',
|
|
16
|
-
},
|
|
17
|
-
image: {
|
|
18
|
-
type: 'IMAGE',
|
|
21
|
+
}),
|
|
22
|
+
image: content.default.image({
|
|
19
23
|
imageData: {
|
|
20
24
|
set: {
|
|
21
25
|
MOBILE_WEBP_LOW_RES: {
|
|
@@ -33,109 +37,93 @@ export default {
|
|
|
33
37
|
},
|
|
34
38
|
borderInfo: {},
|
|
35
39
|
},
|
|
36
|
-
},
|
|
37
|
-
stats: {
|
|
38
|
-
type: 'DECK',
|
|
40
|
+
}),
|
|
41
|
+
stats: content.default.deck({
|
|
39
42
|
cards: [
|
|
40
43
|
{
|
|
41
44
|
settings: {
|
|
42
|
-
stat_value: {
|
|
43
|
-
type: 'INPUTBOX',
|
|
45
|
+
stat_value: content.default.inputbox({
|
|
44
46
|
text: '$label.showcase_2.stat_value.default_1.text',
|
|
45
|
-
},
|
|
46
|
-
stat_caption: {
|
|
47
|
-
type: 'INPUTBOX',
|
|
47
|
+
}),
|
|
48
|
+
stat_caption: content.default.inputbox({
|
|
48
49
|
text: '$label.showcase_2.stat_caption_1.default.text',
|
|
49
|
-
},
|
|
50
|
+
}),
|
|
50
51
|
},
|
|
51
52
|
},
|
|
52
53
|
{
|
|
53
54
|
settings: {
|
|
54
|
-
stat_value: {
|
|
55
|
-
type: 'INPUTBOX',
|
|
55
|
+
stat_value: content.default.inputbox({
|
|
56
56
|
text: '$label.showcase_2.stat_value.default_2.text',
|
|
57
|
-
},
|
|
58
|
-
stat_caption: {
|
|
59
|
-
type: 'INPUTBOX',
|
|
57
|
+
}),
|
|
58
|
+
stat_caption: content.default.inputbox({
|
|
60
59
|
text: '$label.showcase_2.stat_caption_2.default.text',
|
|
61
|
-
},
|
|
60
|
+
}),
|
|
62
61
|
},
|
|
63
62
|
},
|
|
64
63
|
{
|
|
65
64
|
settings: {
|
|
66
|
-
stat_value: {
|
|
67
|
-
type: 'INPUTBOX',
|
|
65
|
+
stat_value: content.default.inputbox({
|
|
68
66
|
text: '$label.showcase_2.stat_value.default_3.text',
|
|
69
|
-
},
|
|
70
|
-
stat_caption: {
|
|
71
|
-
type: 'INPUTBOX',
|
|
67
|
+
}),
|
|
68
|
+
stat_caption: content.default.inputbox({
|
|
72
69
|
text: '$label.showcase_2.stat_caption_3.default.text',
|
|
73
|
-
},
|
|
70
|
+
}),
|
|
74
71
|
},
|
|
75
72
|
},
|
|
76
73
|
{
|
|
77
74
|
settings: {
|
|
78
|
-
stat_value: {
|
|
79
|
-
type: 'INPUTBOX',
|
|
75
|
+
stat_value: content.default.inputbox({
|
|
80
76
|
text: '$label.showcase_2.stat_value.default_4.text',
|
|
81
|
-
},
|
|
82
|
-
stat_caption: {
|
|
83
|
-
type: 'INPUTBOX',
|
|
77
|
+
}),
|
|
78
|
+
stat_caption: content.default.inputbox({
|
|
84
79
|
text: '$label.showcase_2.stat_caption_4.default.text',
|
|
85
|
-
},
|
|
80
|
+
}),
|
|
86
81
|
},
|
|
87
82
|
},
|
|
88
83
|
],
|
|
89
|
-
},
|
|
90
|
-
button: {
|
|
91
|
-
type: 'BUTTON',
|
|
84
|
+
}),
|
|
85
|
+
button: content.default.button({
|
|
92
86
|
title: '$label.showcase_2.button_content.title',
|
|
93
87
|
buttonType: 'HYPER_LINK',
|
|
94
88
|
link: 'https://www.example.com',
|
|
95
|
-
},
|
|
89
|
+
}),
|
|
96
90
|
},
|
|
97
91
|
design: {
|
|
98
|
-
image: {
|
|
99
|
-
type: 'IMAGE',
|
|
92
|
+
image: design.default.image({
|
|
100
93
|
overlay: 'GRADIENT',
|
|
101
94
|
color: ['#FFFFFF', '#000000'],
|
|
102
|
-
},
|
|
103
|
-
title: {
|
|
104
|
-
type: 'TEXT',
|
|
95
|
+
}),
|
|
96
|
+
title: design.default.text({
|
|
105
97
|
font: 'pt_mono',
|
|
106
98
|
size: 48,
|
|
107
99
|
bold: true,
|
|
108
100
|
italic: false,
|
|
109
101
|
color: '#FFFFFF',
|
|
110
|
-
},
|
|
111
|
-
caption: {
|
|
112
|
-
type: 'TEXT',
|
|
102
|
+
}),
|
|
103
|
+
caption: design.default.text({
|
|
113
104
|
font: 'inter',
|
|
114
105
|
size: 16,
|
|
115
106
|
bold: true,
|
|
116
107
|
italic: false,
|
|
117
108
|
color: '#FFFFFF',
|
|
118
|
-
},
|
|
119
|
-
value: {
|
|
120
|
-
type: 'TEXT',
|
|
109
|
+
}),
|
|
110
|
+
value: design.default.text({
|
|
121
111
|
font: 'pt_mono',
|
|
122
112
|
size: 40,
|
|
123
113
|
bold: true,
|
|
124
114
|
italic: false,
|
|
125
115
|
color: '#878787',
|
|
126
|
-
},
|
|
127
|
-
background: {
|
|
128
|
-
type: 'BACKGROUND',
|
|
116
|
+
}),
|
|
117
|
+
background: design.default.background({
|
|
129
118
|
style: 'COLOR',
|
|
130
119
|
color: '#101010',
|
|
131
|
-
},
|
|
132
|
-
button: {
|
|
133
|
-
type: 'BUTTON',
|
|
120
|
+
}),
|
|
121
|
+
button: design.default.button({
|
|
134
122
|
font: 'inter',
|
|
135
123
|
appearance: 'OUTLINE',
|
|
136
124
|
size: 'LARGE',
|
|
137
125
|
shape: 'RECTANGLE',
|
|
138
126
|
color: '#FFFFFF',
|
|
139
|
-
},
|
|
127
|
+
}),
|
|
140
128
|
},
|
|
141
|
-
}
|
|
129
|
+
});
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { translation } from '@lightspeed/crane-api';
|
|
2
|
+
|
|
3
|
+
export default translation.init({
|
|
2
4
|
en: {
|
|
3
5
|
'$label.showcase_1.blockName': 'Reference Section – About us',
|
|
4
6
|
|
|
@@ -256,4 +258,4 @@ export default {
|
|
|
256
258
|
|
|
257
259
|
'$label.showcase_2.button_content.title': 'En savoir plus',
|
|
258
260
|
},
|
|
259
|
-
}
|
|
261
|
+
});
|
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
<SectionWrapper :style="backgroundStyle">
|
|
3
3
|
<Title v-if="showTitle" />
|
|
4
4
|
<div class="products-wrapper">
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
<template v-if="productSelectorContent.hasContent">
|
|
6
|
+
<ProductItem
|
|
7
|
+
v-for="product in productSelectorContent.products"
|
|
8
|
+
:key="product.id"
|
|
9
|
+
:product="product"
|
|
10
|
+
/>
|
|
11
|
+
</template>
|
|
12
|
+
<template v-else>
|
|
13
|
+
<ProductPlaceholder />
|
|
14
|
+
</template>
|
|
10
15
|
</div>
|
|
11
16
|
</SectionWrapper>
|
|
12
17
|
</template>
|
|
@@ -24,6 +29,7 @@ import { Content, Design } from "./type";
|
|
|
24
29
|
import SectionWrapper from "../../shared/components/SectionWrapper.vue";
|
|
25
30
|
import Title from "./component/Title.vue";
|
|
26
31
|
import ProductItem from "./component/ProductItem.vue";
|
|
32
|
+
import ProductPlaceholder from "./component/ProductPlaceholder.vue";
|
|
27
33
|
|
|
28
34
|
|
|
29
35
|
const titleContent = useInputboxElementContent<Content>("section_title");
|
|
@@ -52,7 +58,7 @@ const backgroundStyle = computed<CSSProperties>(() => {
|
|
|
52
58
|
});
|
|
53
59
|
</script>
|
|
54
60
|
|
|
55
|
-
<style
|
|
61
|
+
<style scoped>
|
|
56
62
|
.products-wrapper {
|
|
57
63
|
display: flex;
|
|
58
64
|
flex-wrap: wrap;
|
|
@@ -6,6 +6,9 @@
|
|
|
6
6
|
class="product"
|
|
7
7
|
>
|
|
8
8
|
<img v-if="product.fullImageUrl" class="product_image" :src="product.fullImageUrl" :alt="product.name" />
|
|
9
|
+
<div v-else class="product__background">
|
|
10
|
+
<div class="product__background__name">{{ product.name }}</div>
|
|
11
|
+
</div>
|
|
9
12
|
<h4 class="product__title">
|
|
10
13
|
{{ product.name }}
|
|
11
14
|
</h4>
|
|
@@ -22,7 +25,7 @@
|
|
|
22
25
|
|
|
23
26
|
</script>
|
|
24
27
|
|
|
25
|
-
<style scoped
|
|
28
|
+
<style scoped>
|
|
26
29
|
.product {
|
|
27
30
|
display: flex;
|
|
28
31
|
flex-direction: column;
|
|
@@ -68,4 +71,18 @@
|
|
|
68
71
|
font-weight: 600;
|
|
69
72
|
color: #111;
|
|
70
73
|
}
|
|
74
|
+
|
|
75
|
+
.product__background {
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
justify-content: center;
|
|
79
|
+
height: auto;
|
|
80
|
+
aspect-ratio: 3/4;
|
|
81
|
+
|
|
82
|
+
background-color: rgba(0, 0, 0, 0.1);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.product__background__name {
|
|
86
|
+
text-align: center;
|
|
87
|
+
}
|
|
71
88
|
</style>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-for="index in placeholderItemsCount"
|
|
4
|
+
:key="index"
|
|
5
|
+
class="placeholder"
|
|
6
|
+
>
|
|
7
|
+
<div class="placeholder__image"></div>
|
|
8
|
+
<p class="placeholder__title">
|
|
9
|
+
Your product will be shown here
|
|
10
|
+
</p>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts">
|
|
15
|
+
import { ref } from "vue";
|
|
16
|
+
|
|
17
|
+
const placeholderItemsCount = ref(4)
|
|
18
|
+
</script>
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
<style scoped>
|
|
23
|
+
.placeholder {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.placeholder__image {
|
|
29
|
+
width: unset;
|
|
30
|
+
min-width: unset;
|
|
31
|
+
margin: 0;
|
|
32
|
+
aspect-ratio: 3 / 4;
|
|
33
|
+
background-color: rgba(0, 0, 0, 0.1);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.placeholder__title {
|
|
37
|
+
margin-top: 8px;
|
|
38
|
+
text-align: center;
|
|
39
|
+
font-size: 12px;
|
|
40
|
+
color: rgba(0, 0, 0, 0.4);
|
|
41
|
+
}
|
|
42
|
+
</style>
|
|
@@ -1,14 +1,12 @@
|
|
|
1
|
+
import { content } from '@lightspeed/crane-api';
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
|
-
section_title: {
|
|
3
|
-
type: 'INPUTBOX',
|
|
4
|
+
section_title: content.inputbox({
|
|
4
5
|
label: '$label.section_title.label',
|
|
5
6
|
placeholder: '$label.section_title.placeholder',
|
|
6
|
-
},
|
|
7
|
-
featured_products: {
|
|
8
|
-
type: 'PRODUCT_SELECTOR',
|
|
7
|
+
}),
|
|
8
|
+
featured_products: content.productSelector({
|
|
9
9
|
label: '$label.featured_products.label',
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
} as const;
|
|
10
|
+
maxProducts: 6,
|
|
11
|
+
}),
|
|
12
|
+
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { design } from '@lightspeed/crane-api';
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
|
-
section_title: {
|
|
3
|
-
type: 'TEXT',
|
|
4
|
+
section_title: design.text({
|
|
4
5
|
label: '$label.section_title.label',
|
|
5
6
|
colors: ['#FFFFFF66', '#0000004D', '#00000099', '#64C7FF66', '#F9947266', '#C794CD66', '#FFD17466'],
|
|
6
7
|
sizes: [18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60],
|
|
@@ -12,9 +13,8 @@ export default {
|
|
|
12
13
|
color: '#313131',
|
|
13
14
|
visible: true,
|
|
14
15
|
},
|
|
15
|
-
},
|
|
16
|
-
background: {
|
|
17
|
-
type: 'BACKGROUND',
|
|
16
|
+
}),
|
|
17
|
+
background: design.background({
|
|
18
18
|
label: '$label.background.label',
|
|
19
19
|
colors: [
|
|
20
20
|
'#FFFFFF66',
|
|
@@ -29,5 +29,5 @@ export default {
|
|
|
29
29
|
style: 'COLOR',
|
|
30
30
|
color: 'global.color.background',
|
|
31
31
|
},
|
|
32
|
-
},
|
|
33
|
-
}
|
|
32
|
+
}),
|
|
33
|
+
};
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { translation } from '@lightspeed/crane-api';
|
|
2
|
+
|
|
3
|
+
export default translation.init({
|
|
2
4
|
en: {
|
|
3
5
|
'$label.section_title.label': 'Main title',
|
|
4
6
|
'$label.section_title.placeholder':
|
|
@@ -21,4 +23,4 @@ export default {
|
|
|
21
23
|
'Ce sera le titre principal de cette section',
|
|
22
24
|
'$label.featured_products.label': 'Collections tendance',
|
|
23
25
|
},
|
|
24
|
-
}
|
|
26
|
+
});
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { content, design, showcase } from '@lightspeed/crane-api';
|
|
2
|
+
|
|
3
|
+
export default showcase.init({
|
|
2
4
|
showcaseId: '1',
|
|
3
5
|
previewImage: {
|
|
4
6
|
set: {
|
|
@@ -9,20 +11,14 @@ export default {
|
|
|
9
11
|
},
|
|
10
12
|
blockName: '$label.showcase_1.blockName',
|
|
11
13
|
content: {
|
|
12
|
-
section_title: {
|
|
13
|
-
type: 'INPUTBOX',
|
|
14
|
+
section_title: content.default.inputbox({
|
|
14
15
|
text: '$label.showcase_1.section_title.text',
|
|
15
|
-
},
|
|
16
|
-
featured_products: {
|
|
17
|
-
type: 'PRODUCT_SELECTOR',
|
|
18
|
-
maxProducts: 6,
|
|
19
|
-
},
|
|
16
|
+
}),
|
|
20
17
|
},
|
|
21
18
|
design: {
|
|
22
|
-
background: {
|
|
23
|
-
type: 'BACKGROUND',
|
|
19
|
+
background: design.default.background({
|
|
24
20
|
style: 'COLOR',
|
|
25
21
|
color: 'global.color.background',
|
|
26
|
-
},
|
|
22
|
+
}),
|
|
27
23
|
},
|
|
28
|
-
}
|
|
24
|
+
});
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { translation } from '@lightspeed/crane-api';
|
|
2
|
+
|
|
3
|
+
export default translation.init({
|
|
2
4
|
en: {
|
|
3
5
|
'$label.showcase_1.blockName': 'Reference Section — Featured Products',
|
|
4
6
|
'$label.showcase_1.section_title.text': 'Featured Products',
|
|
@@ -13,4 +15,4 @@ export default {
|
|
|
13
15
|
'$label.showcase_1.blockName': 'Section de référence — Produits phares',
|
|
14
16
|
'$label.showcase_1.section_title.text': 'Produits phares',
|
|
15
17
|
},
|
|
16
|
-
}
|
|
18
|
+
});
|
|
@@ -58,7 +58,7 @@ const buttonContent = useButtonElementContent<Content>('section_button') as Butt
|
|
|
58
58
|
const buttonDesign = useButtonElementDesign<Design>('section_button') as ButtonDesignData;
|
|
59
59
|
</script>
|
|
60
60
|
|
|
61
|
-
<style scoped
|
|
61
|
+
<style scoped>
|
|
62
62
|
.intro-slider-section {
|
|
63
63
|
min-height: 810px;
|
|
64
64
|
width: 100%;
|
|
@@ -67,11 +67,11 @@ const buttonDesign = useButtonElementDesign<Design>('section_button') as ButtonD
|
|
|
67
67
|
flex-direction: column;
|
|
68
68
|
align-items: center;
|
|
69
69
|
gap: 24px;
|
|
70
|
+
}
|
|
70
71
|
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
}
|
|
72
|
+
.intro-slider-section__button {
|
|
73
|
+
margin: auto;
|
|
74
|
+
width: fit-content;
|
|
75
|
+
max-width: 360px;
|
|
76
76
|
}
|
|
77
77
|
</style>
|
|
@@ -149,7 +149,7 @@ onBeforeUnmount(() => {
|
|
|
149
149
|
});
|
|
150
150
|
</script>
|
|
151
151
|
|
|
152
|
-
<style
|
|
152
|
+
<style scoped>
|
|
153
153
|
.slider-container {
|
|
154
154
|
overflow: hidden;
|
|
155
155
|
width: 100%;
|
|
@@ -175,58 +175,57 @@ onBeforeUnmount(() => {
|
|
|
175
175
|
width: var(--slide-width);
|
|
176
176
|
margin-right: var(--slide-gap);
|
|
177
177
|
height: 218px;
|
|
178
|
-
|
|
179
178
|
flex-shrink: 0;
|
|
180
179
|
overflow: hidden;
|
|
181
180
|
|
|
182
|
-
&--with-border-radius {
|
|
183
|
-
border-radius: 16px;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
181
|
@media screen and (min-width: 800px) {
|
|
187
182
|
height: 334px;
|
|
188
|
-
|
|
189
|
-
&--with-border-radius {
|
|
190
|
-
border-radius: 24px;
|
|
191
|
-
}
|
|
192
183
|
}
|
|
184
|
+
}
|
|
193
185
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
position: absolute;
|
|
198
|
-
display: flex;
|
|
199
|
-
width: 100%;
|
|
200
|
-
height: 100%;
|
|
201
|
-
left: 0;
|
|
202
|
-
bottom: 0;
|
|
203
|
-
padding: 16px;
|
|
204
|
-
background: var(--slider-item-background);
|
|
205
|
-
}
|
|
186
|
+
.slider-item--with-border-radius {
|
|
187
|
+
border-radius: 16px;
|
|
206
188
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
--slider-item-text-font-family: v-bind(slideTextStyles.fontFamily);
|
|
210
|
-
--slider-item-text-color: v-bind(slideTextStyles.color);
|
|
211
|
-
--slider-item-text-font-style: v-bind(slideTextStyles.fontStyle);
|
|
212
|
-
--slider-item-text-font-weight: v-bind(slideTextStyles.fontWeight);
|
|
213
|
-
|
|
214
|
-
margin: auto 0 0;
|
|
215
|
-
line-height: normal;
|
|
216
|
-
overflow: hidden;
|
|
217
|
-
text-overflow: ellipsis;
|
|
218
|
-
font-family: var(--slider-item-text-font-family);
|
|
219
|
-
font-size: var(--slider-item-text-font-size);
|
|
220
|
-
font-style: var(--slider-item-text-font-style);
|
|
221
|
-
font-weight: var(--slider-item-text-font-weight);
|
|
222
|
-
color: var(--slider-item-text-color);
|
|
189
|
+
@media screen and (min-width: 800px) {
|
|
190
|
+
border-radius: 24px;
|
|
223
191
|
}
|
|
192
|
+
}
|
|
224
193
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
194
|
+
.slider-item__wrapper {
|
|
195
|
+
--slider-item-background: v-bind(slideImageStyles.background);
|
|
196
|
+
|
|
197
|
+
position: absolute;
|
|
198
|
+
display: flex;
|
|
199
|
+
width: 100%;
|
|
200
|
+
height: 100%;
|
|
201
|
+
left: 0;
|
|
202
|
+
bottom: 0;
|
|
203
|
+
padding: 16px;
|
|
204
|
+
background: var(--slider-item-background);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.slider-item__text {
|
|
208
|
+
--slider-item-text-font-size: v-bind(slideTextStyles.fontSize);
|
|
209
|
+
--slider-item-text-font-family: v-bind(slideTextStyles.fontFamily);
|
|
210
|
+
--slider-item-text-color: v-bind(slideTextStyles.color);
|
|
211
|
+
--slider-item-text-font-style: v-bind(slideTextStyles.fontStyle);
|
|
212
|
+
--slider-item-text-font-weight: v-bind(slideTextStyles.fontWeight);
|
|
213
|
+
|
|
214
|
+
margin: auto 0 0;
|
|
215
|
+
line-height: normal;
|
|
216
|
+
overflow: hidden;
|
|
217
|
+
text-overflow: ellipsis;
|
|
218
|
+
font-family: var(--slider-item-text-font-family);
|
|
219
|
+
font-size: var(--slider-item-text-font-size);
|
|
220
|
+
font-style: var(--slider-item-text-font-style);
|
|
221
|
+
font-weight: var(--slider-item-text-font-weight);
|
|
222
|
+
color: var(--slider-item-text-color);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
.slider-item__image {
|
|
226
|
+
width: 100%;
|
|
227
|
+
height: 100%;
|
|
228
|
+
object-fit: cover;
|
|
230
229
|
}
|
|
231
230
|
|
|
232
231
|
@keyframes scroll {
|
|
@@ -51,7 +51,7 @@ const descriptionStyle = computed<CSSProperties>(() => ({
|
|
|
51
51
|
}));
|
|
52
52
|
</script>
|
|
53
53
|
|
|
54
|
-
<style
|
|
54
|
+
<style scoped>
|
|
55
55
|
.title {
|
|
56
56
|
text-align: center;
|
|
57
57
|
white-space: break-spaces;
|
|
@@ -59,11 +59,7 @@ const descriptionStyle = computed<CSSProperties>(() => ({
|
|
|
59
59
|
overflow-wrap: break-word;
|
|
60
60
|
padding: 0 20px;
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
max-width: 660px;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
h1 {
|
|
62
|
+
& h1 {
|
|
67
63
|
--font-size: v-bind(titleStyle.fontSize);
|
|
68
64
|
--font-family: v-bind(titleStyle.fontFamily);
|
|
69
65
|
--color: v-bind(titleStyle.color);
|
|
@@ -84,7 +80,7 @@ const descriptionStyle = computed<CSSProperties>(() => ({
|
|
|
84
80
|
}
|
|
85
81
|
}
|
|
86
82
|
|
|
87
|
-
p {
|
|
83
|
+
& p {
|
|
88
84
|
--font-size: v-bind(descriptionStyle.fontSize);
|
|
89
85
|
--font-family: v-bind(descriptionStyle.fontFamily);
|
|
90
86
|
--color: v-bind(descriptionStyle.color);
|
|
@@ -103,4 +99,8 @@ const descriptionStyle = computed<CSSProperties>(() => ({
|
|
|
103
99
|
}
|
|
104
100
|
}
|
|
105
101
|
}
|
|
102
|
+
|
|
103
|
+
.title--narrow {
|
|
104
|
+
max-width: 660px;
|
|
105
|
+
}
|
|
106
106
|
</style>
|