ff-webpage/components/shared/Hero.vue

25 lines
704 B
Vue

<template>
<div class="flex flex-col w-full max-h-72 h-72 overflow-hidden">
<NuxtPicture
preload
loading="lazy"
class="w-full h-60 object-cover object-center"
:src="baseUrl + data?.banner.url"
:imgAttrs="{ class: 'w-full h-60 object-cover object-center' }"
/>
<div primary class="h-12 min-h-12 w-full px-12 justify-center items-center gap-5 flex">
<p>{{ data?.title }}</p>
</div>
</div>
</template>
<script setup lang="ts">
import type { PropType } from "vue";
import type SharedHero from "../../types/component/sharedHero";
defineProps({
data: Object as PropType<SharedHero>,
});
const baseUrl = useStrapiUrl().replace("/api", "");
</script>