2024-10-30 14:02:47 +00:00
|
|
|
<template>
|
2024-11-02 11:47:07 +00:00
|
|
|
<div class="relative h-[calc(100vh-6rem)] max-h-[calc(100vh-6rem)] w-full overflow-hidden">
|
|
|
|
<NuxtPicture
|
|
|
|
loading="lazy"
|
|
|
|
class="w-full h-full object-cover object-center"
|
|
|
|
:src="baseUrl + backdrop.url"
|
|
|
|
:imgAttrs="{ class: 'w-full h-full object-cover object-center' }"
|
|
|
|
/>
|
2024-11-05 13:45:08 +00:00
|
|
|
<img class="absolute p-4 w-full h-fit sm:h-40 sm:w-fit bottom-5" :src="baseUrl + navbar.logo.url" />
|
2024-11-01 13:15:09 +00:00
|
|
|
</div>
|
2024-10-30 14:02:47 +00:00
|
|
|
<Header />
|
|
|
|
<slot />
|
|
|
|
<Footer />
|
|
|
|
</template>
|
2024-11-01 13:15:09 +00:00
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
import type Global from "../types/single/global";
|
|
|
|
import type Homepage from "../types/single/homepage";
|
|
|
|
|
|
|
|
const {
|
|
|
|
params: { slug: params },
|
|
|
|
} = useRoute();
|
|
|
|
const baseUrl = useStrapiUrl().replace("/api", "");
|
|
|
|
const { findOne } = useStrapi();
|
|
|
|
|
|
|
|
const { data: global } = await useAsyncData("global", () => findOne<Global>("global"));
|
|
|
|
const { navbar } = global.value?.data as unknown as Global;
|
|
|
|
|
|
|
|
const { data: homepage } = await useAsyncData("homepage", () => findOne<Homepage>("homepage"));
|
|
|
|
const { backdrop } = homepage.value?.data as unknown as Homepage;
|
|
|
|
</script>
|