@shopware/cms-base-layer 0.0.0-canary-20250116171244
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/LICENSE +21 -0
- package/README.md +144 -0
- package/components/SwCategoryNavigation.vue +44 -0
- package/components/SwCategoryNavigationLink.vue +57 -0
- package/components/SwContactForm.vue +392 -0
- package/components/SwListingProductPrice.vue +88 -0
- package/components/SwMedia3D.vue +34 -0
- package/components/SwNewsletterForm.vue +347 -0
- package/components/SwPagination.vue +106 -0
- package/components/SwProductAddToCart.vue +93 -0
- package/components/SwProductCard.vue +285 -0
- package/components/SwProductGallery.vue +39 -0
- package/components/SwProductListingFilter.vue +42 -0
- package/components/SwProductListingFilters.vue +292 -0
- package/components/SwProductPrice.vue +99 -0
- package/components/SwProductReviews.vue +99 -0
- package/components/SwProductUnits.vue +54 -0
- package/components/SwSharedPrice.vue +19 -0
- package/components/SwSlider.vue +328 -0
- package/components/SwVariantConfigurator.vue +116 -0
- package/components/listing-filters/SwFilterPrice.vue +160 -0
- package/components/listing-filters/SwFilterProperties.vue +123 -0
- package/components/listing-filters/SwFilterRating.vue +101 -0
- package/components/listing-filters/SwFilterShippingFree.vue +104 -0
- package/components/public/cms/CmsGenericBlock.md +27 -0
- package/components/public/cms/CmsGenericBlock.vue +63 -0
- package/components/public/cms/CmsGenericElement.md +31 -0
- package/components/public/cms/CmsGenericElement.vue +38 -0
- package/components/public/cms/CmsNoComponent.vue +27 -0
- package/components/public/cms/CmsPage.md +36 -0
- package/components/public/cms/CmsPage.vue +65 -0
- package/components/public/cms/block/CmsBlockCategoryNavigation.vue +16 -0
- package/components/public/cms/block/CmsBlockCenterText.vue +26 -0
- package/components/public/cms/block/CmsBlockCrossSelling.vue +15 -0
- package/components/public/cms/block/CmsBlockCustomForm.vue +17 -0
- package/components/public/cms/block/CmsBlockDefault.vue +14 -0
- package/components/public/cms/block/CmsBlockForm.vue +17 -0
- package/components/public/cms/block/CmsBlockGalleryBuybox.vue +25 -0
- package/components/public/cms/block/CmsBlockImage.vue +16 -0
- package/components/public/cms/block/CmsBlockImageBubbleRow.vue +32 -0
- package/components/public/cms/block/CmsBlockImageCover.vue +17 -0
- package/components/public/cms/block/CmsBlockImageFourColumn.vue +29 -0
- package/components/public/cms/block/CmsBlockImageGallery.vue +18 -0
- package/components/public/cms/block/CmsBlockImageHighlightRow.vue +27 -0
- package/components/public/cms/block/CmsBlockImageSimpleGrid.vue +24 -0
- package/components/public/cms/block/CmsBlockImageSlider.vue +17 -0
- package/components/public/cms/block/CmsBlockImageText.vue +19 -0
- package/components/public/cms/block/CmsBlockImageTextBubble.vue +51 -0
- package/components/public/cms/block/CmsBlockImageTextCover.vue +25 -0
- package/components/public/cms/block/CmsBlockImageTextGallery.vue +85 -0
- package/components/public/cms/block/CmsBlockImageTextRow.vue +43 -0
- package/components/public/cms/block/CmsBlockImageThreeColumn.vue +21 -0
- package/components/public/cms/block/CmsBlockImageThreeCover.vue +27 -0
- package/components/public/cms/block/CmsBlockImageTwoColumn.vue +25 -0
- package/components/public/cms/block/CmsBlockProductDescriptionReviews.vue +15 -0
- package/components/public/cms/block/CmsBlockProductHeading.vue +26 -0
- package/components/public/cms/block/CmsBlockProductListing.vue +17 -0
- package/components/public/cms/block/CmsBlockProductSlider.vue +16 -0
- package/components/public/cms/block/CmsBlockProductThreeColumn.vue +22 -0
- package/components/public/cms/block/CmsBlockSidebarFilter.vue +17 -0
- package/components/public/cms/block/CmsBlockText.vue +15 -0
- package/components/public/cms/block/CmsBlockTextHero.vue +15 -0
- package/components/public/cms/block/CmsBlockTextOnImage.vue +20 -0
- package/components/public/cms/block/CmsBlockTextTeaser.vue +16 -0
- package/components/public/cms/block/CmsBlockTextTeaserSection.vue +21 -0
- package/components/public/cms/block/CmsBlockTextThreeColumn.vue +22 -0
- package/components/public/cms/block/CmsBlockTextTwoColumn.vue +28 -0
- package/components/public/cms/block/CmsBlockVimeoVideo.vue +17 -0
- package/components/public/cms/block/CmsBlockYoutubeVideo.vue +17 -0
- package/components/public/cms/element/CmsElementBuyBox.md +1 -0
- package/components/public/cms/element/CmsElementBuyBox.vue +190 -0
- package/components/public/cms/element/CmsElementCategoryNavigation.md +1 -0
- package/components/public/cms/element/CmsElementCategoryNavigation.vue +167 -0
- package/components/public/cms/element/CmsElementCrossSelling.md +1 -0
- package/components/public/cms/element/CmsElementCrossSelling.vue +106 -0
- package/components/public/cms/element/CmsElementCustomForm.md +1 -0
- package/components/public/cms/element/CmsElementCustomForm.vue +27 -0
- package/components/public/cms/element/CmsElementForm.md +1 -0
- package/components/public/cms/element/CmsElementForm.vue +27 -0
- package/components/public/cms/element/CmsElementImage.md +1 -0
- package/components/public/cms/element/CmsElementImage.vue +105 -0
- package/components/public/cms/element/CmsElementImageGallery.md +1 -0
- package/components/public/cms/element/CmsElementImageGallery.vue +249 -0
- package/components/public/cms/element/CmsElementImageGallery3dPlaceholder.vue +53 -0
- package/components/public/cms/element/CmsElementImageSlider.md +1 -0
- package/components/public/cms/element/CmsElementImageSlider.vue +29 -0
- package/components/public/cms/element/CmsElementManufacturerLogo.md +1 -0
- package/components/public/cms/element/CmsElementManufacturerLogo.vue +11 -0
- package/components/public/cms/element/CmsElementProductBox.md +1 -0
- package/components/public/cms/element/CmsElementProductBox.vue +14 -0
- package/components/public/cms/element/CmsElementProductDescriptionReviews.md +1 -0
- package/components/public/cms/element/CmsElementProductDescriptionReviews.vue +109 -0
- package/components/public/cms/element/CmsElementProductListing.md +1 -0
- package/components/public/cms/element/CmsElementProductListing.vue +245 -0
- package/components/public/cms/element/CmsElementProductName.md +1 -0
- package/components/public/cms/element/CmsElementProductName.vue +10 -0
- package/components/public/cms/element/CmsElementProductSlider.md +1 -0
- package/components/public/cms/element/CmsElementProductSlider.vue +80 -0
- package/components/public/cms/element/CmsElementSidebarFilter.md +1 -0
- package/components/public/cms/element/CmsElementSidebarFilter.vue +12 -0
- package/components/public/cms/element/CmsElementText.md +1 -0
- package/components/public/cms/element/CmsElementText.vue +186 -0
- package/components/public/cms/element/CmsElementVimeoVideo.md +1 -0
- package/components/public/cms/element/CmsElementVimeoVideo.vue +63 -0
- package/components/public/cms/element/CmsElementYoutubeVideo.md +1 -0
- package/components/public/cms/element/CmsElementYoutubeVideo.vue +43 -0
- package/components/public/cms/section/CmsSectionDefault.md +3 -0
- package/components/public/cms/section/CmsSectionDefault.vue +21 -0
- package/components/public/cms/section/CmsSectionSidebar.md +3 -0
- package/components/public/cms/section/CmsSectionSidebar.vue +49 -0
- package/components/public/cms/skeleton/ProductCardSkeleton.vue +44 -0
- package/dist/index.d.mts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.mjs +31 -0
- package/helpers/clientOnly.ts +11 -0
- package/helpers/html-to-vue/ast.ts +72 -0
- package/helpers/html-to-vue/getOptionsFromNode.test.ts +129 -0
- package/helpers/html-to-vue/getOptionsFromNode.ts +52 -0
- package/helpers/html-to-vue/renderToHtml.ts +45 -0
- package/helpers/html-to-vue/renderer.ts +56 -0
- package/helpers/media/isSpatial.ts +8 -0
- package/index.cjs +7 -0
- package/nuxt.config.ts +21 -0
- package/package.json +69 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
Renders an Element type structure
|
|
2
|
+
|
|
3
|
+
Example usage:
|
|
4
|
+
|
|
5
|
+
```vue{19,22}
|
|
6
|
+
<script setup lang="ts">
|
|
7
|
+
import type { CmsBlockGalleryBuybox } from "@shopware/composables";
|
|
8
|
+
import { useCmsBlock } from "#imports";
|
|
9
|
+
|
|
10
|
+
const props = defineProps<{
|
|
11
|
+
content: CmsBlockGalleryBuybox;
|
|
12
|
+
}>();
|
|
13
|
+
|
|
14
|
+
const { getSlotContent } = useCmsBlock(props.content);
|
|
15
|
+
const rightContent = getSlotContent("right");
|
|
16
|
+
const leftContent = getSlotContent("left");
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<template>
|
|
20
|
+
<div
|
|
21
|
+
class="lg:container mx-auto flex flex-col lg:flex-row gap-10 justify-center"
|
|
22
|
+
>
|
|
23
|
+
<div class="overflow-hidden basis-4/6">
|
|
24
|
+
<CmsGenericElement :content="leftContent" />
|
|
25
|
+
</div>
|
|
26
|
+
<div class="basis-2/6">
|
|
27
|
+
<CmsGenericElement :content="rightContent" />
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</template>
|
|
31
|
+
```
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { resolveCmsComponent } from "@shopware/composables";
|
|
3
|
+
import { getCmsLayoutConfiguration } from "@shopware/helpers";
|
|
4
|
+
import { h } from "vue";
|
|
5
|
+
import type { Schemas } from "#shopware";
|
|
6
|
+
|
|
7
|
+
const props = defineProps<{
|
|
8
|
+
content: Schemas["CmsSlot"];
|
|
9
|
+
}>();
|
|
10
|
+
|
|
11
|
+
const DynamicRender = () => {
|
|
12
|
+
const {
|
|
13
|
+
resolvedComponent,
|
|
14
|
+
componentName,
|
|
15
|
+
isResolved,
|
|
16
|
+
componentNameToResolve,
|
|
17
|
+
} = resolveCmsComponent(props.content);
|
|
18
|
+
if (resolvedComponent) {
|
|
19
|
+
if (!isResolved)
|
|
20
|
+
return h("div", {}, `Problem resolving component: ${componentName}`);
|
|
21
|
+
|
|
22
|
+
const { cssClasses, layoutStyles } = getCmsLayoutConfiguration(
|
|
23
|
+
props.content,
|
|
24
|
+
);
|
|
25
|
+
return h(resolvedComponent, {
|
|
26
|
+
content: props.content,
|
|
27
|
+
style: layoutStyles,
|
|
28
|
+
class: cssClasses,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
console.error(`Component not resolved: ${componentNameToResolve}`);
|
|
32
|
+
return h("div", {}, "");
|
|
33
|
+
};
|
|
34
|
+
</script>
|
|
35
|
+
|
|
36
|
+
<template>
|
|
37
|
+
<DynamicRender />
|
|
38
|
+
</template>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
import type { Schemas } from "#shopware";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
content: Schemas["CmsBlock"];
|
|
7
|
+
}>();
|
|
8
|
+
|
|
9
|
+
const elementType = computed(() =>
|
|
10
|
+
props.content.apiAlias === "cms_block"
|
|
11
|
+
? "Block"
|
|
12
|
+
: props.content.apiAlias === "cms_section"
|
|
13
|
+
? "Section"
|
|
14
|
+
: "Element",
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
const componentName = computed(() => props.content.type);
|
|
18
|
+
</script>
|
|
19
|
+
Ū
|
|
20
|
+
<template>
|
|
21
|
+
<span class="sw-text-error">
|
|
22
|
+
<b>
|
|
23
|
+
{{ elementType }}<i> {{ componentName }} </i>
|
|
24
|
+
</b>
|
|
25
|
+
is not implemented yet!
|
|
26
|
+
</span>
|
|
27
|
+
</template>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
An entrypoint to render the whole CMS object
|
|
2
|
+
|
|
3
|
+
Example usage:
|
|
4
|
+
|
|
5
|
+
```vue{29}
|
|
6
|
+
<script setup lang="ts">
|
|
7
|
+
import { useLandingSearch } from "#imports";
|
|
8
|
+
import type { Schemas } from "#shopware";
|
|
9
|
+
|
|
10
|
+
const props = defineProps<{
|
|
11
|
+
navigationId: string;
|
|
12
|
+
}>();
|
|
13
|
+
|
|
14
|
+
const { search } = useLandingSearch();
|
|
15
|
+
|
|
16
|
+
const { data: landingResponse } = await useAsyncData(
|
|
17
|
+
"cmsLanding" + props.navigationId,
|
|
18
|
+
async () => {
|
|
19
|
+
const landingPage = await search(props.navigationId, {
|
|
20
|
+
withCmsAssociations: true,
|
|
21
|
+
});
|
|
22
|
+
return landingPage;
|
|
23
|
+
},
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
if (typeof landingResponse?.value !== null) {
|
|
27
|
+
const landingPage = landingResponse as Ref<Schemas["LandingPage"]>;
|
|
28
|
+
useCmsHead(landingPage, { mainShopTitle: "Shopware Frontends Demo Store" });
|
|
29
|
+
}
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<template>
|
|
33
|
+
<LayoutBreadcrumbs />
|
|
34
|
+
<CmsPage v-if="landingResponse?.cmsPage" :content="landingResponse.cmsPage" />
|
|
35
|
+
</template>
|
|
36
|
+
```
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import {
|
|
3
|
+
getBackgroundImageUrl,
|
|
4
|
+
getCmsLayoutConfiguration,
|
|
5
|
+
} from "@shopware/helpers";
|
|
6
|
+
import { pascalCase } from "scule";
|
|
7
|
+
import { computed, h, resolveComponent } from "vue";
|
|
8
|
+
import { createCategoryListingContext, useNavigationContext } from "#imports";
|
|
9
|
+
import type { Schemas } from "#shopware";
|
|
10
|
+
|
|
11
|
+
const props = defineProps<{
|
|
12
|
+
content: Schemas["CmsPage"];
|
|
13
|
+
}>();
|
|
14
|
+
|
|
15
|
+
const { routeName } = useNavigationContext();
|
|
16
|
+
if (routeName.value === "frontend.navigation.page") {
|
|
17
|
+
createCategoryListingContext();
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const cmsSections = computed<Schemas["CmsSection"][]>(() => {
|
|
21
|
+
return props.content?.sections || [];
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const DynamicRender = () => {
|
|
25
|
+
const componentsMap = cmsSections.value.map((section) => {
|
|
26
|
+
return {
|
|
27
|
+
name: `CmsSection${pascalCase(section.type)}`,
|
|
28
|
+
component: resolveComponent(`CmsSection${pascalCase(section.type)}`),
|
|
29
|
+
section: section,
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
return componentsMap.map((componentObject) => {
|
|
33
|
+
const { cssClasses, layoutStyles } = getCmsLayoutConfiguration(
|
|
34
|
+
componentObject.section,
|
|
35
|
+
);
|
|
36
|
+
if (typeof componentObject.component === "string") {
|
|
37
|
+
return h("div", {}, `There is no ${componentObject.component}`);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
if (layoutStyles?.backgroundImage) {
|
|
41
|
+
layoutStyles.backgroundImage = getBackgroundImageUrl(
|
|
42
|
+
layoutStyles.backgroundImage,
|
|
43
|
+
componentObject.section,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return h(componentObject.component, {
|
|
48
|
+
content: componentObject.section,
|
|
49
|
+
class: {
|
|
50
|
+
...cssClasses,
|
|
51
|
+
"max-w-screen-2xl mx-auto": layoutStyles?.sizingMode === "boxed",
|
|
52
|
+
},
|
|
53
|
+
style: {
|
|
54
|
+
backgroundColor: layoutStyles?.backgroundColor,
|
|
55
|
+
backgroundImage: layoutStyles?.backgroundImage,
|
|
56
|
+
backgroundSize: layoutStyles?.backgroundSize,
|
|
57
|
+
},
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
</script>
|
|
62
|
+
|
|
63
|
+
<template>
|
|
64
|
+
<DynamicRender />
|
|
65
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CmsBlockCategoryNavigation } from "@shopware/composables";
|
|
3
|
+
import { useCmsBlock } from "#imports";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
content: CmsBlockCategoryNavigation;
|
|
7
|
+
}>();
|
|
8
|
+
const { getSlotContent } = useCmsBlock(props.content);
|
|
9
|
+
const slotContent = getSlotContent("content");
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<template>
|
|
13
|
+
<div>
|
|
14
|
+
<CmsGenericElement v-if="slotContent" :content="slotContent" />
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CmsBlockCenterText } from "@shopware/composables";
|
|
3
|
+
import { useCmsBlock } from "#imports";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
content: CmsBlockCenterText;
|
|
7
|
+
}>();
|
|
8
|
+
|
|
9
|
+
const { getSlotContent } = useCmsBlock(props.content);
|
|
10
|
+
const slotLeftContent = getSlotContent("left");
|
|
11
|
+
const slotRightContent = getSlotContent("right");
|
|
12
|
+
const slotCenterContent = getSlotContent("center");
|
|
13
|
+
</script>
|
|
14
|
+
<template>
|
|
15
|
+
<div class="cms-block-center-text grid md:grid-cols-3 gap-10 content-center">
|
|
16
|
+
<CmsGenericElement :content="slotLeftContent" />
|
|
17
|
+
<CmsGenericElement :content="slotCenterContent" />
|
|
18
|
+
<CmsGenericElement :content="slotRightContent" />
|
|
19
|
+
</div>
|
|
20
|
+
</template>
|
|
21
|
+
|
|
22
|
+
<style scoped>
|
|
23
|
+
.cms-block-center-text .cms-element-image {
|
|
24
|
+
@apply aspect-square object-cover;
|
|
25
|
+
}
|
|
26
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CmsBlockCrossSelling } from "@shopware/composables";
|
|
3
|
+
import { useCmsBlock } from "#imports";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
content: CmsBlockCrossSelling;
|
|
7
|
+
}>();
|
|
8
|
+
const { getSlotContent } = useCmsBlock(props.content);
|
|
9
|
+
const slotContent = getSlotContent("content");
|
|
10
|
+
</script>
|
|
11
|
+
<template>
|
|
12
|
+
<div class="cms-block-cross-selling">
|
|
13
|
+
<CmsGenericElement :content="slotContent" />
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CmsBlockForm } from "@shopware/composables";
|
|
3
|
+
import { useCmsBlock } from "#imports";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
content: CmsBlockForm;
|
|
7
|
+
}>();
|
|
8
|
+
|
|
9
|
+
const { getSlotContent } = useCmsBlock(props.content);
|
|
10
|
+
|
|
11
|
+
const cmsContent = getSlotContent("content");
|
|
12
|
+
</script>
|
|
13
|
+
<template>
|
|
14
|
+
<div class="cms-block-form">
|
|
15
|
+
<CmsGenericElement v-if="cmsContent" :content="cmsContent" />
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { Schemas } from "#shopware";
|
|
3
|
+
|
|
4
|
+
defineProps<{
|
|
5
|
+
content: Schemas["CmsBlock"];
|
|
6
|
+
}>();
|
|
7
|
+
</script>
|
|
8
|
+
<template>
|
|
9
|
+
<CmsGenericElement
|
|
10
|
+
v-for="slot in content.slots"
|
|
11
|
+
:key="slot.id"
|
|
12
|
+
:content="slot"
|
|
13
|
+
/>
|
|
14
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CmsBlockForm } from "@shopware/composables";
|
|
3
|
+
import { useCmsBlock } from "#imports";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
content: CmsBlockForm;
|
|
7
|
+
}>();
|
|
8
|
+
|
|
9
|
+
const { getSlotContent } = useCmsBlock(props.content);
|
|
10
|
+
|
|
11
|
+
const cmsContent = getSlotContent("content");
|
|
12
|
+
</script>
|
|
13
|
+
<template>
|
|
14
|
+
<div class="cms-block-form">
|
|
15
|
+
<CmsGenericElement v-if="cmsContent" :content="cmsContent" />
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CmsBlockGalleryBuybox } from "@shopware/composables";
|
|
3
|
+
import { useCmsBlock } from "#imports";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
content: CmsBlockGalleryBuybox;
|
|
7
|
+
}>();
|
|
8
|
+
|
|
9
|
+
const { getSlotContent } = useCmsBlock(props.content);
|
|
10
|
+
const rightContent = getSlotContent("right");
|
|
11
|
+
const leftContent = getSlotContent("left");
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div
|
|
16
|
+
class="lg:container mx-auto flex flex-col lg:flex-row gap-10 justify-center"
|
|
17
|
+
>
|
|
18
|
+
<div class="overflow-hidden basis-4/6">
|
|
19
|
+
<CmsGenericElement :content="leftContent" />
|
|
20
|
+
</div>
|
|
21
|
+
<div class="basis-2/6">
|
|
22
|
+
<CmsGenericElement :content="rightContent" />
|
|
23
|
+
</div>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CmsBlockImage } from "@shopware/composables";
|
|
3
|
+
import { useCmsBlock } from "#imports";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
content: CmsBlockImage;
|
|
7
|
+
}>();
|
|
8
|
+
|
|
9
|
+
const { getSlotContent } = useCmsBlock(props.content);
|
|
10
|
+
const imageContent = getSlotContent("image");
|
|
11
|
+
</script>
|
|
12
|
+
<template>
|
|
13
|
+
<div>
|
|
14
|
+
<CmsGenericElement :content="imageContent" />
|
|
15
|
+
</div>
|
|
16
|
+
</template>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CmsBlockImageBubbleRow } from "@shopware/composables";
|
|
3
|
+
import { useCmsBlock } from "#imports";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
content: CmsBlockImageBubbleRow;
|
|
7
|
+
}>();
|
|
8
|
+
|
|
9
|
+
const { getSlotContent } = useCmsBlock(props.content);
|
|
10
|
+
|
|
11
|
+
const leftContent = getSlotContent("left");
|
|
12
|
+
const rightContent = getSlotContent("right");
|
|
13
|
+
const centerContent = getSlotContent("center");
|
|
14
|
+
</script>
|
|
15
|
+
<template>
|
|
16
|
+
<div class="cms-block-image-bubble-row grid md:grid-cols-3 gap-10">
|
|
17
|
+
<div class="flex items-center justify-center">
|
|
18
|
+
<CmsGenericElement :content="leftContent" class="w-full" />
|
|
19
|
+
</div>
|
|
20
|
+
<div class="flex items-center justify-center">
|
|
21
|
+
<CmsGenericElement :content="centerContent" class="w-full" />
|
|
22
|
+
</div>
|
|
23
|
+
<div class="flex items-center justify-center">
|
|
24
|
+
<CmsGenericElement :content="rightContent" class="w-full" />
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
<style scoped>
|
|
29
|
+
.cms-block-image-bubble-row .cms-element-image {
|
|
30
|
+
@apply object-cover max-w-xs overflow-hidden rounded-full aspect-square;
|
|
31
|
+
}
|
|
32
|
+
</style>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CmsBlockImageCover } from "@shopware/composables";
|
|
3
|
+
import { useCmsBlock } from "#imports";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
content: CmsBlockImageCover;
|
|
7
|
+
}>();
|
|
8
|
+
|
|
9
|
+
const { getSlotContent } = useCmsBlock(props.content);
|
|
10
|
+
|
|
11
|
+
const cmsContent = getSlotContent("image");
|
|
12
|
+
</script>
|
|
13
|
+
<template>
|
|
14
|
+
<div class="cms-block-image-cover">
|
|
15
|
+
<CmsGenericElement v-if="cmsContent" :content="cmsContent" />
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CmsBlockImageFourColumn } from "@shopware/composables";
|
|
3
|
+
import { useCmsBlock } from "#imports";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
content: CmsBlockImageFourColumn;
|
|
7
|
+
}>();
|
|
8
|
+
|
|
9
|
+
const { getSlotContent } = useCmsBlock(props.content);
|
|
10
|
+
|
|
11
|
+
const leftContent = getSlotContent("left");
|
|
12
|
+
const rightContent = getSlotContent("right");
|
|
13
|
+
const centerLeftContent = getSlotContent("center-left");
|
|
14
|
+
const centerRightContent = getSlotContent("center-right");
|
|
15
|
+
</script>
|
|
16
|
+
<template>
|
|
17
|
+
<div class="cms-block-image-four-column grid md:grid-cols-4 gap-10">
|
|
18
|
+
<CmsGenericElement :content="leftContent" />
|
|
19
|
+
<CmsGenericElement :content="centerLeftContent" />
|
|
20
|
+
<CmsGenericElement :content="centerRightContent" />
|
|
21
|
+
<CmsGenericElement :content="rightContent" />
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
<style scoped>
|
|
26
|
+
.cms-block-image-four-column .cms-element-image {
|
|
27
|
+
@apply object-cover;
|
|
28
|
+
}
|
|
29
|
+
</style>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CmsBlockImageGallery } from "@shopware/composables";
|
|
3
|
+
import { useCmsBlock } from "#imports";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
content: CmsBlockImageGallery;
|
|
7
|
+
}>();
|
|
8
|
+
|
|
9
|
+
const { getSlotContent } = useCmsBlock(props.content);
|
|
10
|
+
|
|
11
|
+
const cmsContent = getSlotContent("imageGallery");
|
|
12
|
+
</script>
|
|
13
|
+
|
|
14
|
+
<template>
|
|
15
|
+
<div class="cms-block-image-gallery">
|
|
16
|
+
<CmsGenericElement :content="cmsContent" />
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CmsBlockImageHighlightRow } from "@shopware/composables";
|
|
3
|
+
import { useCmsBlock } from "#imports";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
content: CmsBlockImageHighlightRow;
|
|
7
|
+
}>();
|
|
8
|
+
|
|
9
|
+
const { getSlotContent } = useCmsBlock(props.content);
|
|
10
|
+
|
|
11
|
+
const leftContent = getSlotContent("left");
|
|
12
|
+
const rightContent = getSlotContent("right");
|
|
13
|
+
const centerContent = getSlotContent("center");
|
|
14
|
+
</script>
|
|
15
|
+
<template>
|
|
16
|
+
<div class="cms-block-image-highlight-row grid md:grid-cols-3 gap-10">
|
|
17
|
+
<CmsGenericElement :content="leftContent" />
|
|
18
|
+
<CmsGenericElement :content="centerContent" />
|
|
19
|
+
<CmsGenericElement :content="rightContent" />
|
|
20
|
+
</div>
|
|
21
|
+
</template>
|
|
22
|
+
|
|
23
|
+
<style scoped>
|
|
24
|
+
.cms-block-image-highlight-row .cms-element-image {
|
|
25
|
+
@apply border-[12px] border-white;
|
|
26
|
+
}
|
|
27
|
+
</style>
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CmsBlockImageSimpleGrid } from "@shopware/composables";
|
|
3
|
+
import { useCmsBlock } from "#imports";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
content: CmsBlockImageSimpleGrid;
|
|
7
|
+
}>();
|
|
8
|
+
|
|
9
|
+
const { getSlotContent } = useCmsBlock(props.content);
|
|
10
|
+
|
|
11
|
+
const leftTopContent = getSlotContent("left-top");
|
|
12
|
+
const leftBottomContent = getSlotContent("left-bottom");
|
|
13
|
+
const rightContent = getSlotContent("right");
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<template>
|
|
17
|
+
<div class="grid md:grid-cols-2 gap-10">
|
|
18
|
+
<div class="grid gap-10">
|
|
19
|
+
<CmsGenericElement :content="leftTopContent" />
|
|
20
|
+
<CmsGenericElement :content="leftBottomContent" />
|
|
21
|
+
</div>
|
|
22
|
+
<CmsGenericElement :content="rightContent" />
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CmsBlockImageSlider } from "@shopware/composables";
|
|
3
|
+
import { useCmsBlock } from "#imports";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
content: CmsBlockImageSlider;
|
|
7
|
+
}>();
|
|
8
|
+
|
|
9
|
+
const { getSlotContent } = useCmsBlock(props.content);
|
|
10
|
+
const cmsContent = getSlotContent("imageSlider");
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<template>
|
|
14
|
+
<div class="cms-block-image-slider">
|
|
15
|
+
<CmsGenericElement :content="cmsContent" />
|
|
16
|
+
</div>
|
|
17
|
+
</template>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CmsBlockImageText } from "@shopware/composables";
|
|
3
|
+
import { useCmsBlock } from "#imports";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
content: CmsBlockImageText;
|
|
7
|
+
}>();
|
|
8
|
+
|
|
9
|
+
const { getSlotContent } = useCmsBlock(props.content);
|
|
10
|
+
|
|
11
|
+
const leftContent = getSlotContent("left");
|
|
12
|
+
const rightContent = getSlotContent("right");
|
|
13
|
+
</script>
|
|
14
|
+
<template>
|
|
15
|
+
<div class="grid md:grid-cols-2 gap-10">
|
|
16
|
+
<CmsGenericElement :content="leftContent" />
|
|
17
|
+
<CmsGenericElement :content="rightContent" />
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CmsBlockImageTextBubble } from "@shopware/composables";
|
|
3
|
+
import { useCmsBlock } from "#imports";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
content: CmsBlockImageTextBubble;
|
|
7
|
+
}>();
|
|
8
|
+
|
|
9
|
+
const { getSlotContent } = useCmsBlock(props.content);
|
|
10
|
+
|
|
11
|
+
const leftText = getSlotContent("left-text");
|
|
12
|
+
const leftImage = getSlotContent("left-image");
|
|
13
|
+
const centerText = getSlotContent("center-text");
|
|
14
|
+
const centerImage = getSlotContent("center-image");
|
|
15
|
+
const rightText = getSlotContent("right-text");
|
|
16
|
+
const rightImage = getSlotContent("right-image");
|
|
17
|
+
</script>
|
|
18
|
+
<template>
|
|
19
|
+
<div class="cms-block-image-text-bubble grid grid-cols-3 auto-cols-max">
|
|
20
|
+
<div class="cms-element-column p-4">
|
|
21
|
+
<div class="flex justify-center">
|
|
22
|
+
<CmsGenericElement
|
|
23
|
+
:content="leftImage"
|
|
24
|
+
class="object-center rounded-full"
|
|
25
|
+
style="height: calc(100vw / 3 - 64px); width: calc(100vw / 3 - 64px)"
|
|
26
|
+
/>
|
|
27
|
+
</div>
|
|
28
|
+
<CmsGenericElement :content="leftText" />
|
|
29
|
+
</div>
|
|
30
|
+
<div class="cms-element-column p-4">
|
|
31
|
+
<div class="flex justify-center">
|
|
32
|
+
<CmsGenericElement
|
|
33
|
+
:content="centerImage"
|
|
34
|
+
class="object-center rounded-full"
|
|
35
|
+
style="height: calc(100vw / 3 - 64px); width: calc(100vw / 3 - 64px)"
|
|
36
|
+
/>
|
|
37
|
+
</div>
|
|
38
|
+
<CmsGenericElement :content="centerText" />
|
|
39
|
+
</div>
|
|
40
|
+
<div class="cms-element-column p-4">
|
|
41
|
+
<div class="flex justify-center">
|
|
42
|
+
<CmsGenericElement
|
|
43
|
+
:content="rightImage"
|
|
44
|
+
class="object-center rounded-full"
|
|
45
|
+
style="height: calc(100vw / 3 - 64px); width: calc(100vw / 3 - 64px)"
|
|
46
|
+
/>
|
|
47
|
+
</div>
|
|
48
|
+
<CmsGenericElement :content="rightText" />
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</template>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { CmsBlockImageTextCover } from "@shopware/composables";
|
|
3
|
+
import { useCmsBlock } from "#imports";
|
|
4
|
+
|
|
5
|
+
const props = defineProps<{
|
|
6
|
+
content: CmsBlockImageTextCover;
|
|
7
|
+
}>();
|
|
8
|
+
|
|
9
|
+
const { getSlotContent } = useCmsBlock(props.content);
|
|
10
|
+
|
|
11
|
+
const leftContent = getSlotContent("left");
|
|
12
|
+
const rightContent = getSlotContent("right");
|
|
13
|
+
</script>
|
|
14
|
+
<template>
|
|
15
|
+
<article class="md:grid md:grid-cols-2 gap-10">
|
|
16
|
+
<CmsGenericElement
|
|
17
|
+
:content="leftContent"
|
|
18
|
+
class="cms-block-image-text-cover__image"
|
|
19
|
+
/>
|
|
20
|
+
<CmsGenericElement
|
|
21
|
+
:content="rightContent"
|
|
22
|
+
class="cms-block-image-text-cover__text"
|
|
23
|
+
/>
|
|
24
|
+
</article>
|
|
25
|
+
</template>
|