component formatting and types
This commit is contained in:
parent
c2a7d15eeb
commit
ce745c06e5
60 changed files with 464 additions and 301 deletions
|
@ -1,12 +1,14 @@
|
|||
import type DynamicZoneColumnImageText from "./dynamicZoneColumnImageText";
|
||||
import type DynamicZoneDualColumnText from "./dynamicZoneDualColumnText";
|
||||
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";
|
||||
import type SharedEmphasiseArticle from "./shared/emphasiseArticle";
|
||||
import type SharedList from "./shared/list";
|
||||
import type DynamicZoneColumnImageText from "./dynamic-zone/columnImageText";
|
||||
import type DynamicZoneDualColumnText from "./dynamic-zone/dualColumnText";
|
||||
import type DynamicZoneFullImage from "./dynamic-zone/fullImage";
|
||||
import type DynamicZoneFullText from "./dynamic-zone/fullText";
|
||||
import type DynamicZoneGallery from "./dynamic-zone/gallery";
|
||||
import type DynamicZoneFileDownload from "./dynamic-zone/fileDownload";
|
||||
import type DynamicZoneEmbedding from "./dynamic-zone/embedding";
|
||||
import type DynamicZoneSection from "./dynamic-zone/section";
|
||||
import type DynamicZoneSpacer from "./dynamic-zone/spacer";
|
||||
|
||||
export default interface BaseComponent {
|
||||
__component: ComponentNames;
|
||||
|
@ -15,10 +17,12 @@ export default interface BaseComponent {
|
|||
|
||||
export type ComponentNames =
|
||||
| "shared.list"
|
||||
| "shared.emphasise-article"
|
||||
| "dynamic-zone.section"
|
||||
| "dynamic-zone.spacer"
|
||||
| "dynamic-zone.gallery"
|
||||
| "dynamic-zone.full-text"
|
||||
| "dynamic-zone.full-image"
|
||||
| "dynamic-zone.emphasise-article"
|
||||
| "dynamic-zone.dual-column-text"
|
||||
| "dynamic-zone.column-image-text"
|
||||
| "dynamic-zone.file-download"
|
||||
|
@ -26,10 +30,12 @@ export type ComponentNames =
|
|||
|
||||
export type ComponentTypes =
|
||||
| SharedList
|
||||
| SharedEmphasiseArticle
|
||||
| DynamicZoneSection
|
||||
| DynamicZoneSpacer
|
||||
| DynamicZoneGallery
|
||||
| DynamicZoneFullText
|
||||
| DynamicZoneFullImage
|
||||
| DynamicZoneEmphasiseArticle
|
||||
| DynamicZoneDualColumnText
|
||||
| DynamicZoneColumnImageText
|
||||
| DynamicZoneFileDownload
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import type ContentField from "../field/content";
|
||||
import type BaseComponent from "./baseComponent";
|
||||
import type BaseFile from "./baseFile";
|
||||
import type ContentField from "../../field/content";
|
||||
import type BaseComponent from "../baseComponent";
|
||||
import type BaseFile from "../baseFile";
|
||||
|
||||
export default interface DynamicZoneColumnImageText extends BaseComponent {
|
||||
__component: "dynamic-zone.column-image-text";
|
|
@ -1,5 +1,5 @@
|
|||
import type ContentField from "../field/content";
|
||||
import type BaseComponent from "./baseComponent";
|
||||
import type ContentField from "../../field/content";
|
||||
import type BaseComponent from "../baseComponent";
|
||||
|
||||
export default interface DynamicZoneDualColumnText extends BaseComponent {
|
||||
__component: "dynamic-zone.dual-column-text";
|
|
@ -1,7 +1,6 @@
|
|||
import type BaseComponent from "./baseComponent";
|
||||
import type BaseComponent from "../baseComponent";
|
||||
|
||||
export default interface DynamicZoneEmbedding extends BaseComponent {
|
||||
__component: "dynamic-zone.embedding";
|
||||
title: string;
|
||||
link: string;
|
||||
}
|
|
@ -1,9 +1,8 @@
|
|||
import type BaseComponent from "./baseComponent";
|
||||
import type BaseFile from "./baseFile";
|
||||
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,5 +1,5 @@
|
|||
import type BaseComponent from "./baseComponent";
|
||||
import type BaseFile from "./baseFile";
|
||||
import type BaseComponent from "../baseComponent";
|
||||
import type BaseFile from "../baseFile";
|
||||
|
||||
export default interface DynamicZoneFullImage extends BaseComponent {
|
||||
__component: "dynamic-zone.full-image";
|
|
@ -1,5 +1,5 @@
|
|||
import type ContentField from "../field/content";
|
||||
import type BaseComponent from "./baseComponent";
|
||||
import type ContentField from "../../field/content";
|
||||
import type BaseComponent from "../baseComponent";
|
||||
|
||||
export default interface DynamicZoneFullText extends BaseComponent {
|
||||
__component: "dynamic-zone.full-text";
|
|
@ -1,5 +1,5 @@
|
|||
import type BaseComponent from "./baseComponent";
|
||||
import type BaseFile from "./baseFile";
|
||||
import type BaseComponent from "../baseComponent";
|
||||
import type BaseFile from "../baseFile";
|
||||
|
||||
export default interface DynamicZoneGallery extends BaseComponent {
|
||||
__component: "dynamic-zone.gallery";
|
7
types/component/dynamic-zone/section.ts
Normal file
7
types/component/dynamic-zone/section.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
import type BaseComponent from "../baseComponent";
|
||||
|
||||
export default interface DynamicZoneSection extends BaseComponent {
|
||||
__component: "dynamic-zone.section";
|
||||
title: string;
|
||||
description: string;
|
||||
}
|
5
types/component/dynamic-zone/spacer.ts
Normal file
5
types/component/dynamic-zone/spacer.ts
Normal file
|
@ -0,0 +1,5 @@
|
|||
import type BaseComponent from "../baseComponent";
|
||||
|
||||
export default interface DynamicZoneSpacer extends BaseComponent {
|
||||
__component: "dynamic-zone.spacer";
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
import type Article from "../collection/article";
|
||||
import type BaseComponent from "./baseComponent";
|
||||
|
||||
export default interface DynamicZoneEmphasiseArticle extends BaseComponent {
|
||||
__component: "dynamic-zone.emphasise-article";
|
||||
titel: string;
|
||||
description: string;
|
||||
articles: Array<Article>;
|
||||
base_url: string;
|
||||
}
|
8
types/component/global/footer.ts
Normal file
8
types/component/global/footer.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
import type FooterLink from "../items/footerLink";
|
||||
|
||||
export default interface Footer {
|
||||
id: number;
|
||||
copyright: undefined | string;
|
||||
maintained_by: undefined | string;
|
||||
links: FooterLink[];
|
||||
}
|
6
types/component/global/navbar.ts
Normal file
6
types/component/global/navbar.ts
Normal file
|
@ -0,0 +1,6 @@
|
|||
import type NavbarItem from "../items/navbarItem";
|
||||
|
||||
export default interface Navbar {
|
||||
id: number;
|
||||
navbar_items: NavbarItem[];
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
export default interface SEOComponent {
|
||||
export default interface SEO {
|
||||
metaTitle: string;
|
||||
metaDescription: string;
|
||||
keywords: string;
|
|
@ -1,8 +0,0 @@
|
|||
import type FooterLink from "./itemsFooterLink";
|
||||
|
||||
export default interface Footer {
|
||||
id: number;
|
||||
copyright: string;
|
||||
maintained?: string;
|
||||
links: FooterLink[];
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
import type BaseFile from "./baseFile";
|
||||
import type NavbarItem from "./itemsNavbarItem";
|
||||
|
||||
export default interface Navbar {
|
||||
id: number;
|
||||
logo: BaseFile;
|
||||
navbar_items: NavbarItem[];
|
||||
}
|
7
types/component/items/hero.ts
Normal file
7
types/component/items/hero.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
import type BaseFile from "../baseFile";
|
||||
|
||||
export default interface ItemsHero {
|
||||
id: number;
|
||||
title: string | undefined;
|
||||
banner: BaseFile | undefined;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
import type NavbarSubItem from "./itemsNavbarSubItem";
|
||||
import type NavbarSubItem from "./navbarSubItem";
|
||||
|
||||
export default interface NavbarItem {
|
||||
id: number;
|
|
@ -1,4 +1,4 @@
|
|||
import type Page from "../collection/page";
|
||||
import type Page from "../../collection/page";
|
||||
|
||||
export default interface NavbarSubItem {
|
||||
id: number;
|
8
types/component/shared/emphasiseArticle.ts
Normal file
8
types/component/shared/emphasiseArticle.ts
Normal file
|
@ -0,0 +1,8 @@
|
|||
import type Article from "../../collection/article";
|
||||
import type BaseComponent from "../baseComponent";
|
||||
|
||||
export default interface SharedEmphasiseArticle extends BaseComponent {
|
||||
__component: "shared.emphasise-article";
|
||||
articles: Array<Article>;
|
||||
link_to_articles: string;
|
||||
}
|
7
types/component/shared/list.ts
Normal file
7
types/component/shared/list.ts
Normal file
|
@ -0,0 +1,7 @@
|
|||
import type Lookup from "../../collection/lookup";
|
||||
import type BaseComponent from "../baseComponent";
|
||||
|
||||
export default interface SharedList extends BaseComponent {
|
||||
__component: "shared.list";
|
||||
lookup: Lookup;
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
import type BaseFile from "./baseFile";
|
||||
|
||||
export default interface SharedHero {
|
||||
id: number;
|
||||
title: string;
|
||||
banner: BaseFile;
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
import type Lookup from "../collection/lookup";
|
||||
import type BaseComponent from "./baseComponent";
|
||||
|
||||
export default interface SharedList extends BaseComponent {
|
||||
__component: "shared.list";
|
||||
enable_detail: boolean;
|
||||
lookup: Lookup;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue