Skip to content

Commit

Permalink
Fix behind the scenes banner video.
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmurray8 committed Jun 17, 2024
1 parent d0457ad commit 00a5041
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 18 deletions.
24 changes: 15 additions & 9 deletions components/AutoPlayVideo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</video>
<button
v-if="withSoundControl"
class="relative bottom-12 z-10 float-right ml-auto mr-4 h-8 w-8 cursor-pointer text-white md:h-10 md:w-10"
:class="`relative ${soundControlBottomClass} z-10 float-right ml-auto mr-4 h-8 w-8 cursor-pointer text-white md:h-10 md:w-10`"
@click="toggleMute"
>
<span class="sr-only">{{
Expand Down Expand Up @@ -66,12 +66,18 @@
observer.observe(videoElement.value!);
});
const props = defineProps<{
title: string;
description: string;
thumbnailImage: string | undefined;
video: string;
publicationDate: string;
withSoundControl?: boolean;
}>();
const props = withDefaults(
defineProps<{
title: string;
description: string;
thumbnailImage: string | undefined;
video: string;
publicationDate: string;
withSoundControl?: boolean;
soundControlBottomClass: string;
}>(),
{
soundControlBottomClass: 'bottom-12',
}
);
</script>
8 changes: 1 addition & 7 deletions nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,7 @@ const config = {
},
},
robots: {
disallow: [
'/admin',
'/admin/*',
'/api',
'/api/*',
'/links',
],
disallow: ['/admin', '/admin/*', '/api', '/api/*', '/links'],
},
auth: {
baseURL: SITE_URL,
Expand Down
11 changes: 9 additions & 2 deletions pages/behind-the-scenes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
<OgMeta :title="seoTitle" :description="seoDescription" />
<SchemaOrgWebPage type="AboutPage" :name="seoTitle" />
<section
class="relative flex h-[calc(100dvh-116.45px)] flex-col justify-between overflow-x-hidden"
class="relative flex h-[calc(100dvh-116.45px)] flex-col justify-between"
>
<div class="fixed mx-auto h-[45%] w-full md:h-[55%]">
<div
class="backface-visibility-hidden fixed mx-auto h-[50%] w-full md:h-[65%]"
>
<AutoPlayVideo
:title="bannerVideo.seoTitle"
:description="bannerVideo.seoDescription"
Expand All @@ -13,6 +15,7 @@
:video="bannerVideo.video"
:with-sound-control="true"
class="h-full w-full object-cover object-center"
sound-control-bottom-class="bottom-14 md:bottom-16"
/>
</div>
<div
Expand Down Expand Up @@ -332,4 +335,8 @@
.slider {
animation: 60s slide infinite linear;
}
.backface-visibility-hidden {
backface-visibility: hidden;
}
</style>

0 comments on commit 00a5041

Please sign in to comment.