ff-webpage/components/items/Hero.vue

27 lines
772 B
Vue
Raw Normal View History

<template>
2025-02-14 13:57:55 +01:00
<div class="flex flex-col w-full max-h-72 h-fit overflow-hidden">
<NuxtPicture
2025-02-14 13:57:55 +01:00
v-if="data?.banner"
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' }"
/>
2025-02-14 13:57:55 +01:00
<div v-if="data?.title" 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";
2025-02-14 13:57:55 +01:00
import type ItemsHero from "../../types/component/items/hero";
defineProps({
2025-02-14 13:57:55 +01:00
data: Object as PropType<ItemsHero>,
});
2024-11-05 18:31:12 +01:00
const runtimeConfig = useRuntimeConfig();
const baseUrl = runtimeConfig.public.strapi.url;
</script>