Skip to content

Commit

Permalink
fixing logic for VideoEmbedBlock in resource article page (#513)
Browse files Browse the repository at this point in the history
* fixing logic for VideoEmbedBlock in resource article page

* making same change for PageNewsDetail
  • Loading branch information
stephiescastle authored Jul 23, 2024
1 parent 98a9e83 commit c5a917e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@explorer-1/vue",
"version": "0.1.6",
"version": "0.1.7",
"private": false,
"publishConfig": {
"access": "public"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export default {
// shared data
export const BlockVideoEmbedData = {
data: {
blockType: 'VideoEmbedBlock',
embed: {
embed: `<iframe title="Meet NASA's Diana Trujillo" width="480" height="270" src="https://www.youtube.com/embed/vUuUyYqI83Q?feature=oembed" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>`
},
Expand Down
3 changes: 2 additions & 1 deletion packages/vue/src/templates/PageNewsDetail/PageNewsDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,8 @@ export default defineComponent({
return false
} else if (
this.data?.heroPosition === 'inline' ||
this.data?.hero[0].blockType === 'CarouselBlock'
this.data?.hero[0].blockType === 'CarouselBlock' ||
this.data?.hero[0].blockType === 'VideoEmbedBlock'
) {
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ export default defineComponent({
return false
} else if (
this.data?.heroPosition === 'inline' ||
this.data?.hero[0].blockType === 'CarouselBlock'
this.data?.hero[0].blockType === 'CarouselBlock' ||
this.data?.hero[0].blockType === 'VideoEmbedBlock'
) {
return true
}
Expand Down Expand Up @@ -108,7 +109,7 @@ export default defineComponent({
:label="data.displayLabel"
schema
/>
<share-buttons-edu
<ShareButtonsEdu
v-if="data?.url"
class="mt-4"
:url="data.url"
Expand Down

0 comments on commit c5a917e

Please sign in to comment.