@lightspeed/crane 1.1.2 → 1.1.3
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/dist/app.d.mts +20 -2
- package/dist/app.d.ts +20 -2
- package/dist/app.mjs +1 -1
- package/dist/cli.mjs +10 -23
- package/package.json +6 -5
- package/template/footers/example-footer/ExampleFooter.vue +6 -1
- package/template/footers/example-footer/assets/cart.svg +19 -0
- package/template/footers/example-footer/component/LegalLinks.vue +2 -2
- package/template/footers/example-footer/component/MadeWith.vue +23 -0
- package/template/footers/example-footer/component/ReportAbuse.vue +4 -3
- package/template/footers/example-footer/showcases/1.ts +1 -1
- package/template/headers/example-header/ExampleHeader.vue +17 -2
- package/template/headers/example-header/component/Account.vue +4 -4
- package/template/headers/example-header/component/Cart.vue +14 -33
- package/template/headers/example-header/settings/content.ts +1 -9
- package/template/headers/example-header/settings/design.ts +1 -23
- package/template/package.json +1 -1
- package/template/reference/sections/about-us/AboutUs.vue +73 -0
- package/template/reference/sections/about-us/assets/our_company_in_numbers.jpg +0 -0
- package/template/reference/sections/about-us/assets/our_company_in_numbers_preview.jpg +0 -0
- package/template/reference/sections/about-us/assets/our_team.jpg +0 -0
- package/template/reference/sections/about-us/assets/our_team_preview.jpg +0 -0
- package/template/reference/sections/about-us/client.ts +6 -0
- package/template/reference/sections/about-us/component/Image.vue +94 -0
- package/template/reference/sections/about-us/component/Stats.vue +155 -0
- package/template/reference/sections/about-us/component/Title.vue +32 -0
- package/template/reference/sections/about-us/server.ts +6 -0
- package/template/reference/sections/about-us/settings/content.ts +64 -0
- package/template/reference/sections/about-us/settings/design.ts +74 -0
- package/template/reference/sections/about-us/settings/layout.ts +12 -0
- package/template/reference/sections/about-us/settings/translations.ts +151 -0
- package/template/reference/sections/about-us/showcases/1.ts +176 -0
- package/template/reference/sections/about-us/showcases/2.ts +160 -0
- package/template/reference/sections/about-us/showcases/translations.ts +259 -0
- package/template/reference/sections/about-us/type.ts +5 -0
- package/template/reference/sections/about-us/util/visibility-provider.ts +27 -0
- package/template/reference/sections/intro-slider/IntroSlider.vue +77 -0
- package/template/reference/sections/intro-slider/assets/bike_1.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/bike_1@2x.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/bike_2.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/bike_2@2x.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/bike_3.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/bike_3@2x.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/bike_4.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/bike_4@2x.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/bike_5.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/bike_5@2x.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/bike_6.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/bike_6@2x.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/category_1.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/category_1@2x.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/category_2.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/category_2@2x.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/category_3.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/category_3@2x.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/category_5.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/category_5@2x.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/category_6.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/category_6@2x.jpg +0 -0
- package/template/reference/sections/intro-slider/assets/custom_section_showcase_1_preview.png +0 -0
- package/template/reference/sections/intro-slider/assets/custom_section_showcase_2_preview.png +0 -0
- package/template/reference/sections/intro-slider/client.ts +5 -0
- package/template/reference/sections/intro-slider/component/Slider.vue +235 -0
- package/template/reference/sections/intro-slider/component/Title.vue +106 -0
- package/template/reference/sections/intro-slider/entity/color.ts +4 -0
- package/template/reference/sections/intro-slider/server.ts +5 -0
- package/template/reference/sections/intro-slider/settings/content.ts +43 -0
- package/template/reference/sections/intro-slider/settings/design.ts +88 -0
- package/template/reference/sections/intro-slider/settings/layout.ts +12 -0
- package/template/reference/sections/intro-slider/settings/translations.ts +53 -0
- package/template/reference/sections/intro-slider/showcases/1.ts +274 -0
- package/template/reference/sections/intro-slider/showcases/2.ts +270 -0
- package/template/reference/sections/intro-slider/showcases/translations.ts +88 -0
- package/template/reference/sections/intro-slider/type.ts +5 -0
- package/template/reference/sections/tag-lines/TagLines.vue +158 -0
- package/template/reference/sections/tag-lines/assets/explore_our_holiday_gift_guide.jpg +0 -0
- package/template/reference/sections/tag-lines/assets/fall_is_here.jpg +0 -0
- package/template/reference/sections/tag-lines/assets/fall_is_here_preview.jpg +0 -0
- package/template/reference/sections/tag-lines/assets/folding_bikes.jpg +0 -0
- package/template/reference/sections/tag-lines/assets/hybrid_bikes.jpg +0 -0
- package/template/reference/sections/tag-lines/assets/mountain_and_road_bikes.jpg +0 -0
- package/template/reference/sections/tag-lines/assets/shop_chelsea_boots.jpg +0 -0
- package/template/reference/sections/tag-lines/assets/sweater_weather.jpg +0 -0
- package/template/reference/sections/tag-lines/assets/what_we_sell.jpg +0 -0
- package/template/reference/sections/tag-lines/assets/what_we_sell_preview.jpg +0 -0
- package/template/reference/sections/tag-lines/client.ts +5 -0
- package/template/reference/sections/tag-lines/component/HighlightedText.vue +50 -0
- package/template/reference/sections/tag-lines/component/SectionImage.vue +78 -0
- package/template/reference/sections/tag-lines/component/Title.vue +51 -0
- package/template/reference/sections/tag-lines/composables/highlighted-text-image-list.ts +34 -0
- package/template/reference/sections/tag-lines/server.ts +5 -0
- package/template/reference/sections/tag-lines/settings/content.ts +37 -0
- package/template/reference/sections/tag-lines/settings/design.ts +81 -0
- package/template/reference/sections/tag-lines/settings/layout.ts +12 -0
- package/template/reference/sections/tag-lines/settings/translations.ts +61 -0
- package/template/reference/sections/tag-lines/showcases/1.ts +190 -0
- package/template/reference/sections/tag-lines/showcases/2.ts +190 -0
- package/template/reference/sections/tag-lines/showcases/translations.ts +49 -0
- package/template/reference/sections/tag-lines/type.ts +5 -0
- package/template/reference/shared/components/Button.vue +151 -0
- package/template/reference/shared/components/SectionWrapper.vue +26 -0
- package/template/reference/shared/components/Tagline.vue +45 -0
- package/template/reference/shared/utils/color.ts +16 -0
- package/template/reference/shared/utils/styles.ts +12 -0
- package/template/reference/templates/assets/reference_template_apparel_cover_image.jpg +0 -0
- package/template/reference/templates/assets/reference_template_bike_cover_image.jpg +0 -0
- package/template/reference/templates/reference-template-apparel.ts +44 -0
- package/template/reference/templates/reference-template-bike.ts +44 -0
- package/template/sections/example-section/ExampleSection.vue +8 -19
- package/template/sections/example-section/assets/bike_accessories_high.jpg +0 -0
- package/template/sections/example-section/assets/bike_accessories_low.jpg +0 -0
- package/template/sections/example-section/assets/bike_new_arrivals_high.jpg +0 -0
- package/template/sections/example-section/assets/bike_new_arrivals_low.jpg +0 -0
- package/template/sections/example-section/assets/custom_section_showcase_3_preview.jpg +0 -0
- package/template/sections/example-section/assets/fixed_gears_high.jpg +0 -0
- package/template/sections/example-section/assets/fixed_gears_low.jpg +0 -0
- package/template/sections/example-section/assets/repair_service_high.jpg +0 -0
- package/template/sections/example-section/assets/repair_service_low.jpg +0 -0
- package/template/sections/example-section/settings/translations.ts +39 -7
- package/template/sections/example-section/showcases/3.ts +198 -0
- package/template/sections/example-section/showcases/translations.ts +49 -1
- package/template/shared/{LanguageSelector.vue → components/LanguageSelector.vue} +1 -1
- package/template/shared/components/SectionWrapper.vue +26 -0
- package/template/templates/template.ts +2 -1
- package/types.d.ts +96 -70
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lightspeed/crane",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": "bin/crane.js",
|
|
6
6
|
"main": "./dist/app.mjs",
|
|
@@ -32,24 +32,23 @@
|
|
|
32
32
|
},
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"devDependencies": {
|
|
35
|
+
"@jest/globals": "^29.7.0",
|
|
35
36
|
"@types/express-fileupload": "^1.5.0",
|
|
36
37
|
"@types/fs-extra": "^11.0.1",
|
|
37
38
|
"@types/jest": "^29.5.12",
|
|
38
39
|
"@types/node": "^20.4.5",
|
|
40
|
+
"dir-compare": "^5.0.0",
|
|
39
41
|
"express": "^4.19.2",
|
|
40
42
|
"express-fileupload": "^1.5.1",
|
|
41
43
|
"jest": "^29.7.0",
|
|
42
|
-
"terser": "^5.35.0",
|
|
43
44
|
"ts-jest": "^29.1.5",
|
|
44
45
|
"ts-node": "^10.9.2",
|
|
45
46
|
"typescript": "5.4.5",
|
|
46
47
|
"unbuild": "^2.0.0",
|
|
47
|
-
"vite-plugin-compression": "^0.5.1",
|
|
48
48
|
"vite-plugin-dts": "^3.4.0",
|
|
49
49
|
"vite-plugin-static-copy": "^0.17.0"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@jest/globals": "^29.7.0",
|
|
53
52
|
"@jridgewell/sourcemap-codec": "^1.4.15",
|
|
54
53
|
"@lightspeed/eslint-config-crane": "1.0.2",
|
|
55
54
|
"@types/prompts": "^2.4.2",
|
|
@@ -59,17 +58,19 @@
|
|
|
59
58
|
"axios": "^1.7.7",
|
|
60
59
|
"axios-concurrency": "^1.0.4",
|
|
61
60
|
"cac": "^6.7.14",
|
|
62
|
-
"
|
|
61
|
+
"cli-progress": "^3.12.0",
|
|
63
62
|
"eslint": "npm:eslint-customized-for-crane@8.57.0",
|
|
64
63
|
"fs-extra": "^11.1.1",
|
|
65
64
|
"glob": "^9.3.5",
|
|
66
65
|
"kolorist": "^1.8.0",
|
|
67
66
|
"prompts": "^2.4.2",
|
|
68
67
|
"semver": "^7.5.4",
|
|
68
|
+
"terser": "^5.35.0",
|
|
69
69
|
"tinycolor2": "^1.6.0",
|
|
70
70
|
"typescript": "5.4.5",
|
|
71
71
|
"vite": "^5.3.3",
|
|
72
72
|
"vite-plugin-checker": "^0.6.1",
|
|
73
|
+
"vite-plugin-compression": "^0.5.1",
|
|
73
74
|
"vite-plugin-externals": "^0.6.2",
|
|
74
75
|
"vite-tsconfig-paths": "^4.2.0",
|
|
75
76
|
"vue": "^3.4.0",
|
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
<div class="custom-footer__blank_space" />
|
|
11
11
|
<LanguageSelector />
|
|
12
12
|
</div>
|
|
13
|
+
<div>
|
|
14
|
+
<MadeWith />
|
|
15
|
+
<div class="custom-block__blank_space" />
|
|
16
|
+
</div>
|
|
13
17
|
</div>
|
|
14
18
|
</template>
|
|
15
19
|
|
|
@@ -17,8 +21,9 @@
|
|
|
17
21
|
import { computed } from 'vue';
|
|
18
22
|
import { useBackgroundElementDesign } from '@lightspeed/crane';
|
|
19
23
|
import ReportAbuse from './component/ReportAbuse.vue';
|
|
24
|
+
import MadeWith from './component/MadeWith.vue';
|
|
20
25
|
import { Design } from './type.ts';
|
|
21
|
-
import LanguageSelector from '../../shared/LanguageSelector.vue';
|
|
26
|
+
import LanguageSelector from '../../shared/components/LanguageSelector.vue';
|
|
22
27
|
import LegalLinks from './component/LegalLinks.vue';
|
|
23
28
|
|
|
24
29
|
const backgroundDesign = useBackgroundElementDesign<Design>('background');
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<svg
|
|
2
|
+
width="28"
|
|
3
|
+
height="28"
|
|
4
|
+
viewBox="0 0 28 28"
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
style="width: 1.1em; height: 1.1em; margin-right: .5em;"
|
|
7
|
+
>
|
|
8
|
+
<g
|
|
9
|
+
fill="currentColor"
|
|
10
|
+
fill-rule="evenodd"
|
|
11
|
+
>
|
|
12
|
+
<path
|
|
13
|
+
d="M21.523 0H6.377C2.89 0 0 2.9 0 6.4v15.3C0 25.2 2.89 28 6.377 28h15.246C25.11 28 28 25.2 28 21.6V6.4C27.9 2.9 25.01 0 21.523 0Zm-4.085 7.5c.697 0 1.295.6 1.295 1.3 0 .7-.598 1.3-1.295 1.3-.698 0-1.296-.6-1.296-1.3 0-.7.598-1.3 1.296-1.3Zm0 3.6c.697 0 1.295.6 1.295 1.3 0 .7-.598 1.3-1.295 1.3-.698 0-1.296-.6-1.296-1.3 0-.7.598-1.3 1.296-1.3ZM13.85 7.5c.697 0 1.295.6 1.295 1.3 0 .7-.598 1.3-1.295 1.3-.698 0-1.296-.6-1.296-1.3 0-.7.598-1.3 1.296-1.3Zm0 3.6c.697 0 1.295.6 1.295 1.3 0 .7-.598 1.3-1.295 1.3-.698 0-1.296-.6-1.296-1.3.1-.7.598-1.3 1.296-1.3Zm-3.488-3.6c.697 0 1.295.6 1.295 1.3 0 .7-.598 1.3-1.295 1.3-.698 0-1.295-.6-1.295-1.3 0-.7.597-1.3 1.295-1.3Zm0 3.6c.697 0 1.295.6 1.295 1.3 0 .7-.598 1.3-1.295 1.3-.698 0-1.295-.6-1.295-1.3 0-.7.597-1.3 1.295-1.3ZM6.975 24.4c-1.295 0-2.391-1.1-2.391-2.4 0-1.3 1.096-2.4 2.391-2.4s2.392 1.1 2.392 2.4c0 1.4-1.097 2.4-2.392 2.4Zm13.85.2c-1.295 0-2.39-1.1-2.39-2.4 0-1.3 1.095-2.4 2.39-2.4 1.296 0 2.392 1.1 2.392 2.4 0 1.3-.996 2.4-2.391 2.4ZM25.11 4.9l-2.49 9.3c-.698 2.5-2.79 4-5.282 4h-1.594c-.498 0-1.296-.3-1.694-.6-.1-.1-.1-.1-.2 0-.298.3-1.096.6-1.693.6h-1.794c-2.491 0-4.384-1.4-5.082-3.8L3.09 7.8c0-.1 0-.3.1-.4.1-.1.199-.2.398-.2h.399c.996 0 1.793.6 2.092 1.6l1.595 4.9c.398 1.3 1.793 2.2 3.188 2.2h.598c.598 0 1.096-.3 1.295-.6.1-.1.3-.2.499-.2h1.395c.199 0 .398.1.498.2.299.3.697.6 1.295.6h.598c1.395 0 2.79-1 3.189-2.4L22.22 6c.299-1 1.195-1.7 2.192-1.7h.498c.1.2.2.4.2.6Z"
|
|
14
|
+
/>
|
|
15
|
+
<path
|
|
16
|
+
d="M20.9 21.3c-.5 0-.9.4-.9.9s.4.9.9.9.9-.4.9-.9-.4-.9-.9-.9zM7 21.2c-.5 0-.9.4-.9.9s.4.9.9.9.9-.4.9-.9c-.1-.5-.5-.9-.9-.9z"
|
|
17
|
+
/>
|
|
18
|
+
</g>
|
|
19
|
+
</svg>
|
|
@@ -12,8 +12,8 @@ import { useVueBaseProps } from '@lightspeed/crane';
|
|
|
12
12
|
import { Design } from '../type.ts';
|
|
13
13
|
|
|
14
14
|
const baseProps = useVueBaseProps<unknown, Design>();
|
|
15
|
-
const
|
|
16
|
-
const legalLinks =
|
|
15
|
+
const siteContent: SiteContent = baseProps.site?.value satisfies SiteContent;
|
|
16
|
+
const legalLinks = siteContent.legalPages ?? [];
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
19
|
<style lang="scss" scoped>
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<a :href="madeWith?.url" target="{{ madeWith?.target }}">
|
|
4
|
+
<span>{{ madeWith?.poweredBy }} </span>
|
|
5
|
+
<span>
|
|
6
|
+
<img src="../assets/cart.svg" alt="cart" />
|
|
7
|
+
</span>
|
|
8
|
+
<span>{{ madeWith?.company }}</span>
|
|
9
|
+
</a>
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script setup lang="ts">
|
|
14
|
+
import { useVueBaseProps } from '@lightspeed/crane';
|
|
15
|
+
import { Design } from '../type.ts';
|
|
16
|
+
|
|
17
|
+
const baseProps = useVueBaseProps<unknown, Design>();
|
|
18
|
+
const siteContent: SiteContent = baseProps.site?.value satisfies SiteContent;
|
|
19
|
+
const madeWith = siteContent.madeWith;
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<style lang="scss" scoped>
|
|
23
|
+
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div>
|
|
3
|
-
<a :href="
|
|
4
|
-
{{
|
|
3
|
+
<a :href="reportAbuse?.url" target="{{ reportAbuse?.target }}}">
|
|
4
|
+
{{ reportAbuse?.title }}
|
|
5
5
|
</a>
|
|
6
6
|
</div>
|
|
7
7
|
</template>
|
|
@@ -11,7 +11,8 @@ import { useVueBaseProps } from '@lightspeed/crane';
|
|
|
11
11
|
import { Design } from '../type.ts';
|
|
12
12
|
|
|
13
13
|
const baseProps = useVueBaseProps<unknown, Design>();
|
|
14
|
-
const
|
|
14
|
+
const siteContent: SiteContent = baseProps.site.value satisfies SiteContent;
|
|
15
|
+
const reportAbuse = siteContent.reportAbuse;
|
|
15
16
|
</script>
|
|
16
17
|
|
|
17
18
|
<style lang="scss" scoped>
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
<script setup lang="ts">
|
|
17
17
|
import NavigationMenu from './component/NavigationMenu.vue';
|
|
18
|
-
import LanguageSelector from '../../shared/LanguageSelector.vue';
|
|
18
|
+
import LanguageSelector from '../../shared/components/LanguageSelector.vue';
|
|
19
19
|
import CartIcon from './component/Cart.vue';
|
|
20
20
|
import Logo from './component/Logo.vue';
|
|
21
21
|
import SearchForm from './component/SearchForm.vue';
|
|
@@ -27,16 +27,31 @@ import Account from './component/Account.vue';
|
|
|
27
27
|
display: flex;
|
|
28
28
|
justify-content: space-between;
|
|
29
29
|
padding: 5px 10px;
|
|
30
|
+
|
|
30
31
|
.custom-header__right{
|
|
31
32
|
display: flex;
|
|
32
33
|
flex: 0 0 auto;
|
|
33
34
|
gap: 10px;
|
|
34
35
|
align-items: center;
|
|
35
|
-
justify-content: flex-
|
|
36
|
+
justify-content: flex-start;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.custom-header__right {
|
|
36
40
|
order: 3;
|
|
37
41
|
text-align: right;
|
|
38
42
|
}
|
|
43
|
+
|
|
44
|
+
.custom-header__left{
|
|
45
|
+
display: flex;
|
|
46
|
+
flex: 0 0 auto;
|
|
47
|
+
gap: 10px;
|
|
48
|
+
align-items: center;
|
|
49
|
+
justify-content: flex-end;
|
|
50
|
+
order: 3;
|
|
51
|
+
text-align: left;
|
|
52
|
+
}
|
|
39
53
|
}
|
|
54
|
+
|
|
40
55
|
.header-content {
|
|
41
56
|
padding: 0 12px;
|
|
42
57
|
height: 48px;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div v-if="
|
|
3
|
-
<a :href="
|
|
2
|
+
<div v-if="account">
|
|
3
|
+
<a :href="account?.url" :target="account?.target">
|
|
4
4
|
<img :src="accountIcon" alt="account icon" />
|
|
5
5
|
</a>
|
|
6
6
|
</div>
|
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
<script setup lang="ts">
|
|
10
10
|
import { useVueBaseProps } from '@lightspeed/crane';
|
|
11
|
-
import { computed } from 'vue';
|
|
12
11
|
import { Design } from '../type.ts';
|
|
13
12
|
import accountIcon from '../assets/account_icon.svg';
|
|
14
13
|
|
|
15
14
|
const baseProps = useVueBaseProps<unknown, Design>();
|
|
16
|
-
const
|
|
15
|
+
const siteContent: SiteContent = baseProps.site.value satisfies SiteContent;
|
|
16
|
+
const account = siteContent.account;
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
19
|
<style lang="scss" scoped>
|
|
@@ -1,47 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="cart-icon">
|
|
3
|
-
<a href="
|
|
3
|
+
<a :href="cart.url" role="button">
|
|
4
4
|
<img alt="cart" src="../assets/cart.svg">
|
|
5
5
|
<span
|
|
6
|
-
v-if="
|
|
6
|
+
v-if="cart.count > 0"
|
|
7
7
|
class="item-count"
|
|
8
8
|
>
|
|
9
|
-
{{
|
|
9
|
+
{{ cart.count > 99 ? '99+' : cart.count }}
|
|
10
10
|
</span>
|
|
11
11
|
</a>
|
|
12
12
|
</div>
|
|
13
13
|
</template>
|
|
14
14
|
|
|
15
|
-
<script setup>
|
|
16
|
-
import
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
cartItemCount.value = result?.productsQuantity ?? 0;
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function subscribeOnCartChange() {
|
|
31
|
-
if (typeof document === 'undefined') {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
document.addEventListener('visibilitychange', () => {
|
|
36
|
-
if (document.visibilityState !== 'hidden') {
|
|
37
|
-
setCartItemCount();
|
|
38
|
-
}
|
|
39
|
-
}, false);
|
|
40
|
-
|
|
41
|
-
setCartItemCount();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
subscribeOnCartChange();
|
|
15
|
+
<script setup lang="ts">
|
|
16
|
+
import { useVueBaseProps } from '@lightspeed/crane';
|
|
17
|
+
import { computed } from 'vue';
|
|
18
|
+
import { Design } from '../type.ts';
|
|
19
|
+
|
|
20
|
+
const baseProps = useVueBaseProps<unknown, Design>();
|
|
21
|
+
const siteContent = computed(() => baseProps.site?.value satisfies SiteContent);
|
|
22
|
+
const cart = computed(() => ({
|
|
23
|
+
count: siteContent.value?.cart?.count ?? 0,
|
|
24
|
+
url: siteContent.value?.cart?.url ?? '',
|
|
25
|
+
}));
|
|
45
26
|
</script>
|
|
46
27
|
|
|
47
28
|
<style scoped>
|
|
@@ -1,23 +1 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
logo: {
|
|
3
|
-
type: 'LOGO',
|
|
4
|
-
label: '$label.logo.label',
|
|
5
|
-
colors: ['#FFFFFF66', '#0000004D', '#00000099', '#64C7FF66', '#F9947266', '#C794CD66', '#FFD17466'],
|
|
6
|
-
sizes: [18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60],
|
|
7
|
-
defaults: {
|
|
8
|
-
font: 'global.fontFamily.body',
|
|
9
|
-
size: 20,
|
|
10
|
-
bold: true,
|
|
11
|
-
italic: false,
|
|
12
|
-
color: '#313131',
|
|
13
|
-
visible: true,
|
|
14
|
-
spacing: 2,
|
|
15
|
-
capitalization: 'all',
|
|
16
|
-
frame: {
|
|
17
|
-
visible: true,
|
|
18
|
-
width: 3,
|
|
19
|
-
color: '#313131',
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
} as const;
|
|
1
|
+
export default {} as const;
|
package/template/package.json
CHANGED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<SectionWrapper class="about-us-section" :style="backgroundStyle">
|
|
3
|
+
<div class="about-us-section__wrapper">
|
|
4
|
+
<Image
|
|
5
|
+
v-if="isImageVisible"
|
|
6
|
+
class="about-us-section__image"
|
|
7
|
+
/>
|
|
8
|
+
|
|
9
|
+
<div class="about-us-section__content">
|
|
10
|
+
<Title v-if="isTitleVisible" />
|
|
11
|
+
<Stats />
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</SectionWrapper>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script setup lang="ts">
|
|
18
|
+
import { useBackgroundElementDesign } from '@lightspeed/crane';
|
|
19
|
+
import { computed, CSSProperties } from 'vue';
|
|
20
|
+
|
|
21
|
+
import Image from './component/Image.vue';
|
|
22
|
+
import type { Design } from './type.ts';
|
|
23
|
+
import { useVisibilityProvider } from './util/visibility-provider.ts';
|
|
24
|
+
import Stats from './component/Stats.vue';
|
|
25
|
+
import Title from './component/Title.vue';
|
|
26
|
+
import SectionWrapper from '../../shared/components/SectionWrapper.vue';
|
|
27
|
+
|
|
28
|
+
const { isImageVisible, isTitleVisible } = useVisibilityProvider();
|
|
29
|
+
|
|
30
|
+
const backgroundDesign = useBackgroundElementDesign<Design>('background');
|
|
31
|
+
const background = computed(() => ({
|
|
32
|
+
type: backgroundDesign.background?.type,
|
|
33
|
+
solidColor: backgroundDesign.background?.solid?.color as Color,
|
|
34
|
+
fromColor: backgroundDesign.background?.gradient?.fromColor as Color,
|
|
35
|
+
toColor: backgroundDesign.background?.gradient?.toColor as Color,
|
|
36
|
+
}));
|
|
37
|
+
|
|
38
|
+
const backgroundStyle = computed<CSSProperties>(() => {
|
|
39
|
+
if (background.value.type === 'gradient') {
|
|
40
|
+
return { 'background-image': `linear-gradient(to right, ${background.value.fromColor.hex}, ${background.value.toColor.hex})` };
|
|
41
|
+
}
|
|
42
|
+
return { 'background-color': background.value.solidColor.hex };
|
|
43
|
+
});
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<style lang="scss" scoped>
|
|
47
|
+
.about-us-section {
|
|
48
|
+
&__wrapper {
|
|
49
|
+
display: grid;
|
|
50
|
+
grid-template-columns: 1fr;
|
|
51
|
+
gap: 75px;
|
|
52
|
+
|
|
53
|
+
@media screen and (min-width: 900px) {
|
|
54
|
+
grid-template-columns: 1fr 1fr;
|
|
55
|
+
align-items: center;
|
|
56
|
+
gap: 100px;
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&__image {
|
|
61
|
+
max-width: 479px;
|
|
62
|
+
max-height: 610px;
|
|
63
|
+
margin: 0 auto;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
&__content {
|
|
67
|
+
flex: 1;
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
align-self: center;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
</style>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="image-section">
|
|
3
|
+
<div
|
|
4
|
+
:class="overlayClass"
|
|
5
|
+
class="image-section__overlay"
|
|
6
|
+
:style="overlayStyle"
|
|
7
|
+
>
|
|
8
|
+
<img
|
|
9
|
+
class="image-section__content"
|
|
10
|
+
:src="imageContent.highResolutionMobileImage"
|
|
11
|
+
loading="lazy"
|
|
12
|
+
alt=""
|
|
13
|
+
/>
|
|
14
|
+
</div>
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script setup lang="ts">
|
|
19
|
+
import {
|
|
20
|
+
useImageElementContent,
|
|
21
|
+
useImageElementDesign,
|
|
22
|
+
useLayoutElementDesign,
|
|
23
|
+
} from '@lightspeed/crane';
|
|
24
|
+
import { computed, CSSProperties } from 'vue';
|
|
25
|
+
|
|
26
|
+
import type { Content, Design } from '../type.ts';
|
|
27
|
+
|
|
28
|
+
function getColor(color: string) {
|
|
29
|
+
return `${color}20`;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
const imageContent = useImageElementContent<Content>('image');
|
|
33
|
+
const imageDesign = useImageElementDesign<Design>('image');
|
|
34
|
+
const layoutDesign = useLayoutElementDesign();
|
|
35
|
+
|
|
36
|
+
const overlayConfig = computed(() => ({
|
|
37
|
+
solidOverlay: getColor((imageDesign.overlay?.solid?.color as Color).raw),
|
|
38
|
+
gradientOverlay: 'linear-gradient(180deg, '
|
|
39
|
+
+ `${getColor((imageDesign.overlay?.gradient?.fromColor as Color).raw)} 0%, `
|
|
40
|
+
+ `${getColor((imageDesign.overlay?.gradient?.toColor as Color).raw)} 100%)`,
|
|
41
|
+
}));
|
|
42
|
+
|
|
43
|
+
const overlayClass = computed(() => ([
|
|
44
|
+
'image-section__overlay',
|
|
45
|
+
{
|
|
46
|
+
'image-section__overlay--border-radius': layoutDesign.layout === 'Images_With_Border_Radius',
|
|
47
|
+
},
|
|
48
|
+
]));
|
|
49
|
+
|
|
50
|
+
const overlayStyle = computed(() => {
|
|
51
|
+
const style: CSSProperties = {};
|
|
52
|
+
|
|
53
|
+
if (imageDesign.visible && imageDesign.overlay?.type === 'gradient') {
|
|
54
|
+
style.background = overlayConfig.value.gradientOverlay;
|
|
55
|
+
}
|
|
56
|
+
if (imageDesign.visible && imageDesign.overlay?.type === 'solid') {
|
|
57
|
+
style.background = overlayConfig.value.solidOverlay;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
return style;
|
|
61
|
+
});
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<style lang="scss" scoped>
|
|
65
|
+
.image-section {
|
|
66
|
+
height: 100%;
|
|
67
|
+
position: relative;
|
|
68
|
+
width: 100%;
|
|
69
|
+
display: flex;
|
|
70
|
+
z-index: 999;
|
|
71
|
+
|
|
72
|
+
&__overlay {
|
|
73
|
+
display: flex;
|
|
74
|
+
width: 100%;
|
|
75
|
+
height: 100%;
|
|
76
|
+
overflow: hidden;
|
|
77
|
+
|
|
78
|
+
&--border-radius {
|
|
79
|
+
border-radius: 24px;
|
|
80
|
+
|
|
81
|
+
@media screen and (min-width: 900px) {
|
|
82
|
+
border-radius: 32px;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&__content {
|
|
88
|
+
height: 100%;
|
|
89
|
+
width: 100%;
|
|
90
|
+
object-fit: cover;
|
|
91
|
+
z-index: -1;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
</style>
|