-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/bus 825 youtube video cms #46
Open
carojansing
wants to merge
8
commits into
main
Choose a base branch
from
feature/BUS-825-Youtube-Video-CMS
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a7b7cb3
BUS-795-CMS-Block+Element-Three-Collumns-Product-Boxes
carojansing 8836871
Merge branch 'main' of github.com:basecom/Pond into feature/BUS-795-T…
carojansing f90354e
BUS-795-env
carojansing 302ddf6
Update nuxt.config.ts
carojansing 03e1cd6
Update [...all].vue
carojansing 6bf07d2
Update components/cms/element/CmsElementProductBox.vue
carojansing 74261e3
BUS-795-CS
carojansing 9a5abd0
BUS-825-Youtube-Video
carojansing File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Binary file not shown.
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,21 @@ | ||
<script setup lang="ts"> | ||
import type { Schemas } from '@shopware/api-client/api-types'; | ||
|
||
const props = defineProps<{ | ||
block: Schemas['CmsBlock']; | ||
}>(); | ||
|
||
const { getSlotContent } = useCmsBlock(props.block); | ||
|
||
const leftContent: Schemas['CmsSlot'] = getSlotContent('left'); | ||
const centerContent: Schemas['CmsSlot'] = getSlotContent('center'); | ||
const rightContent: Schemas['CmsSlot'] = getSlotContent('right'); | ||
</script> | ||
|
||
<template> | ||
<div class="grid gap-4 md:grid-cols-3"> | ||
<CmsLoader :content="leftContent" /> | ||
<CmsLoader :content="centerContent" /> | ||
<CmsLoader :content="rightContent" /> | ||
</div> | ||
</template> |
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,12 @@ | ||
<script setup lang="ts"> | ||
import type { Schemas } from '@shopware/api-client/api-types'; | ||
const props = defineProps<{ | ||
block: Schemas['CmsBlock']; | ||
}>(); | ||
const { getSlotContent } = useCmsBlock(props.block); | ||
const video: Schemas['CmsSlot'] = getSlotContent('video'); | ||
</script> | ||
|
||
<template> | ||
<CmsLoader :content="video" /> | ||
</template> |
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,13 @@ | ||
<script setup lang="ts"> | ||
import type { CmsElementProductBox } from '@shopware-pwa/composables-next'; | ||
|
||
const props = defineProps<{ | ||
element: CmsElementProductBox; | ||
}>(); | ||
|
||
const { product } = useProduct(props.element.data.product); | ||
</script> | ||
|
||
<template> | ||
<ProductCard :product="product"></ProductCard> | ||
</template> |
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,31 @@ | ||
<script setup lang="ts"> | ||
import type { CmsElementVimeoVideo } from '@shopware-pwa/composables-next'; | ||
|
||
const props = defineProps<{ | ||
element: CmsElementVimeoVideo; | ||
}>(); | ||
|
||
const youtubeVideo = ref(null); | ||
|
||
const videoId = props.element.config.videoID.value | ||
const videoUrl = computed(() => `https://www.youtube.com/embed/${videoId}`) | ||
</script> | ||
|
||
<template> | ||
<div ref="youtubeVideo" class="my-0 mx-auto"> | ||
<div class="youtube-player h-full w-full relative "> | ||
Comment on lines
+15
to
+16
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. couldn't these two divs be combined? |
||
<iframe | ||
:src="videoUrl" | ||
frameborder="0" | ||
class="w-full h-full absolute top-0 left-0" | ||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; fullscreen" | ||
allowfullscreen | ||
></iframe> | ||
</div> | ||
</div> | ||
</template> | ||
<style scoped> | ||
.youtube-player{ | ||
padding-bottom: 56.25%; | ||
} | ||
</style> |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.