component formatting and types
This commit is contained in:
parent
c2a7d15eeb
commit
ce745c06e5
60 changed files with 464 additions and 301 deletions
26
components/items/Hero.vue
Normal file
26
components/items/Hero.vue
Normal file
|
@ -0,0 +1,26 @@
|
|||
<template>
|
||||
<div class="flex flex-col w-full max-h-72 h-fit overflow-hidden">
|
||||
<NuxtPicture
|
||||
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' }"
|
||||
/>
|
||||
<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";
|
||||
import type ItemsHero from "../../types/component/items/hero";
|
||||
|
||||
defineProps({
|
||||
data: Object as PropType<ItemsHero>,
|
||||
});
|
||||
|
||||
const runtimeConfig = useRuntimeConfig();
|
||||
const baseUrl = runtimeConfig.public.strapi.url;
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue