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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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[];
|
||||
}
|
||||
|
||||
@@ -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",
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
export interface Link {
|
||||
name: string;
|
||||
internal: string;
|
||||
linkName: string;
|
||||
url: string;
|
||||
icon?: string;
|
||||
newTab?: boolean;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
};
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
export type metaRobots =
|
||||
| "index, follow"
|
||||
| "noindex, follow"
|
||||
| "index, nofollow"
|
||||
| "noindex, nofollow";
|
||||
|
||||
export interface SEO {
|
||||
seoTitle: string;
|
||||
seoMetaRobots: metaRobots;
|
||||
seoDescription: string;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
export type TextAlignment = "left" | "center" | "right";
|
||||
export enum TextAlignmentClasses {
|
||||
"left" = "text-left",
|
||||
"center" = "text-center",
|
||||
"right" = "text-right",
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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