project setup with core files including configuration, package management, and basic structure. Added .gitignore, README, and various TypeScript types for CMS components. Implemented initial components and layouts for the application.

This commit is contained in:
Peter Meier
2025-12-13 23:26:13 +01:00
parent ea288a5bbc
commit b1a556dc6d
167 changed files with 19057 additions and 131 deletions

View File

@@ -0,0 +1,16 @@
export interface CloudinaryImage {
bytes: number;
created_at: string;
format: string;
height: number;
original_secure_url: string;
original_url: string;
public_id: string;
resource_type: string;
secure_url: string;
type: string;
url: string;
version: number;
width: number;
}

View File

@@ -0,0 +1,42 @@
import type { HTMLSkeleton } from "./Html";
import type { MarkdownSkeleton } from "./Markdown";
import type { ComponentIframeSkeleton } from "./Iframe";
import type { ImageGallerySkeleton } from "./ImageGallery";
import type { ComponentImageSkeleton } from "./Image";
import type { QuoteSkeleton } from "./Quote";
import type { ComponentYoutubeVideoSkeleton } from "./YoutubeVideo";
import type { ComponentHeadlineSkeleton } from "./Headline";
export type rowJutify =
| "start"
| "end"
| "center"
| "between"
| "around"
| "evenly";
export type rowAlignItems = "start" | "end" | "center" | "baseline" | "stretch";
export type ContentEntry =
| HTMLSkeleton
| MarkdownSkeleton
| ComponentIframeSkeleton
| ImageGallerySkeleton
| ComponentImageSkeleton
| QuoteSkeleton
| ComponentYoutubeVideoSkeleton
| ComponentHeadlineSkeleton;
export interface Content {
row1JustifyContent: rowJutify;
row1AlignItems: rowAlignItems;
row1Content: ContentEntry[];
row2JustifyContent: rowJutify;
row2AlignItems: rowAlignItems;
row2Content: ContentEntry[];
row3JustifyContent: rowJutify;
row3AlignItems: rowAlignItems;
row3Content: ContentEntry[];
}

View File

@@ -0,0 +1,32 @@
export enum ContentType {
"componentLinkList" = "componentLinkList",
"badges" = "badges",
"componentPostOverview" = "componentPostOverview",
"footer" = "footer",
"fullwidthBanner" = "fullwidthBanner",
"headline" = "headline",
"html" = "html",
"image" = "image",
"img" = "img",
"iframe" = "iframe",
"imgGallery" = "imageGallery",
"internalReference" = "internalComponent",
"link" = "link",
"list" = "list",
"markdown" = "markdown",
"navigation" = "navigation",
"page" = "page",
"pageConfig" = "pageConfig",
"picture" = "picture",
"post" = "post",
"postComponent" = "postComponent",
"quote" = "quoteComponent",
"richtext" = "richtext",
"row" = "row",
"rowLayout" = "rowLayout",
"tag" = "tag",
"youtubeVideo" = "youtubeVideo",
"campaign" = "campaign",
"campaigns" = "campaigns",
}

View File

@@ -0,0 +1,24 @@
import type { ComponentImgSkeleton } from "./Img";
import type { CloudinaryImage } from "./CloudinaryImage";
import type { ContentType } from "./ContentType.enum";
export enum FullwidthBannerVariant {
"dark" = "dark",
"light" = "light",
}
export interface FullwidthBanner {
name: string;
variant: FullwidthBannerVariant;
headline: string;
subheadline: string;
text: string;
image: CloudinaryImage[];
img: ComponentImgSkeleton;
}
export type FullwidthBannerSkeleton = {
contentTypeId: ContentType.fullwidthBanner;
fields: FullwidthBanner;
};

View File

@@ -0,0 +1,21 @@
import type { ContentType } from "./ContentType.enum";
import type { ComponentLayout } from "./Layout";
export type Component_Headline_Align = "left" | "center" | "right";
export type Component_Headline_Tag = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
export type alignTextClasses = "text-left" | "text-center" | "text-right";
export interface ComponentHeadline {
internal: string;
text: string;
tag: Component_Headline_Tag;
layout: ComponentLayout;
align?: Component_Headline_Align;
}
export interface ComponentHeadlineSkeleton {
contentTypeId: ContentType.headline;
fields: ComponentHeadline;
}

View File

@@ -0,0 +1,14 @@
import type { ContentType } from "./ContentType.enum";
import type { ComponentLayout } from "./Layout";
export interface HTML {
id: string;
html: string;
layout: ComponentLayout;
}
export type HTMLSkeleton = {
contentTypeId: ContentType.html;
fields: HTML;
};

View File

@@ -0,0 +1,17 @@
import type { ContentType } from "./ContentType.enum";
import type { ComponentImgSkeleton } from "./Img";
import type { ComponentLayout } from "./Layout";
export interface ComponentIframe {
name: string;
content: string;
iframe: string;
overlayImage?: ComponentImgSkeleton;
layout: ComponentLayout;
}
export interface ComponentIframeSkeleton {
contentTypeId: ContentType.iframe;
fields: ComponentIframe;
}

View File

@@ -0,0 +1,18 @@
import type { ContentType } from "./ContentType.enum";
import type { ComponentImgSkeleton } from "./Img";
import type { ComponentLayout } from "./Layout";
export interface ComponentImage {
name: string;
image: ComponentImgSkeleton;
caption: string;
layout: ComponentLayout;
maxWidth?: number;
aspectRatio?: number;
}
export interface ComponentImageSkeleton {
contentTypeId: ContentType.image;
fields: ComponentImage;
}

