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:
16
middlelayer/types/cms/CloudinaryImage.ts
Normal file
16
middlelayer/types/cms/CloudinaryImage.ts
Normal 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;
|
||||
}
|
||||
|
||||
42
middlelayer/types/cms/Content.ts
Normal file
42
middlelayer/types/cms/Content.ts
Normal 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[];
|
||||
}
|
||||
|
||||
32
middlelayer/types/cms/ContentType.enum.ts
Normal file
32
middlelayer/types/cms/ContentType.enum.ts
Normal 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",
|
||||
}
|
||||
|
||||
24
middlelayer/types/cms/FullwidthBanner.ts
Normal file
24
middlelayer/types/cms/FullwidthBanner.ts
Normal 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;
|
||||
};
|
||||
|
||||
21
middlelayer/types/cms/Headline.ts
Normal file
21
middlelayer/types/cms/Headline.ts
Normal 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;
|
||||
}
|
||||
14
middlelayer/types/cms/Html.ts
Normal file
14
middlelayer/types/cms/Html.ts
Normal 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;
|
||||
};
|
||||
|
||||
17
middlelayer/types/cms/Iframe.ts
Normal file
17
middlelayer/types/cms/Iframe.ts
Normal 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;
|
||||
}
|
||||
|
||||
18
middlelayer/types/cms/Image.ts
Normal file
18
middlelayer/types/cms/Image.ts
Normal 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;
|
||||
}
|
||||
|
||||
16
middlelayer/types/cms/ImageGallery.ts
Normal file
16
middlelayer/types/cms/ImageGallery.ts
Normal 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;
|
||||
}
|
||||
|
||||
26
middlelayer/types/cms/Img.ts
Normal file
26
middlelayer/types/cms/Img.ts
Normal 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;
|
||||
}
|
||||
|
||||
13
middlelayer/types/cms/Layout.ts
Normal file
13
middlelayer/types/cms/Layout.ts
Normal 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;
|
||||
}
|
||||
9
middlelayer/types/cms/Link.ts
Normal file
9
middlelayer/types/cms/Link.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export interface Link {
|
||||
name: string;
|
||||
internal: string;
|
||||
linkName: string;
|
||||
url: string;
|
||||
icon?: string;
|
||||
newTab?: boolean;
|
||||
}
|
||||
|
||||
16
middlelayer/types/cms/Markdown.ts
Normal file
16
middlelayer/types/cms/Markdown.ts
Normal 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;
|
||||
};
|
||||
|
||||
15
middlelayer/types/cms/Navigation.ts
Normal file
15
middlelayer/types/cms/Navigation.ts
Normal 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;
|
||||
}
|
||||
|
||||
20
middlelayer/types/cms/Page.ts
Normal file
20
middlelayer/types/cms/Page.ts
Normal 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;
|
||||
};
|
||||
|
||||
19
middlelayer/types/cms/PageConfig.ts
Normal file
19
middlelayer/types/cms/PageConfig.ts
Normal 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;
|
||||
}
|
||||
|
||||
15
middlelayer/types/cms/Quote.ts
Normal file
15
middlelayer/types/cms/Quote.ts
Normal 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;
|
||||
};
|
||||
|
||||
12
middlelayer/types/cms/SEO.ts
Normal file
12
middlelayer/types/cms/SEO.ts
Normal 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;
|
||||
}
|
||||
|
||||
7
middlelayer/types/cms/TextAlignment.ts
Normal file
7
middlelayer/types/cms/TextAlignment.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export type TextAlignment = "left" | "center" | "right";
|
||||
export enum TextAlignmentClasses {
|
||||
"left" = "text-left",
|
||||
"center" = "text-center",
|
||||
"right" = "text-right",
|
||||
}
|
||||
|
||||
17
middlelayer/types/cms/YoutubeVideo.ts
Normal file
17
middlelayer/types/cms/YoutubeVideo.ts
Normal 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;
|
||||
}
|
||||
|
||||
22
middlelayer/types/cms/index.ts
Normal file
22
middlelayer/types/cms/index.ts
Normal 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";
|
||||
|
||||
Reference in New Issue
Block a user