ff-webpage/components/ContentBuilder.vue

30 lines
1.4 KiB
Vue
Raw Normal View History

2024-11-01 13:15:09 +00:00
<template>
<div class="min-h-[calc(100vh-9rem)] w-full">
<SharedHero v-if="hero" :data="hero" />
2024-11-05 13:41:48 +00:00
<div class="container mx-auto py-12 px-2 min-h-[50vh] flex flex-col gap-2">
<div v-for="item in content" class="contents">
<DynamicZoneColumnImageText v-if="item.__component == 'dynamic-zone.column-image-text'" :data="item" />
<DynamicZoneDualColumnText v-else-if="item.__component == 'dynamic-zone.dual-column-text'" :data="item" />
<DynamicZoneEmphasiseArticle v-else-if="item.__component == 'dynamic-zone.emphasise-article'" :data="item" />
<DynamicZoneFullImage v-else-if="item.__component == 'dynamic-zone.full-image'" :data="item" />
<DynamicZoneFullText v-else-if="item.__component == 'dynamic-zone.full-text'" :data="item" />
<DynamicZoneGallery v-else-if="item.__component == 'dynamic-zone.gallery'" :data="item" />
2025-01-18 10:30:46 +00:00
<DynamicZoneFileDownload v-else-if="item.__component == 'dynamic-zone.file-download'" :data="item" />
<SharedList v-else-if="item.__component == 'shared.list'" :data="item" />
<br />
</div>
</div>
</div>
2024-11-01 13:15:09 +00:00
</template>
<script setup lang="ts">
import type { PropType } from "vue";
import type SharedHero from "../types/component/sharedHero";
import type { ComponentTypes } from "../types/component/baseComponent";
defineProps({
hero: { type: Object as PropType<SharedHero>, required: false, default: null },
content: Array<ComponentTypes>,
});
</script>