View File

@@ -0,0 +1,16 @@
import type { ContentType } from "./ContentType.enum";
import type { ComponentImgSkeleton } from "./Img";
import type { ComponentLayout } from "./Layout";
export interface ImageGallery {
name: string;
images: ComponentImgSkeleton[];
layout: ComponentLayout;
description?: string;
}
export interface ImageGallerySkeleton {
contentTypeId: ContentType.imgGallery;
fields: ImageGallery;
}

View File

@@ -0,0 +1,26 @@
import type { ContentType } from "./ContentType.enum";
export interface ComponentImgDetails {
size: number;
image: {
width: number;
height: number;
};
}
export interface ComponentImg {
title: string;
description: string;
file: {
url: string;
details: ComponentImgDetails;
fileName: string;
contentType: string;
};
}
export interface ComponentImgSkeleton {
contentTypeId: ContentType.img;
fields: ComponentImg;
}

View File

@@ -0,0 +1,13 @@
import type { ContentType } from "./ContentType.enum";
import type { contentLayout } from "../contentLayout";
/**
* CMS-spezifisches Layout (wird vom Mapper zu contentLayout konvertiert)
* Verwendet contentLayout direkt, um Redundanz zu vermeiden
*/
export type ComponentLayout = contentLayout;
export interface ComponentLayoutSkeleton {
contentTypeId: ContentType.rowLayout;
fields: ComponentLayout;
}

View File

@@ -0,0 +1,9 @@
export interface Link {
name: string;
internal: string;
linkName: string;
url: string;
icon?: string;
newTab?: boolean;
}

View File

@@ -0,0 +1,16 @@
import type { ContentType } from "./ContentType.enum";
import type { ComponentLayout } from "./Layout";
import type { TextAlignment } from "./TextAlignment";
export interface Markdown {
name: string;
content: string;
layout: ComponentLayout;
alignment: TextAlignment;
}
export type MarkdownSkeleton = {
contentTypeId: ContentType.markdown;
fields: Markdown;
};

View File

@@ -0,0 +1,15 @@
import type { ContentType } from "./ContentType.enum";
import type { Link } from "./Link";
import type { Page } from "./Page";
export interface Navigation {
name: string;
internal: string;
links: Array<{ fields: Link | Page }>;
}
export interface NavigationSkeleton {
contentTypeId: ContentType.navigation;
fields: Navigation;
}

View File

@@ -0,0 +1,20 @@
import type { ContentType } from "./ContentType.enum";
import type { FullwidthBannerSkeleton } from "./FullwidthBanner";
import type { Content } from "./Content";
import type { SEO } from "./SEO";
export interface Page extends Content, SEO {
slug: string;
name: string;
linkName: string;
icon?: string;
headline: string;
subheadline: string;
topFullwidthBanner: FullwidthBannerSkeleton;
}
export type PageSkeleton = {
contentTypeId: ContentType.page;
fields: Page;
};

View File

@@ -0,0 +1,19 @@
import type { ContentType } from "./ContentType.enum";
import type { ComponentImgSkeleton } from "./Img";
export interface PageConfig {
logo: ComponentImgSkeleton;
footerText1: string;
seoTitle: string;
seoDescription: string;
blogTagPageHeadline: string;
blogPostsPageHeadline: string;
blogPostsPageSubHeadline: string;
website: string;
}
export interface PageConfigSkeleton {
contentTypeId: ContentType.pageConfig;
fields: PageConfig;
}

View File

@@ -0,0 +1,15 @@
import type { ContentType } from "./ContentType.enum";
import type { ComponentLayout } from "./Layout";
export interface Quote {
quote: string;
author: string;
variant: "left" | "right";
layout: ComponentLayout;
}
export type QuoteSkeleton = {
contentTypeId: ContentType.quote;
fields: Quote;
};

View File

@@ -0,0 +1,12 @@
export type metaRobots =
| "index, follow"
| "noindex, follow"
| "index, nofollow"
| "noindex, nofollow";
export interface SEO {
seoTitle: string;
seoMetaRobots: metaRobots;
seoDescription: string;
}

View File

@@ -0,0 +1,7 @@
export type TextAlignment = "left" | "center" | "right";
export enum TextAlignmentClasses {
"left" = "text-left",
"center" = "text-center",
"right" = "text-right",
}

View File

@@ -0,0 +1,17 @@
import type { ContentType } from "./ContentType.enum";
import type { ComponentLayout } from "./Layout";
export interface YoutubeVideo {
id: string;
youtubeId: string;
params?: string;
title?: string;
description?: string;
layout: ComponentLayout;
}
export interface ComponentYoutubeVideoSkeleton {
contentTypeId: ContentType.youtubeVideo;
fields: YoutubeVideo;
}

View File

@@ -0,0 +1,22 @@
// Re-export all types for easier imports
export * from "./ContentType.enum";
export * from "./Layout";
export * from "./Html";
export * from "./Markdown";
export * from "./Img";
export * from "./Iframe";
export * from "./ImageGallery";
export * from "./Image";
export * from "./Quote";
export * from "./YoutubeVideo";
export * from "./Headline";
export * from "./FullwidthBanner";
export * from "./Content";
export * from "./SEO";
export * from "./Page";
export * from "./TextAlignment";
export * from "./CloudinaryImage";
export * from "./Navigation";
export * from "./Link";
export * from "./PageConfig";