@lightspeed/crane 2.0.4 → 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 +50 -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 +150 -69
- 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 +42 -42
- 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 +43 -44
- package/template/reference/sections/intro-slider/component/Title.vue +9 -9
- package/template/reference/sections/intro-slider/settings/content.ts +36 -22
- 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 +2 -2
- package/template/reference/sections/tag-lines/component/SectionImage.vue +18 -18
- package/template/reference/sections/tag-lines/component/Title.vue +2 -2
- package/template/reference/sections/tag-lines/settings/content.ts +53 -19
- 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 +2 -2
- 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,34 +1,30 @@
|
|
|
1
|
+
import { section } from '@lightspeed/crane-api';
|
|
2
|
+
|
|
1
3
|
export default {
|
|
2
4
|
sections: [
|
|
3
|
-
{
|
|
4
|
-
type: 'custom',
|
|
5
|
+
section.custom({
|
|
5
6
|
id: 'intro-slider',
|
|
6
7
|
showcase_id: '2',
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
type: 'custom',
|
|
8
|
+
}),
|
|
9
|
+
section.custom({
|
|
10
10
|
id: 'example-section',
|
|
11
11
|
showcase_id: '3',
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
type: 'custom',
|
|
12
|
+
}),
|
|
13
|
+
section.custom({
|
|
15
14
|
id: 'tag-lines',
|
|
16
15
|
showcase_id: '2',
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
type: 'custom',
|
|
16
|
+
}),
|
|
17
|
+
section.custom({
|
|
20
18
|
id: 'about-us',
|
|
21
19
|
showcase_id: '2',
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
type: 'custom',
|
|
20
|
+
}),
|
|
21
|
+
section.custom({
|
|
25
22
|
id: 'featured-products',
|
|
26
23
|
showcase_id: '1',
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
type: 'custom',
|
|
24
|
+
}),
|
|
25
|
+
section.custom({
|
|
30
26
|
id: 'trending-categories',
|
|
31
27
|
showcase_id: '1',
|
|
32
|
-
},
|
|
28
|
+
}),
|
|
33
29
|
],
|
|
34
30
|
};
|
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { section } from '@lightspeed/crane-api';
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
sections: [
|
|
5
|
-
{
|
|
6
|
-
type: 'store',
|
|
7
|
-
id: undefined,
|
|
8
|
-
},
|
|
5
|
+
section.store({}),
|
|
9
6
|
],
|
|
10
|
-
}
|
|
7
|
+
};
|
|
@@ -105,60 +105,60 @@ const textStyle = computed(() => ({
|
|
|
105
105
|
}));
|
|
106
106
|
</script>
|
|
107
107
|
|
|
108
|
-
<style
|
|
108
|
+
<style scoped>
|
|
109
109
|
.image-section {
|
|
110
110
|
height: 100%;
|
|
111
111
|
position: relative;
|
|
112
|
+
}
|
|
112
113
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
114
|
+
.image-section__link {
|
|
115
|
+
height: 100%;
|
|
116
|
+
width: 100%;
|
|
117
|
+
display: flex;
|
|
118
|
+
}
|
|
118
119
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
120
|
+
.image-section__link-wrap {
|
|
121
|
+
height: 100%;
|
|
122
|
+
width: 100%;
|
|
123
|
+
display: flex;
|
|
124
|
+
position: relative;
|
|
125
|
+
z-index: 999;
|
|
126
|
+
}
|
|
126
127
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
128
|
+
.image-section__content {
|
|
129
|
+
display: block;
|
|
130
|
+
height: 100%;
|
|
131
|
+
width: 100%;
|
|
132
|
+
object-fit: cover;
|
|
133
|
+
z-index: -1;
|
|
134
|
+
}
|
|
134
135
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
.image-section__content-block {
|
|
137
|
+
display: flex;
|
|
138
|
+
width: 100%;
|
|
139
|
+
}
|
|
138
140
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
141
|
+
.image-section__content-block-position-on {
|
|
142
|
+
height: 100%;
|
|
143
|
+
}
|
|
142
144
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
}
|
|
145
|
+
.image-section__content-block-position-under {
|
|
146
|
+
height: calc(100% - 60px);
|
|
147
|
+
}
|
|
147
148
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
149
|
+
.image-section__text {
|
|
150
|
+
position: absolute;
|
|
151
|
+
bottom: 0;
|
|
152
|
+
width: 100%;
|
|
153
|
+
align-content: center;
|
|
154
|
+
padding: 16px;
|
|
155
|
+
}
|
|
154
156
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
157
|
+
.image-section__text-position-on {
|
|
158
|
+
height: auto;
|
|
159
|
+
}
|
|
158
160
|
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
}
|
|
162
|
-
}
|
|
161
|
+
.image-section__text-position-under {
|
|
162
|
+
height: 60px;
|
|
163
163
|
}
|
|
164
164
|
</style>
|
|
@@ -46,46 +46,41 @@ window.addEventListener('resize', onWidthChange);
|
|
|
46
46
|
const smallWindow = computed(() => windowWidth.value <= 768);
|
|
47
47
|
</script>
|
|
48
48
|
|
|
49
|
-
<style
|
|
50
|
-
@mixin image-grid
|
|
49
|
+
<style scoped>
|
|
50
|
+
/* Base grid styles (previously @mixin image-grid) */
|
|
51
|
+
/* Container only (not .image-grid__content-* cells) */
|
|
52
|
+
[class^="image-grid__"]:not([class*="image-grid__content"]) {
|
|
51
53
|
display: grid;
|
|
52
54
|
grid-gap: 20px;
|
|
55
|
+
|
|
53
56
|
@media screen and (min-width: 900px) {
|
|
54
57
|
aspect-ratio: 1/0.55;
|
|
55
58
|
}
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
.image-grid__1 {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
& {
|
|
62
|
-
grid-template-columns: [col1-start] 1fr [col1-end];
|
|
63
|
-
grid-template-rows: [row1-start] 1fr [row1-end];
|
|
64
|
-
}
|
|
62
|
+
grid-template-columns: [col1-start] 1fr [col1-end];
|
|
63
|
+
grid-template-rows: [row1-start] 1fr [row1-end];
|
|
65
64
|
|
|
66
65
|
@media screen and (max-width: 900px) {
|
|
67
66
|
aspect-ratio: 1;
|
|
68
67
|
}
|
|
69
68
|
|
|
70
|
-
.image-grid__content-1 {
|
|
69
|
+
& .image-grid__content-1 {
|
|
71
70
|
grid-column: col1-start / col1-end;
|
|
72
71
|
grid-row: row1-start / row1-end;
|
|
73
72
|
}
|
|
74
73
|
}
|
|
75
74
|
|
|
76
75
|
.image-grid__2 {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
& {
|
|
80
|
-
grid-template-columns: [col1-start] 11fr [col2-start] 9fr [col2-end];
|
|
81
|
-
grid-template-rows: [row1-start] 4.5fr [row2-start] 2.75fr [row2-end];
|
|
82
|
-
}
|
|
76
|
+
grid-template-columns: [col1-start] 11fr [col2-start] 9fr [col2-end];
|
|
77
|
+
grid-template-rows: [row1-start] 4.5fr [row2-start] 2.75fr [row2-end];
|
|
83
78
|
|
|
84
79
|
@media screen and (max-width: 900px) {
|
|
85
80
|
aspect-ratio: 4.5/7.25;
|
|
86
81
|
}
|
|
87
82
|
|
|
88
|
-
.image-grid__content-1 {
|
|
83
|
+
& .image-grid__content-1 {
|
|
89
84
|
@media screen and (min-width: 900px) {
|
|
90
85
|
grid-column: col1-start / col2-start;
|
|
91
86
|
grid-row: row1-start / row2-end;
|
|
@@ -97,7 +92,7 @@ const smallWindow = computed(() => windowWidth.value <= 768);
|
|
|
97
92
|
}
|
|
98
93
|
}
|
|
99
94
|
|
|
100
|
-
.image-grid__content-2 {
|
|
95
|
+
& .image-grid__content-2 {
|
|
101
96
|
@media screen and (min-width: 900px) {
|
|
102
97
|
grid-column: col2-start / col2-end;
|
|
103
98
|
grid-row: row1-start / row2-end;
|
|
@@ -111,18 +106,14 @@ const smallWindow = computed(() => windowWidth.value <= 768);
|
|
|
111
106
|
}
|
|
112
107
|
|
|
113
108
|
.image-grid__3 {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
& {
|
|
117
|
-
grid-template-columns: [col1-start] 11fr [col2-start] 9fr [col2-end];
|
|
118
|
-
grid-template-rows: [row1-start] 4.5fr [row2-start] 0.5fr [row3-start] 2.25fr [row4-start] 2.75fr [row4-end];
|
|
119
|
-
}
|
|
109
|
+
grid-template-columns: [col1-start] 11fr [col2-start] 9fr [col2-end];
|
|
110
|
+
grid-template-rows: [row1-start] 4.5fr [row2-start] 0.5fr [row3-start] 2.25fr [row4-start] 2.75fr [row4-end];
|
|
120
111
|
|
|
121
112
|
@media screen and (max-width: 900px) {
|
|
122
113
|
aspect-ratio: 0.45;
|
|
123
114
|
}
|
|
124
115
|
|
|
125
|
-
.image-grid__content-1 {
|
|
116
|
+
& .image-grid__content-1 {
|
|
126
117
|
@media screen and (min-width: 900px) {
|
|
127
118
|
grid-column: col1-start / col2-start;
|
|
128
119
|
grid-row: row1-start / row4-end;
|
|
@@ -134,7 +125,7 @@ const smallWindow = computed(() => windowWidth.value <= 768);
|
|
|
134
125
|
}
|
|
135
126
|
}
|
|
136
127
|
|
|
137
|
-
.image-grid__content-2 {
|
|
128
|
+
& .image-grid__content-2 {
|
|
138
129
|
@media screen and (min-width: 900px) {
|
|
139
130
|
grid-column: col2-start / col2-end;
|
|
140
131
|
grid-row: row1-start / row3-start;
|
|
@@ -146,7 +137,7 @@ const smallWindow = computed(() => windowWidth.value <= 768);
|
|
|
146
137
|
}
|
|
147
138
|
}
|
|
148
139
|
|
|
149
|
-
.image-grid__content-3 {
|
|
140
|
+
& .image-grid__content-3 {
|
|
150
141
|
@media screen and (min-width: 900px) {
|
|
151
142
|
grid-column: col2-start / col2-end;
|
|
152
143
|
grid-row: row3-start / row4-end;
|
|
@@ -160,8 +151,6 @@ const smallWindow = computed(() => windowWidth.value <= 768);
|
|
|
160
151
|
}
|
|
161
152
|
|
|
162
153
|
.image-grid__4 {
|
|
163
|
-
@include image-grid;
|
|
164
|
-
|
|
165
154
|
@media screen and (min-width: 900px) {
|
|
166
155
|
grid-template-columns: [col1-start] 11fr [col2-start] 4.5fr [col3-start] 4.5fr [col3-end];
|
|
167
156
|
grid-template-rows: [row1-start] 1fr [row2-start] 1fr [row2-end];
|
|
@@ -174,7 +163,7 @@ const smallWindow = computed(() => windowWidth.value <= 768);
|
|
|
174
163
|
aspect-ratio: 0.45;
|
|
175
164
|
}
|
|
176
165
|
|
|
177
|
-
.image-grid__content-1 {
|
|
166
|
+
& .image-grid__content-1 {
|
|
178
167
|
@media screen and (min-width: 900px) {
|
|
179
168
|
grid-column: col1-start / col2-start;
|
|
180
169
|
grid-row: row1-start / row2-end;
|
|
@@ -186,7 +175,7 @@ const smallWindow = computed(() => windowWidth.value <= 768);
|
|
|
186
175
|
}
|
|
187
176
|
}
|
|
188
177
|
|
|
189
|
-
.image-grid__content-2 {
|
|
178
|
+
& .image-grid__content-2 {
|
|
190
179
|
@media screen and (min-width: 900px) {
|
|
191
180
|
grid-column: col2-start / col3-end;
|
|
192
181
|
grid-row: row1-start / row2-start;
|
|
@@ -198,7 +187,7 @@ const smallWindow = computed(() => windowWidth.value <= 768);
|
|
|
198
187
|
}
|
|
199
188
|
}
|
|
200
189
|
|
|
201
|
-
.image-grid__content-3 {
|
|
190
|
+
& .image-grid__content-3 {
|
|
202
191
|
@media screen and (min-width: 900px) {
|
|
203
192
|
grid-column: col2-start / col3-start;
|
|
204
193
|
grid-row: row2-start / row2-end;
|
|
@@ -210,7 +199,7 @@ const smallWindow = computed(() => windowWidth.value <= 768);
|
|
|
210
199
|
}
|
|
211
200
|
}
|
|
212
201
|
|
|
213
|
-
.image-grid__content-4 {
|
|
202
|
+
& .image-grid__content-4 {
|
|
214
203
|
@media screen and (min-width: 900px) {
|
|
215
204
|
grid-column: col3-start / col3-end;
|
|
216
205
|
grid-row: row2-start / row2-end;
|
|
@@ -24,7 +24,7 @@ const backgroundColor = computed(() => {
|
|
|
24
24
|
const textColor = computed(() => (isDark(backgroundColor.value) ? 'white' : 'black'));
|
|
25
25
|
</script>
|
|
26
26
|
|
|
27
|
-
<style
|
|
27
|
+
<style scoped>
|
|
28
28
|
.custom-block {
|
|
29
29
|
padding: 50px;
|
|
30
30
|
background-color: #f8f8f8;
|
|
@@ -36,10 +36,10 @@ const textColor = computed(() => (isDark(backgroundColor.value) ? 'white' : 'bla
|
|
|
36
36
|
@media screen and (min-width: 1200px) {
|
|
37
37
|
padding: 100px;
|
|
38
38
|
}
|
|
39
|
+
}
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
41
|
+
.custom-block__blank_space {
|
|
42
|
+
height: 40px;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.control-item {
|
|
@@ -1,20 +1,18 @@
|
|
|
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
|
-
section_description: {
|
|
8
|
-
type: 'TEXTAREA',
|
|
7
|
+
}),
|
|
8
|
+
section_description: content.textarea({
|
|
9
9
|
label: '$label.section_description.label',
|
|
10
10
|
placeholder: '$label.section_description.placeholder',
|
|
11
|
-
},
|
|
12
|
-
divider: {
|
|
13
|
-
type: 'DIVIDER',
|
|
11
|
+
}),
|
|
12
|
+
divider: content.divider({
|
|
14
13
|
label: '$label.divider.label',
|
|
15
|
-
},
|
|
16
|
-
images: {
|
|
17
|
-
type: 'DECK',
|
|
14
|
+
}),
|
|
15
|
+
images: content.deck({
|
|
18
16
|
label: '$label.images.deck_title',
|
|
19
17
|
addButtonLabel: '$label.images.add_card_button',
|
|
20
18
|
maxCards: 5,
|
|
@@ -22,8 +20,7 @@ export default {
|
|
|
22
20
|
defaultCardContent: {
|
|
23
21
|
label: '$label.images.card_title',
|
|
24
22
|
settings: {
|
|
25
|
-
image_content: {
|
|
26
|
-
type: 'IMAGE',
|
|
23
|
+
image_content: content.image({
|
|
27
24
|
label: '$label.image_content_1.label',
|
|
28
25
|
defaults: {
|
|
29
26
|
imageData: {
|
|
@@ -44,46 +41,41 @@ export default {
|
|
|
44
41
|
borderInfo: {},
|
|
45
42
|
},
|
|
46
43
|
},
|
|
47
|
-
},
|
|
48
|
-
image_text: {
|
|
49
|
-
type: 'TEXTAREA',
|
|
44
|
+
}),
|
|
45
|
+
image_text: content.textarea({
|
|
50
46
|
label: '$label.image_text_1.label',
|
|
51
47
|
placeholder: '$label.image_text.placeholder',
|
|
52
48
|
defaults: {
|
|
53
49
|
text: '$label.images.default.image_text',
|
|
54
50
|
},
|
|
55
|
-
},
|
|
56
|
-
image_link: {
|
|
57
|
-
type: 'INPUTBOX',
|
|
51
|
+
}),
|
|
52
|
+
image_link: content.inputbox({
|
|
58
53
|
label: '$label.image_link_1.label',
|
|
59
54
|
placeholder: '$label.image_link.placeholder',
|
|
60
55
|
defaults: {
|
|
61
56
|
text: '$label.images.default.image_link.text',
|
|
62
57
|
},
|
|
63
|
-
},
|
|
58
|
+
}),
|
|
64
59
|
},
|
|
65
60
|
},
|
|
66
61
|
},
|
|
67
|
-
},
|
|
68
|
-
button: {
|
|
69
|
-
type: 'BUTTON',
|
|
62
|
+
}),
|
|
63
|
+
button: content.button({
|
|
70
64
|
label: '$label.button.label',
|
|
71
65
|
defaults: {
|
|
72
66
|
title: '$label.button.defaults.title',
|
|
73
67
|
buttonType: 'HYPER_LINK',
|
|
74
68
|
link: 'https://www.example.com',
|
|
75
69
|
},
|
|
76
|
-
},
|
|
77
|
-
toggle: {
|
|
78
|
-
type: 'TOGGLE',
|
|
70
|
+
}),
|
|
71
|
+
toggle: content.toggle({
|
|
79
72
|
label: '$label.toggle.label',
|
|
80
73
|
description: '$label.toggle.description',
|
|
81
74
|
defaults: {
|
|
82
75
|
enabled: true,
|
|
83
76
|
},
|
|
84
|
-
},
|
|
85
|
-
selectbox: {
|
|
86
|
-
type: 'SELECTBOX',
|
|
77
|
+
}),
|
|
78
|
+
selectbox: content.selectbox({
|
|
87
79
|
placeholder: '$label.selectbox.placeholder',
|
|
88
80
|
label: '$label.selectbox.label',
|
|
89
81
|
description: '$label.selectbox.description',
|
|
@@ -100,14 +92,13 @@ export default {
|
|
|
100
92
|
defaults: {
|
|
101
93
|
value: 'one',
|
|
102
94
|
},
|
|
103
|
-
},
|
|
104
|
-
info: {
|
|
105
|
-
type: 'INFO',
|
|
95
|
+
}),
|
|
96
|
+
info: content.info({
|
|
106
97
|
label: '$label.info.label',
|
|
107
98
|
description: '$label.info.description',
|
|
108
99
|
button: {
|
|
109
100
|
label: '$label.info.button.label',
|
|
110
101
|
link: 'https://example.com',
|
|
111
102
|
},
|
|
112
|
-
},
|
|
113
|
-
}
|
|
103
|
+
}),
|
|
104
|
+
};
|
|
@@ -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
|
-
section_description: {
|
|
17
|
-
type: 'TEXT',
|
|
16
|
+
}),
|
|
17
|
+
section_description: design.text({
|
|
18
18
|
label: '$label.section_description.label',
|
|
19
19
|
colors: ['#FFFFFF66', '#0000004D', '#00000099', '#64C7FF66', '#F9947266', '#C794CD66', '#FFD17466'],
|
|
20
20
|
sizes: [12, 13, 14, 15, 16, 17, 18, 20],
|
|
@@ -26,13 +26,11 @@ export default {
|
|
|
26
26
|
color: '#313131',
|
|
27
27
|
visible: true,
|
|
28
28
|
},
|
|
29
|
-
},
|
|
30
|
-
divider: {
|
|
31
|
-
type: 'DIVIDER',
|
|
29
|
+
}),
|
|
30
|
+
divider: design.divider({
|
|
32
31
|
label: '$label.divider.label',
|
|
33
|
-
},
|
|
34
|
-
image_text: {
|
|
35
|
-
type: 'TEXT',
|
|
32
|
+
}),
|
|
33
|
+
image_text: design.text({
|
|
36
34
|
label: '$label.image_text.label',
|
|
37
35
|
colors: ['#FFFFFF66', '#0000004D', '#00000099', '#64C7FF66', '#F9947266', '#C794CD66', '#FFD17466'],
|
|
38
36
|
sizes: [12, 13, 14, 15, 16, 17, 18, 20],
|
|
@@ -44,23 +42,21 @@ export default {
|
|
|
44
42
|
color: '#FFFFFF',
|
|
45
43
|
visible: true,
|
|
46
44
|
},
|
|
47
|
-
},
|
|
48
|
-
image_content: {
|
|
49
|
-
type: 'IMAGE',
|
|
45
|
+
}),
|
|
46
|
+
image_content: design.image({
|
|
50
47
|
label: '$label.image_content.label',
|
|
51
48
|
colors: ['#FFFFFF66', '#0000004D', '#00000099', '#64C7FF66', '#F9947266', '#C794CD66', '#FFD17466'],
|
|
52
49
|
defaults: {
|
|
53
50
|
overlay: 'COLOR',
|
|
54
51
|
color: '#333',
|
|
55
52
|
},
|
|
56
|
-
},
|
|
57
|
-
background: {
|
|
58
|
-
type: 'BACKGROUND',
|
|
53
|
+
}),
|
|
54
|
+
background: design.background({
|
|
59
55
|
label: '$label.background.label',
|
|
60
56
|
colors: ['#FFFFFF66', '#0000004D', '#00000099', '#64C7FF66', '#F9947266', '#C794CD66', '#FFD17466'],
|
|
61
57
|
defaults: {
|
|
62
58
|
style: 'COLOR',
|
|
63
59
|
color: 'global.color.background',
|
|
64
60
|
},
|
|
65
|
-
},
|
|
66
|
-
}
|
|
61
|
+
}),
|
|
62
|
+
};
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
+
import { layout } from '@lightspeed/crane-api';
|
|
2
|
+
|
|
1
3
|
export default [
|
|
2
|
-
{
|
|
4
|
+
layout.init({
|
|
3
5
|
layoutId: 'Caption_On_Image',
|
|
4
6
|
selectedContentSettings: [],
|
|
5
7
|
selectedDesignSettings: [],
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
+
}),
|
|
9
|
+
layout.init({
|
|
8
10
|
layoutId: 'Caption_Under_Image',
|
|
9
11
|
selectedContentSettings: [],
|
|
10
12
|
selectedDesignSettings: [
|
|
11
|
-
{
|
|
13
|
+
layout.designOverride.text({
|
|
12
14
|
fieldName: 'section_title',
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
+
}),
|
|
16
|
+
layout.designOverride.text({
|
|
15
17
|
fieldName: 'section_description',
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
+
}),
|
|
19
|
+
layout.designOverride.text({
|
|
18
20
|
fieldName: 'image_text',
|
|
19
|
-
type: 'TEXT',
|
|
20
21
|
defaults: {
|
|
21
22
|
font: 'global.fontFamily.body',
|
|
22
23
|
size: 16,
|
|
@@ -25,10 +26,10 @@ export default [
|
|
|
25
26
|
color: '#000000',
|
|
26
27
|
visible: true,
|
|
27
28
|
},
|
|
28
|
-
},
|
|
29
|
-
{
|
|
29
|
+
}),
|
|
30
|
+
layout.designOverride.background({
|
|
30
31
|
fieldName: 'background',
|
|
31
|
-
},
|
|
32
|
+
}),
|
|
32
33
|
],
|
|
33
|
-
},
|
|
34
|
-
]
|
|
34
|
+
}),
|
|
35
|
+
];
|
|
@@ -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': 'This will be the main title for this section',
|
|
@@ -129,4 +131,4 @@ export default {
|
|
|
129
131
|
+ 'pouvez fournir des conseils utiles sur l\'utilisation de la section personnalisée',
|
|
130
132
|
'$label.info.button.label': 'En savoir plus',
|
|
131
133
|
},
|
|
132
|
-
}
|
|
134
|
+
});
|