Skip to content

Commit

Permalink
fixing logic for VideoEmbedBlock in resource article page
Browse files Browse the repository at this point in the history
  • Loading branch information
stephiescastle committed Jul 23, 2024
1 parent 98a9e83 commit 400a6db
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 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
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ export default defineComponent({
} else if (
this.data?.heroPosition === 'inline' ||
this.data?.hero[0].blockType === 'CarouselBlock'
// TODO: should this match PageEduResourceArticle and also check for VideoEmbedBlock?
) {
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,28 @@ 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
}
}
return false
},
// heroInline(): boolean {
// if (!this.heroEmpty) {
// const type = this.data?.hero[0].blockType
// if (type === 'VideoBlock' || type === 'VideoEmbedBlock') {
// return false
// } else if (
// this.data?.heroPosition === 'inline' ||
// this.data?.hero[0].blockType === 'CarouselBlock'
// ) {
// return true
// }
// }
// return false
// },
computedClass(): string {
if (this.heroInline || this.heroEmpty) {
return 'pt-5 lg:pt-12'
Expand Down Expand Up @@ -108,7 +123,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 400a6db

Please sign in to comment.