This repository has been archived by the owner on Oct 31, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(default-theme): PDP built with shopping experience (#1476)
Co-authored-by: patzick <13100280+patzick@users.noreply.github.com>
- Loading branch information
Showing
17 changed files
with
462 additions
and
249 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
packages/default-theme/src/cms/blocks/CmsBlockSplitView.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<template> | ||
<div class="cms-block-split-view"> | ||
<CmsGenericElement | ||
:content="getLeftContent" | ||
class="cms-block-split-view__element" | ||
/> | ||
<CmsGenericElement | ||
:content="getRightContent" | ||
class="cms-block-split-view__element right-view" | ||
/> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import CmsGenericElement from "sw-cms/CmsGenericElement" | ||
export default { | ||
name: "CmsBlockSplitView", | ||
components: { | ||
CmsGenericElement, | ||
}, | ||
props: { | ||
content: { | ||
type: Object, | ||
default: () => ({}), | ||
}, | ||
}, | ||
computed: { | ||
getSlots() { | ||
return this.content.slots || [] | ||
}, | ||
getLeftContent() { | ||
return this.getSlots.find(({ slot }) => slot === "left") | ||
}, | ||
getRightContent() { | ||
return this.getSlots.find(({ slot }) => slot === "right") | ||
}, | ||
}, | ||
} | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
@import "@/cms/settings.scss"; | ||
.cms-block-split-view { | ||
@include for-desktop { | ||
display: flex; | ||
} | ||
&__element { | ||
flex: 1; | ||
} | ||
} | ||
.right-view { | ||
@include for-desktop { | ||
margin-left: calc(var(--spacer-base) * 3); | ||
} | ||
} | ||
</style> |
Oops, something went wrong.
2733715
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: