@lightspeed/crane 1.1.1 → 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 +76 -8
- package/dist/app.d.ts +76 -8
- package/dist/app.mjs +1 -1
- package/dist/cli.mjs +10 -23
- package/package.json +6 -5
- package/template/footers/example-footer/ExampleFooter.vue +12 -2
- package/template/footers/example-footer/assets/cart.svg +19 -0
- package/template/footers/example-footer/component/LegalLinks.vue +20 -0
- 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 +38 -4
- package/template/headers/example-header/assets/account_icon.svg +11 -0
- package/template/headers/example-header/assets/lightspeed_logo.png +0 -0
- package/template/headers/example-header/component/Account.vue +20 -0
- package/template/headers/example-header/component/Cart.vue +14 -33
- package/template/headers/example-header/component/Logo.vue +95 -0
- package/template/headers/example-header/component/NavigationMenu.vue +53 -0
- package/template/headers/example-header/settings/translations.ts +6 -2
- package/template/headers/example-header/showcases/1.ts +32 -3
- package/template/headers/example-header/showcases/2.ts +42 -0
- package/template/headers/example-header/showcases/translations.ts +14 -2
- 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/components/LanguageSelector.vue +75 -0
- package/template/shared/components/SectionWrapper.vue +26 -0
- package/template/templates/template.ts +28 -43
- package/types.d.ts +264 -141
- package/template/headers/example-header/component/SampleComponent.vue +0 -11
|
@@ -1,30 +1,64 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="custom-header">
|
|
3
|
-
<div class="custom-header__left"
|
|
3
|
+
<div class="custom-header__left">
|
|
4
|
+
<Logo />
|
|
5
|
+
<NavigationMenu />
|
|
6
|
+
</div>
|
|
4
7
|
<div class="custom-header__right">
|
|
5
8
|
<SearchForm />
|
|
9
|
+
<LanguageSelector />
|
|
10
|
+
<Account />
|
|
6
11
|
<CartIcon />
|
|
7
12
|
</div>
|
|
8
13
|
</div>
|
|
9
14
|
</template>
|
|
10
15
|
|
|
11
16
|
<script setup lang="ts">
|
|
17
|
+
import NavigationMenu from './component/NavigationMenu.vue';
|
|
18
|
+
import LanguageSelector from '../../shared/components/LanguageSelector.vue';
|
|
12
19
|
import CartIcon from './component/Cart.vue';
|
|
20
|
+
import Logo from './component/Logo.vue';
|
|
13
21
|
import SearchForm from './component/SearchForm.vue';
|
|
22
|
+
import Account from './component/Account.vue';
|
|
14
23
|
</script>
|
|
15
24
|
|
|
16
25
|
<style scoped lang="scss">
|
|
17
|
-
.custom-header{
|
|
26
|
+
.custom-header {
|
|
18
27
|
display: flex;
|
|
19
28
|
justify-content: space-between;
|
|
20
|
-
padding: 10px;
|
|
29
|
+
padding: 5px 10px;
|
|
30
|
+
|
|
21
31
|
.custom-header__right{
|
|
22
32
|
display: flex;
|
|
23
33
|
flex: 0 0 auto;
|
|
34
|
+
gap: 10px;
|
|
24
35
|
align-items: center;
|
|
25
|
-
justify-content: flex-
|
|
36
|
+
justify-content: flex-start;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.custom-header__right {
|
|
26
40
|
order: 3;
|
|
27
41
|
text-align: right;
|
|
28
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
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.header-content {
|
|
56
|
+
padding: 0 12px;
|
|
57
|
+
height: 48px;
|
|
58
|
+
width: min(1280px, 100%);
|
|
59
|
+
margin: auto;
|
|
60
|
+
display: flex;
|
|
61
|
+
justify-content: space-between;
|
|
62
|
+
align-items: center;
|
|
29
63
|
}
|
|
30
64
|
</style>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<svg
|
|
2
|
+
width="24"
|
|
3
|
+
height="24"
|
|
4
|
+
viewBox="0 0 24 24"
|
|
5
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
6
|
+
>
|
|
7
|
+
<path
|
|
8
|
+
d="M23.5 12.0037C23.5012 10.0898 23.0244 8.20585 22.1129 6.52281C21.2014 4.83976 19.884 3.41084 18.2802 2.36565C16.6764 1.32047 14.8369 0.692104 12.9287 0.537549C11.0204 0.382995 9.10378 0.707143 7.35258 1.48059C5.60138 2.25404 4.07105 3.45232 2.9004 4.96672C1.72975 6.48113 0.955821 8.26374 0.64882 10.1529C0.34182 12.042 0.511461 13.9779 1.14235 15.7848C1.77325 17.5918 2.84543 19.2128 4.26165 20.5006C4.28966 20.5338 4.32226 20.5629 4.35848 20.5869C6.46141 22.4631 9.18149 23.5 12.0001 23.5C14.8188 23.5 17.5388 22.463 19.6417 20.5867C19.6778 20.5628 19.7102 20.5338 19.7381 20.5007C20.9235 19.4252 21.8705 18.1135 22.5184 16.6501C23.1663 15.1867 23.5007 13.604 23.5 12.0037ZM1.42 12.0037C1.41878 10.2648 1.84643 8.55248 2.66509 7.01827C3.48375 5.48405 4.66817 4.17528 6.11348 3.20782C7.55879 2.24035 9.22042 1.64404 10.9512 1.47168C12.6821 1.29931 14.4287 1.55621 16.0365 2.21963C17.6444 2.88305 19.0638 3.93252 20.1691 5.27513C21.2744 6.61775 22.0316 8.21209 22.3735 9.91701C22.7155 11.6219 22.6317 13.3848 22.1295 15.0496C21.6274 16.7145 20.7224 18.2298 19.4947 19.4616C18.3528 17.55 16.5208 16.1493 14.3764 15.5482C15.373 15.0182 16.1638 14.1702 16.6228 13.1392C17.0819 12.1081 17.1828 10.9532 16.9096 9.85816C16.6364 8.76314 16.0047 7.79091 15.1151 7.09614C14.2254 6.40136 13.1289 6.02395 12 6.02395C10.8711 6.02395 9.77458 6.40136 8.88494 7.09614C7.9953 7.79091 7.36363 8.76314 7.09042 9.85816C6.8172 10.9532 6.91814 12.1081 7.37717 13.1392C7.8362 14.1702 8.62696 15.0182 9.62364 15.5482C7.4792 16.1493 5.64721 17.55 4.50533 19.4616C3.52633 18.4819 2.74996 17.3191 2.22057 16.0394C1.69119 14.7598 1.41915 13.3884 1.42 12.0037ZM12 15.2226C11.1812 15.2226 10.3808 14.9799 9.69994 14.5252C9.01912 14.0704 8.48848 13.424 8.17514 12.6678C7.86179 11.9115 7.77981 11.0794 7.93955 10.2765C8.09929 9.4737 8.49359 8.73626 9.07258 8.15745C9.65157 7.57864 10.3892 7.18447 11.1923 7.02478C11.9954 6.86509 12.8278 6.94705 13.5843 7.26029C14.3408 7.57354 14.9874 8.10401 15.4423 8.78461C15.8972 9.46522 16.14 10.2654 16.14 11.084C16.1388 12.1812 15.7022 13.2332 14.9261 14.0091C14.1499 14.785 13.0976 15.2214 12 15.2226ZM5.19947 20.0991C5.88217 18.8976 6.87116 17.8985 8.06574 17.2035C9.26032 16.5084 10.6178 16.1422 12 16.1422C13.3822 16.1422 14.7397 16.5084 15.9343 17.2035C17.1288 17.8985 18.1178 18.8976 18.8005 20.0991C16.897 21.7015 14.4885 22.5803 12 22.5803C9.51148 22.5803 7.10295 21.7015 5.19947 20.0991Z"
|
|
9
|
+
fill="currentColor"
|
|
10
|
+
/>
|
|
11
|
+
</svg>
|
|
Binary file
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div v-if="account">
|
|
3
|
+
<a :href="account?.url" :target="account?.target">
|
|
4
|
+
<img :src="accountIcon" alt="account icon" />
|
|
5
|
+
</a>
|
|
6
|
+
</div>
|
|
7
|
+
</template>
|
|
8
|
+
|
|
9
|
+
<script setup lang="ts">
|
|
10
|
+
import { useVueBaseProps } from '@lightspeed/crane';
|
|
11
|
+
import { Design } from '../type.ts';
|
|
12
|
+
import accountIcon from '../assets/account_icon.svg';
|
|
13
|
+
|
|
14
|
+
const baseProps = useVueBaseProps<unknown, Design>();
|
|
15
|
+
const siteContent: SiteContent = baseProps.site.value satisfies SiteContent;
|
|
16
|
+
const account = siteContent.account;
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<style lang="scss" scoped>
|
|
20
|
+
</style>
|
|
@@ -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>
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
v-if="logoDesign.visible"
|
|
4
|
+
class="logo-section"
|
|
5
|
+
>
|
|
6
|
+
<div
|
|
7
|
+
v-if="logoContent.type === 'TEXT'"
|
|
8
|
+
class="logo-section__text-frame"
|
|
9
|
+
:style="logoFrameStyle"
|
|
10
|
+
>
|
|
11
|
+
<h1
|
|
12
|
+
:style="logoTextStyle"
|
|
13
|
+
>
|
|
14
|
+
{{ logoTextContent }}
|
|
15
|
+
</h1>
|
|
16
|
+
</div>
|
|
17
|
+
<div
|
|
18
|
+
v-if="logoContent.type === 'IMAGE'"
|
|
19
|
+
class="logo-section-image"
|
|
20
|
+
>
|
|
21
|
+
<img
|
|
22
|
+
v-if="logoContent.image?.lowResolutionDesktopImage !== undefined"
|
|
23
|
+
class="logo-section-image__content"
|
|
24
|
+
:src="logoContent.image?.lowResolutionDesktopImage"
|
|
25
|
+
>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
|
|
30
|
+
<script setup lang="ts">
|
|
31
|
+
import { useLogoElementContent, useLogoElementDesign } from '@lightspeed/crane';
|
|
32
|
+
import { computed } from 'vue';
|
|
33
|
+
|
|
34
|
+
function getColor(color: Color | undefined) {
|
|
35
|
+
if (typeof color === 'undefined') {
|
|
36
|
+
return '';
|
|
37
|
+
}
|
|
38
|
+
return color.hex;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const logoContent = useLogoElementContent();
|
|
42
|
+
const logoDesign = useLogoElementDesign();
|
|
43
|
+
|
|
44
|
+
const logoTextContent = computed(() => {
|
|
45
|
+
if (logoContent.text !== undefined) {
|
|
46
|
+
if (logoDesign.value.capitalization === 'all') {
|
|
47
|
+
return logoContent.text.toUpperCase();
|
|
48
|
+
}
|
|
49
|
+
if (logoDesign.value.capitalization === 'small') {
|
|
50
|
+
return logoContent.text.toLowerCase();
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return logoContent.text;
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
const logoTextStyle = computed(() => ({
|
|
57
|
+
fontSize: `${logoDesign.value.size}px`,
|
|
58
|
+
fontFamily: logoDesign.value.font,
|
|
59
|
+
color: getColor(logoDesign.value.color),
|
|
60
|
+
'font-style': logoDesign.value.italic ? 'italic' : 'normal',
|
|
61
|
+
'font-weight': logoDesign.value.bold ? 'bold' : 'normal',
|
|
62
|
+
'letter-spacing': `${logoDesign.value.spacing ?? 0}px`,
|
|
63
|
+
}));
|
|
64
|
+
|
|
65
|
+
const logoFrameStyle = computed(() => ({
|
|
66
|
+
'border-style': logoDesign.value.frame?.visible ? 'solid' : 'hidden',
|
|
67
|
+
'border-width': `${logoDesign.value.frame?.width ?? 1}px`,
|
|
68
|
+
'border-color': getColor(logoDesign.value.frame?.color),
|
|
69
|
+
}));
|
|
70
|
+
</script>
|
|
71
|
+
|
|
72
|
+
<style lang="scss" scoped>
|
|
73
|
+
.logo-section {
|
|
74
|
+
height: 100%;
|
|
75
|
+
width: 300px;
|
|
76
|
+
text-align: center;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.logo-section__text-frame {
|
|
80
|
+
text-align: center;
|
|
81
|
+
border-radius: 3px;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.logo-section-image {
|
|
85
|
+
height: 100%;
|
|
86
|
+
width: 100%;
|
|
87
|
+
display:block;
|
|
88
|
+
|
|
89
|
+
&__content {
|
|
90
|
+
height: 100%;
|
|
91
|
+
width: 100%;
|
|
92
|
+
object-fit: contain;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
</style>
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<nav
|
|
3
|
+
v-if="navigationMenu.hasContent"
|
|
4
|
+
role="navigation"
|
|
5
|
+
>
|
|
6
|
+
<ul>
|
|
7
|
+
<li
|
|
8
|
+
v-for="item in navigationMenu.items"
|
|
9
|
+
:key="item.id"
|
|
10
|
+
>
|
|
11
|
+
<a @click="item.performAction">
|
|
12
|
+
{{ item.title }}
|
|
13
|
+
</a>
|
|
14
|
+
</li>
|
|
15
|
+
</ul>
|
|
16
|
+
</nav>
|
|
17
|
+
</template>
|
|
18
|
+
|
|
19
|
+
<script setup lang="ts">
|
|
20
|
+
import { useNavigationMenuElementContent } from '@lightspeed/crane';
|
|
21
|
+
|
|
22
|
+
const navigationMenu = useNavigationMenuElementContent();
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<style lang="scss" scoped>
|
|
26
|
+
ul {
|
|
27
|
+
gap: 16px;
|
|
28
|
+
display: flex;
|
|
29
|
+
overflow-x: auto;
|
|
30
|
+
white-space: nowrap;
|
|
31
|
+
height: 48px;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
li {
|
|
35
|
+
list-style: none;
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
min-width: fit-content;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
a {
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
font-size: 16px;
|
|
44
|
+
font-weight: 500;
|
|
45
|
+
color: #080d12;
|
|
46
|
+
text-decoration: none;
|
|
47
|
+
transition: color 0.35s ease;
|
|
48
|
+
|
|
49
|
+
&:hover {
|
|
50
|
+
color: #0056b3
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
</style>
|
|
@@ -1,11 +1,40 @@
|
|
|
1
1
|
export default {
|
|
2
|
+
showcaseId: '1',
|
|
2
3
|
previewImage: {
|
|
3
4
|
set: {
|
|
4
5
|
ORIGINAL: {
|
|
5
|
-
url: 'example_header_showcase_1_preview.
|
|
6
|
+
url: 'example_header_showcase_1_preview.png',
|
|
7
|
+
},
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
blockName: '$label.showcase_1.blockName',
|
|
11
|
+
content: {
|
|
12
|
+
logo: {
|
|
13
|
+
type: 'LOGO',
|
|
14
|
+
logoType: 'TEXT',
|
|
15
|
+
text: '$label.showcase_1.logo.text',
|
|
16
|
+
},
|
|
17
|
+
menu: {
|
|
18
|
+
type: 'NAVIGATION_MENU',
|
|
19
|
+
text: '$label.showcase_1.menu.text',
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
design: {
|
|
23
|
+
logo: {
|
|
24
|
+
type: 'LOGO',
|
|
25
|
+
font: 'global.fontFamily.body',
|
|
26
|
+
size: 20,
|
|
27
|
+
bold: true,
|
|
28
|
+
italic: true,
|
|
29
|
+
color: '#313131',
|
|
30
|
+
visible: true,
|
|
31
|
+
spacing: 2,
|
|
32
|
+
capitalization: 'none',
|
|
33
|
+
frame: {
|
|
34
|
+
visible: true,
|
|
35
|
+
width: 3,
|
|
36
|
+
color: '#313131',
|
|
6
37
|
},
|
|
7
38
|
},
|
|
8
39
|
},
|
|
9
|
-
content: {},
|
|
10
|
-
design: {},
|
|
11
40
|
} as const;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
showcaseId: '2',
|
|
3
|
+
previewImage: {
|
|
4
|
+
set: {
|
|
5
|
+
ORIGINAL: {
|
|
6
|
+
url: 'custom_section_showcase_2_preview.png',
|
|
7
|
+
},
|
|
8
|
+
},
|
|
9
|
+
},
|
|
10
|
+
blockName: '$label.showcase_2.blockName',
|
|
11
|
+
content: {
|
|
12
|
+
menu: {
|
|
13
|
+
type: 'NAVIGATION_MENU',
|
|
14
|
+
text: '$label.showcase_2.menu.text',
|
|
15
|
+
},
|
|
16
|
+
logo: {
|
|
17
|
+
type: 'LOGO',
|
|
18
|
+
logoType: 'IMAGE',
|
|
19
|
+
imageData: {
|
|
20
|
+
set: {
|
|
21
|
+
LOW_RES: {
|
|
22
|
+
url: 'lightspeed_logo.png',
|
|
23
|
+
},
|
|
24
|
+
MOBILE_WEBP_LOW_RES: {
|
|
25
|
+
url: 'lightspeed_logo.png',
|
|
26
|
+
},
|
|
27
|
+
MOBILE_WEBP_HI_RES: {
|
|
28
|
+
url: 'lightspeed_logo.png',
|
|
29
|
+
},
|
|
30
|
+
WEBP_LOW_RES: {
|
|
31
|
+
url: 'lightspeed_logo.png',
|
|
32
|
+
},
|
|
33
|
+
WEBP_HI_2X_RES: {
|
|
34
|
+
url: 'lightspeed_logo.png',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
borderInfo: {},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
design: {},
|
|
42
|
+
} as const;
|
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
export default {
|
|
2
|
-
en: {
|
|
2
|
+
en: {
|
|
3
|
+
'$label.showcase_1.blockName': 'Custom Header',
|
|
4
|
+
'$label.showcase_1.menu.text': 'Navigation Menu',
|
|
5
|
+
'$label.showcase_2.blockName': 'Custom Header',
|
|
6
|
+
'$label.showcase_2.menu.text': 'Navigation Menu',
|
|
7
|
+
'$label.showcase_1.logo.text': 'Example Text Logo',
|
|
8
|
+
},
|
|
3
9
|
|
|
4
|
-
nl: {
|
|
10
|
+
nl: {
|
|
11
|
+
'$label.showcase_1.blockName': 'Custom Header',
|
|
12
|
+
'$label.showcase_1.menu.text': 'Navigatie Menu',
|
|
13
|
+
'$label.showcase_2.blockName': 'Custom Header',
|
|
14
|
+
'$label.showcase_2.menu.text': 'Navigatie Menu',
|
|
15
|
+
'$label.showcase_1.logo.text': 'Voorbeeld Tekst Logo',
|
|
16
|
+
},
|
|
5
17
|
} 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>
|