Compare commits
No commits in common. "main" and "v1.0.1" have entirely different histories.
29 changed files with 55 additions and 218 deletions
|
@ -3,4 +3,3 @@ node_modules/
|
|||
.git/
|
||||
.nuxt/
|
||||
.env
|
||||
.output/
|
|
@ -1,12 +1,12 @@
|
|||
# ff-webpage
|
||||
|
||||
Feuerwehr Webseite zu Strapi Content Management
|
||||
Feuerwehr Webseite zu Strapi Contnet Management
|
||||
|
||||
## Einleitung
|
||||
|
||||
Dieses Repository dient zur dynamischen Erstellung von Webseiten. Es ist ein Frontend-Client, der auf die Daten des [Strapi Content Management Systems (CMS)](https://forgejo.jk-effects.cloud/Ehrenamt/ff-webpage-cms) zugreift. Die Webseite wird mit Nuxt.js erstellt und bietet eine benutzerfreundliche Oberfläche für die Anzeige von Inhalten. Die Webseite ist für Feuerwehren konzipiert und bietet eine einfache Möglichkeit, Informationen zu veröffentlichen und zu verwalten.
|
||||
|
||||
Eine Demo dieser Seite finden Sie unter [https://webpage-demo.ff-admin.de](https://webpage-demo.ff-admin.de).
|
||||
Eine Demo dieser Seite finden Sie unter [https://ff-demo.jk-effects.cloud](https://ff-demo.jk-effects.cloud).
|
||||
|
||||
## Installation
|
||||
|
||||
|
|
18
app.vue
18
app.vue
|
@ -2,25 +2,11 @@
|
|||
<NuxtPage />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type SEOComponent from "./types/component/seoComponent";
|
||||
import type Global from "./types/single/global";
|
||||
|
||||
<script setup>
|
||||
const runtimeConfig = useRuntimeConfig();
|
||||
const appTitle = runtimeConfig.public.app.title;
|
||||
|
||||
const { findOne, find } = useStrapi();
|
||||
const { data: global } = await useAsyncData("global", () => findOne<Global>("global"));
|
||||
|
||||
const {
|
||||
metaTitle, metaDescription, keywords,
|
||||
} = global.value?.data?.SEO ?? ({} as SEOComponent);
|
||||
|
||||
useHead({
|
||||
title: metaTitle ?? appTitle,
|
||||
meta: [
|
||||
{name: "description", content: metaDescription},
|
||||
{name: "keywords", content: keywords},
|
||||
]
|
||||
title: appTitle,
|
||||
});
|
||||
</script>
|
||||
|
|
|
@ -9,8 +9,6 @@
|
|||
<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" />
|
||||
<DynamicZoneFileDownload v-else-if="item.__component == 'dynamic-zone.file-download'" :data="item" />
|
||||
<DynamicZoneEmbedding v-else-if="item.__component == 'dynamic-zone.embedding'" :data="item" />
|
||||
<SharedList v-else-if="item.__component == 'shared.list'" :data="item" />
|
||||
<br />
|
||||
</div>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<header class="sticky top-0 h-fit z-50">
|
||||
<header class="sticky top-0 h-fit">
|
||||
<div
|
||||
primary
|
||||
class="h-24 min-h-fit w-full px-4 md:px-12 py-2.5 justify-between items-center gap-5 flex overflow-hidden"
|
||||
|
|
|
@ -11,13 +11,8 @@
|
|||
:imgAttrs="{ class: 'w-full h-56 object-cover object-center' }"
|
||||
/>
|
||||
<div class="w-full h-44 relative bg-white px-2 py-5 flex flex-col justify-start items-start gap-2 overflow-y-auto">
|
||||
<h1>
|
||||
<span v-if="numberOverwrite != undefined" class="w-24 text-center text-black text-4xl my-auto">
|
||||
{{ numberOverwrite }}.
|
||||
</span>
|
||||
{{ data?.title }}
|
||||
</h1>
|
||||
<p v-if="numberOverwrite != undefined && data?.date && data.date.includes('T')" class="w-full text-[#5c5c5c]">
|
||||
<h1>{{ data?.title }}</h1>
|
||||
<p v-if="data?.date" class="w-full text-[#5c5c5c]">
|
||||
{{
|
||||
new Date(data?.date ?? "").toLocaleString("de-DE", {
|
||||
day: "2-digit",
|
||||
|
@ -27,16 +22,6 @@
|
|||
hour: "2-digit",
|
||||
})
|
||||
}}
|
||||
Uhr
|
||||
</p>
|
||||
<p v-else-if="data?.date && data.date.includes('T')" class="w-full text-[#5c5c5c]">
|
||||
{{
|
||||
new Date(data?.date ?? "").toLocaleString("de-DE", {
|
||||
minute: "2-digit",
|
||||
hour: "2-digit",
|
||||
})
|
||||
}}
|
||||
Uhr
|
||||
</p>
|
||||
<p class="w-full text-[#5c5c5c]">
|
||||
{{ data?.description }}
|
||||
|
@ -54,7 +39,6 @@ const baseUrl = runtimeConfig.public.strapi.url;
|
|||
|
||||
defineProps({
|
||||
data: Object as PropType<BaseCollection>,
|
||||
numberOverwrite: { type: Number, default: undefined },
|
||||
allowNavigation: { type: Boolean, default: false },
|
||||
urlOverwrite: { type: String, default: undefined },
|
||||
});
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
</h1>
|
||||
<div class="grow shrink basis-0 flex-col justify-center items-center flex">
|
||||
<h1 class="w-full">{{ data?.title }}</h1>
|
||||
<p v-if="numberOverwrite != undefined && data?.date && data.date.includes('T')" class="w-full text-[#5c5c5c]">
|
||||
<p v-if="numberOverwrite != undefined" class="w-full text-[#5c5c5c]">
|
||||
{{
|
||||
new Date(data?.date ?? "").toLocaleString("de-DE", {
|
||||
day: "2-digit",
|
||||
|
@ -26,16 +26,14 @@
|
|||
hour: "2-digit",
|
||||
})
|
||||
}}
|
||||
Uhr
|
||||
</p>
|
||||
<p v-else-if="data?.date && data.date.includes('T')" class="w-full text-[#5c5c5c]">
|
||||
<p v-else class="w-full text-[#5c5c5c]">
|
||||
{{
|
||||
new Date(data?.date ?? "").toLocaleString("de-DE", {
|
||||
minute: "2-digit",
|
||||
hour: "2-digit",
|
||||
})
|
||||
}}
|
||||
Uhr
|
||||
</p>
|
||||
<p class="w-full text-[#5c5c5c]">
|
||||
{{ data?.description }}
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
<template>
|
||||
<div class="flex flex-col gap-2 w-full min-h-fit max-w-4xl mx-auto">
|
||||
<h1 class="text-center">{{ data.title }}</h1>
|
||||
<iframe :src="data.link" class="w-full h-[90vh]"></iframe>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { PropType } from "vue";
|
||||
import type DynamicZoneEmbedding from "../../types/component/dynamicZoneEmbedding";
|
||||
|
||||
const props = defineProps({
|
||||
data: Object as PropType<DynamicZoneEmbedding>,
|
||||
});
|
||||
</script>
|
|
@ -1,42 +0,0 @@
|
|||
<template>
|
||||
<div v-if="showComponent" class="flex flex-col gap-2 w-full min-h-fit max-w-4xl mx-auto">
|
||||
<h1 class="text-center">{{ data.title }}</h1>
|
||||
<iframe v-if="data.file.mime == 'application/pdf'" :src="baseUrl + data.file.url" class="w-full h-[90vh]"></iframe>
|
||||
<NuxtPicture
|
||||
v-if="data.file.mime.includes('image')"
|
||||
loading="lazy"
|
||||
class="w-full object-cover object-center mx-auto"
|
||||
:src="baseUrl + data?.file.url"
|
||||
:imgAttrs="{ class: 'w-full h-full object-cover object-center' }"
|
||||
/>
|
||||
<a
|
||||
v-if="data.enable_download"
|
||||
:href="baseUrl + data.file.url"
|
||||
:download="data.file.name"
|
||||
target="_blank"
|
||||
class="w-fit text-primary underline"
|
||||
>
|
||||
Datei herunterladen
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { PropType } from "vue";
|
||||
import type DynamicZoneFileDownload from "../../types/component/dynamicZoneFileDownload";
|
||||
|
||||
const runtimeConfig = useRuntimeConfig();
|
||||
const baseUrl = runtimeConfig.public.strapi.url;
|
||||
|
||||
const props = defineProps({
|
||||
data: Object as PropType<DynamicZoneFileDownload>,
|
||||
});
|
||||
|
||||
const showComponent = computed(() => {
|
||||
if (props.data.file.mime == "application/pdf" || props.data.file.mime.includes("image")) {
|
||||
return true;
|
||||
} else {
|
||||
return props.data.enable_download;
|
||||
}
|
||||
});
|
||||
</script>
|
|
@ -23,18 +23,7 @@
|
|||
:class="data?.lookup.image_item ? 'flex-row flex-wrap justify-center' : ' flex-col'"
|
||||
>
|
||||
<div v-for="(item, index) in collection" :key="item.slug" class="contents">
|
||||
<p
|
||||
v-if="data?.lookup.date_list && data?.lookup.numbered_item == false && getDate(index) != ''"
|
||||
class="w-full text-center"
|
||||
>
|
||||
{{ getDate(index) }}
|
||||
</p>
|
||||
<BaseListImageItem
|
||||
v-if="data?.lookup.image_item"
|
||||
:data="item"
|
||||
:number-overwrite="data.lookup.numbered_item ? getNumber(index) : undefined"
|
||||
:allow-navigation="data.enable_detail"
|
||||
/>
|
||||
<BaseListImageItem v-if="data?.lookup.image_item" :data="item" :allow-navigation="data.enable_detail" />
|
||||
<BaseListItem
|
||||
v-else-if="data?.lookup"
|
||||
:data="item"
|
||||
|
@ -44,7 +33,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div
|
||||
v-if="pagination.pageCount > 1"
|
||||
v-if="data?.lookup.date_list"
|
||||
class="flex flex-row w-full max-w-4xl mx-auto justify-between items-center select-none pt-4"
|
||||
>
|
||||
<p class="text-sm font-normal text-gray-500">
|
||||
|
@ -67,7 +56,7 @@
|
|||
v-for="page in displayedPagesNumbers"
|
||||
:key="page"
|
||||
class="flex h-8 w-8 items-center justify-center text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 first:rounded-s-lg last:rounded-e-lg"
|
||||
:class="[currentPage - 1 == page ? 'font-bold border-primary' : '', page != '.' ? ' cursor-pointer' : '']"
|
||||
:class="[currentPage == page ? 'font-bold border-primary' : '', page != '.' ? ' cursor-pointer' : '']"
|
||||
@click="changeTimedPage(page)"
|
||||
>
|
||||
{{ typeof page == "number" ? page + 1 : "..." }}
|
||||
|
@ -75,7 +64,7 @@
|
|||
<li
|
||||
class="flex h-8 w-8 items-center justify-center text-gray-500 bg-white border border-gray-300 first:rounded-s-lg last:rounded-e-lg"
|
||||
:class="[
|
||||
currentPage < pagination.pageCount
|
||||
currentPage + 1 < pagination.pageCount
|
||||
? 'cursor-pointer hover:bg-gray-100 hover:text-gray-700'
|
||||
: 'opacity-50 pointer-events-none',
|
||||
]"
|
||||
|
@ -127,7 +116,7 @@ const { data: collections } = await useAsyncData("collection", () =>
|
|||
sort: "date:desc",
|
||||
filters: {
|
||||
date: {
|
||||
$between: [`${activeYear.value}-01-01 00:00:00.000000`, `${activeYear.value}-12-31 23:59:59.999`],
|
||||
$between: [`${activeYear.value}-01-01T00:00:00.000Z`, `${activeYear.value}-12-31T23:59:59.999Z`],
|
||||
},
|
||||
},
|
||||
pagination: {
|
||||
|
@ -136,13 +125,7 @@ const { data: collections } = await useAsyncData("collection", () =>
|
|||
withCount: true,
|
||||
},
|
||||
}
|
||||
: {
|
||||
pagination: {
|
||||
page: 1,
|
||||
pageSize: 10,
|
||||
withCount: true,
|
||||
},
|
||||
}),
|
||||
: {}),
|
||||
})
|
||||
);
|
||||
collection.value = collections.value?.data;
|
||||
|
@ -201,33 +184,19 @@ const displayedPagesNumbers = computed(() => {
|
|||
|
||||
function getNumber(index: number): number {
|
||||
if (props.data?.lookup.inverse_count) {
|
||||
return pagination.value.total - numberOffset.value - index;
|
||||
return pagination.value.pageCount - numberOffset.value - index + 1;
|
||||
} else {
|
||||
return numberOffset.value + index + 1;
|
||||
}
|
||||
}
|
||||
|
||||
function getDate(index: number): string {
|
||||
let thisElement = collection.value?.[index];
|
||||
let beforeElement = collection.value?.[index - 1];
|
||||
|
||||
if (thisElement && beforeElement) {
|
||||
let thisElementDate = new Date(thisElement.date ?? "").toLocaleDateString("de", { month: "long" });
|
||||
let beforeElementDate = new Date(beforeElement.date ?? "").toLocaleDateString("de", { month: "long" });
|
||||
if (thisElementDate == beforeElementDate) return "";
|
||||
else return thisElementDate;
|
||||
} else if (thisElement) {
|
||||
return new Date(thisElement.date ?? "").toLocaleDateString("de", { month: "long" });
|
||||
} else return "";
|
||||
}
|
||||
|
||||
async function changeTimedData(year: number) {
|
||||
activeYear.value = year;
|
||||
const data = await find<BaseCollection>(props.data?.lookup.collection ?? "", {
|
||||
sort: "date:desc",
|
||||
filters: {
|
||||
date: {
|
||||
$between: [`${activeYear.value}-01-01 00:00:00.000000`, `${activeYear.value}-12-31 23:59:59.999`],
|
||||
$between: [`${activeYear.value}-01-01T00:00:00.000Z`, `${activeYear.value}-12-31T23:59:59.999Z`],
|
||||
},
|
||||
},
|
||||
pagination: {
|
||||
|
@ -236,7 +205,6 @@ async function changeTimedData(year: number) {
|
|||
withCount: true,
|
||||
},
|
||||
});
|
||||
console.log(data);
|
||||
collection.value = data?.data;
|
||||
pagination.value = (data?.meta.pagination as unknown as {
|
||||
page: number;
|
||||
|
@ -255,7 +223,7 @@ async function changeTimedPage(page: number = 1) {
|
|||
sort: "date:desc",
|
||||
filters: {
|
||||
date: {
|
||||
$between: [`${activeYear.value}-01-01 00:00:00.000000`, `${activeYear.value}-12-31 23:59:59.999`],
|
||||
$between: [`${activeYear.value}-01-01T00:00:00.000Z`, `${activeYear.value}-12-31T23:59:59.999Z`],
|
||||
},
|
||||
},
|
||||
pagination: {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div v-if="!hide_backdrop" class="relative h-[calc(100svh-6rem)] max-h-[calc(100svh-6rem)] w-full overflow-hidden">
|
||||
<div class="relative h-[calc(100svh-6rem)] max-h-[calc(100svh-6rem)] w-full overflow-hidden">
|
||||
<NuxtPicture
|
||||
loading="lazy"
|
||||
class="w-full h-full object-cover object-center"
|
||||
|
@ -7,11 +7,6 @@
|
|||
:imgAttrs="{ class: 'w-full h-full object-cover object-center' }"
|
||||
/>
|
||||
<img class="absolute p-4 max-sm:w-full sm:h-40 bottom-5" :src="baseUrl + navbar.logo.url" />
|
||||
<img
|
||||
class="absolute h-5 w-5 left-1/2 -translate-y-1/2 bottom-5 text-gray-400 cursor-pointer"
|
||||
src="/chevrons-down.svg"
|
||||
@click="scroll()"
|
||||
/>
|
||||
</div>
|
||||
<Header />
|
||||
<slot />
|
||||
|
@ -33,9 +28,5 @@ const { data: global } = await useAsyncData("global", () => findOne<Global>("glo
|
|||
const { navbar } = global.value?.data as unknown as Global;
|
||||
|
||||
const { data: homepage } = await useAsyncData("homepage", () => findOne<Homepage>("homepage"));
|
||||
const { backdrop, hide_backdrop } = homepage.value?.data as unknown as Homepage;
|
||||
|
||||
function scroll() {
|
||||
window.scrollTo({ top: window.innerHeight - 96, behavior: "smooth" });
|
||||
}
|
||||
const { backdrop } = homepage.value?.data as unknown as Homepage;
|
||||
</script>
|
||||
|
|
23
package-lock.json
generated
23
package-lock.json
generated
|
@ -1,16 +1,14 @@
|
|||
{
|
||||
"name": "nuxt-app",
|
||||
"version": "1.1.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "nuxt-app",
|
||||
"version": "1.1.0",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"@nuxt/image": "^1.8.1",
|
||||
"@nuxtjs/strapi": "^2.0.0",
|
||||
"@nuxtjs/strapi": "npm:@nuxtjs/strapi-edge@1.12.0-28818224.f53bdf9",
|
||||
"nuxt": "^3.13.2",
|
||||
"vue": "latest",
|
||||
"vue-router": "latest"
|
||||
|
@ -19,7 +17,8 @@
|
|||
"autoprefixer": "^10.4.20",
|
||||
"postcss": "^8.4.47",
|
||||
"tailwindcss": "^3.4.14"
|
||||
}
|
||||
},
|
||||
"version": "1.0.1"
|
||||
},
|
||||
"node_modules/@alloc/quick-lru": {
|
||||
"version": "5.2.0",
|
||||
|
@ -1355,9 +1354,10 @@
|
|||
}
|
||||
},
|
||||
"node_modules/@nuxtjs/strapi": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@nuxtjs/strapi/-/strapi-2.0.0.tgz",
|
||||
"integrity": "sha512-6Q34PQd980ruBTaMzVx23V/GP3YeoqWt9NKxVG79d1TJMwpKHCkFqZEN5jI/2csMyncYuzP4ozt2lIi5JYTudA==",
|
||||
"name": "@nuxtjs/strapi-edge",
|
||||
"version": "1.12.0-28818224.f53bdf9",
|
||||
"resolved": "https://registry.npmjs.org/@nuxtjs/strapi-edge/-/strapi-edge-1.12.0-28818224.f53bdf9.tgz",
|
||||
"integrity": "sha512-SdazV9/5qJr/b5F//fveU9DVxBFeYKfB6Gg7wyvZoNUW9z9BSPuQyoCfDdzRkPy+QqdaLhFXPjFJdPNeK/8agA==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@nuxt/kit": "^3.13.2",
|
||||
|
@ -10923,9 +10923,9 @@
|
|||
}
|
||||
},
|
||||
"@nuxtjs/strapi": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@nuxtjs/strapi/-/strapi-2.0.0.tgz",
|
||||
"integrity": "sha512-6Q34PQd980ruBTaMzVx23V/GP3YeoqWt9NKxVG79d1TJMwpKHCkFqZEN5jI/2csMyncYuzP4ozt2lIi5JYTudA==",
|
||||
"version": "npm:@nuxtjs/strapi-edge@1.12.0-28818224.f53bdf9",
|
||||
"resolved": "https://registry.npmjs.org/@nuxtjs/strapi-edge/-/strapi-edge-1.12.0-28818224.f53bdf9.tgz",
|
||||
"integrity": "sha512-SdazV9/5qJr/b5F//fveU9DVxBFeYKfB6Gg7wyvZoNUW9z9BSPuQyoCfDdzRkPy+QqdaLhFXPjFJdPNeK/8agA==",
|
||||
"requires": {
|
||||
"@nuxt/kit": "^3.13.2",
|
||||
"defu": "^6.1.4",
|
||||
|
@ -16597,5 +16597,6 @@
|
|||
"readable-stream": "^4.0.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"version": "1.0.1"
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"@nuxt/image": "^1.8.1",
|
||||
"@nuxtjs/strapi": "^2.0.0",
|
||||
"@nuxtjs/strapi": "npm:@nuxtjs/strapi-edge@1.12.0-28818224.f53bdf9",
|
||||
"nuxt": "^3.13.2",
|
||||
"vue": "latest",
|
||||
"vue-router": "latest"
|
||||
|
@ -21,5 +21,5 @@
|
|||
"postcss": "^8.4.47",
|
||||
"tailwindcss": "^3.4.14"
|
||||
},
|
||||
"version": "1.1.0"
|
||||
"version": "1.0.1"
|
||||
}
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevrons-down"><polyline points="7 13 12 18 17 13"></polyline><polyline points="7 6 12 11 17 6"></polyline></svg>
|
Before Width: | Height: | Size: 317 B |
|
@ -1,4 +1,4 @@
|
|||
import type BaseFile from "../component/baseFile";
|
||||
import type BaseImage from "../component/baseImage";
|
||||
import type BaseCollection from "./baseCollection";
|
||||
|
||||
export default interface Article extends BaseCollection {}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type BaseFile from "../component/baseFile";
|
||||
import type BaseImage from "../component/baseImage";
|
||||
import type ContentField from "../field/content";
|
||||
|
||||
export default interface BaseCollection {
|
||||
|
@ -14,6 +14,6 @@ export default interface BaseCollection {
|
|||
description: string;
|
||||
date: string | undefined;
|
||||
content: ContentField | undefined;
|
||||
image: BaseFile | undefined;
|
||||
attachment: Array<BaseFile>;
|
||||
image: BaseImage | undefined;
|
||||
attachment: Array<BaseImage>;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type BaseFile from "../component/baseFile";
|
||||
import type BaseImage from "../component/baseImage";
|
||||
import type BaseCollection from "./baseCollection";
|
||||
|
||||
export default interface Vehicle extends BaseCollection {
|
||||
|
|
|
@ -4,9 +4,7 @@ import type DynamicZoneEmphasiseArticle from "./dynamicZoneEmphasiseArticle";
|
|||
import type DynamicZoneFullImage from "./dynamicZoneFullImage";
|
||||
import type DynamicZoneFullText from "./dynamicZoneFullText";
|
||||
import type DynamicZoneGallery from "./dynamicZoneGallery";
|
||||
import type DynamicZoneFileDownload from "./dynamicZoneFileDownload";
|
||||
import type SharedList from "./sharedList";
|
||||
import type DynamicZoneEmbedding from "./dynamicZoneEmbedding";
|
||||
|
||||
export default interface BaseComponent {
|
||||
__component: ComponentNames;
|
||||
|
@ -20,9 +18,7 @@ export type ComponentNames =
|
|||
| "dynamic-zone.full-image"
|
||||
| "dynamic-zone.emphasise-article"
|
||||
| "dynamic-zone.dual-column-text"
|
||||
| "dynamic-zone.column-image-text"
|
||||
| "dynamic-zone.file-download"
|
||||
| "dynamic-zone.embedding";
|
||||
| "dynamic-zone.column-image-text";
|
||||
|
||||
export type ComponentTypes =
|
||||
| SharedList
|
||||
|
@ -31,6 +27,4 @@ export type ComponentTypes =
|
|||
| DynamicZoneFullImage
|
||||
| DynamicZoneEmphasiseArticle
|
||||
| DynamicZoneDualColumnText
|
||||
| DynamicZoneColumnImageText
|
||||
| DynamicZoneFileDownload
|
||||
| DynamicZoneEmbedding;
|
||||
| DynamicZoneColumnImageText;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
export default interface BaseFile {
|
||||
export default interface BaseImage {
|
||||
id: number;
|
||||
documentId: string;
|
||||
name: string;
|
|
@ -1,10 +1,10 @@
|
|||
import type ContentField from "../field/content";
|
||||
import type BaseComponent from "./baseComponent";
|
||||
import type BaseFile from "./baseFile";
|
||||
import type BaseImage from "./baseImage";
|
||||
|
||||
export default interface DynamicZoneColumnImageText extends BaseComponent {
|
||||
__component: "dynamic-zone.column-image-text";
|
||||
text: ContentField;
|
||||
image_left: boolean;
|
||||
image: BaseFile;
|
||||
image: BaseImage;
|
||||
}
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
import type BaseComponent from "./baseComponent";
|
||||
|
||||
export default interface DynamicZoneEmbedding extends BaseComponent {
|
||||
__component: "dynamic-zone.embedding";
|
||||
title: string;
|
||||
link: string;
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
import type BaseComponent from "./baseComponent";
|
||||
import type BaseFile from "./baseFile";
|
||||
|
||||
export default interface DynamicZoneFileDownload extends BaseComponent {
|
||||
__component: "dynamic-zone.file-download";
|
||||
enable_download: boolean;
|
||||
title: string;
|
||||
file: BaseFile;
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
import type BaseComponent from "./baseComponent";
|
||||
import type BaseFile from "./baseFile";
|
||||
import type BaseImage from "./baseImage";
|
||||
|
||||
export default interface DynamicZoneFullImage extends BaseComponent {
|
||||
__component: "dynamic-zone.full-image";
|
||||
image: BaseFile;
|
||||
image: BaseImage;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import type BaseComponent from "./baseComponent";
|
||||
import type BaseFile from "./baseFile";
|
||||
import type BaseImage from "./baseImage";
|
||||
|
||||
export default interface DynamicZoneGallery extends BaseComponent {
|
||||
__component: "dynamic-zone.gallery";
|
||||
images: Array<BaseFile>;
|
||||
images: Array<BaseImage>;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import type BaseFile from "./baseFile";
|
||||
import type BaseImage from "./baseImage";
|
||||
import type NavbarItem from "./itemsNavbarItem";
|
||||
|
||||
export default interface Navbar {
|
||||
id: number;
|
||||
logo: BaseFile;
|
||||
logo: BaseImage;
|
||||
navbar_items: NavbarItem[];
|
||||
}
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
export default interface SEOComponent {
|
||||
metaTitle: string;
|
||||
metaDescription: string;
|
||||
keywords: string;
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
import type BaseFile from "./baseFile";
|
||||
import type BaseImage from "./baseImage";
|
||||
|
||||
export default interface SharedHero {
|
||||
id: number;
|
||||
title: string;
|
||||
banner: BaseFile;
|
||||
banner: BaseImage;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
import type Footer from "../component/globalFooter";
|
||||
import type Navbar from "../component/globalNavbar";
|
||||
import type SEOComponent from "../component/seoComponent";
|
||||
|
||||
export default interface Global {
|
||||
id: number;
|
||||
|
@ -11,5 +10,4 @@ export default interface Global {
|
|||
locale: string;
|
||||
navbar: Navbar;
|
||||
footer: Footer;
|
||||
SEO: SEOComponent;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import type BaseFile from "../component/baseFile";
|
||||
import type BaseImage from "../component/baseImage";
|
||||
import type { ComponentTypes } from "../component/baseComponent";
|
||||
|
||||
export default interface Homepage {
|
||||
|
@ -8,7 +8,6 @@ export default interface Homepage {
|
|||
updatedAt: string;
|
||||
publishedAt: string;
|
||||
locale: string;
|
||||
backdrop: BaseFile;
|
||||
hide_backdrop: boolean;
|
||||
backdrop: BaseImage;
|
||||
content: Array<ComponentTypes>;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue