feat: add FilesBlock interface and component integration
- Introduced FilesBlockItem and FilesBlockData interfaces to support file handling in the CMS. - Integrated FilesBlock component into ContentRows.svelte for rendering file blocks. - Updated block type handling to include support for files, enhancing content versatility.
This commit is contained in:
@@ -119,6 +119,29 @@ export interface ImageGalleryBlockData {
|
||||
layout?: BlockLayout;
|
||||
}
|
||||
|
||||
/** Einzelne Datei in einem files-Block (CMS file-Field). */
|
||||
export interface FilesBlockItem {
|
||||
_type?: "file";
|
||||
src?: string;
|
||||
title?: string;
|
||||
description?: string;
|
||||
/** Aus Sidecar gemerged (size in Bytes). */
|
||||
size?: number;
|
||||
mime?: string;
|
||||
filename?: string;
|
||||
}
|
||||
|
||||
/** Datei-Block (_type: "files"). items = Array von file-Feldern. */
|
||||
export interface FilesBlockData {
|
||||
_type?: "files";
|
||||
_slug?: string;
|
||||
headline?: string;
|
||||
description?: string;
|
||||
items?: Array<string | FilesBlockItem>;
|
||||
forceDownload?: boolean;
|
||||
layout?: BlockLayout;
|
||||
}
|
||||
|
||||
/** YouTube-Video (_type: "youtube_video"). */
|
||||
export interface YoutubeVideoBlockData {
|
||||
_type?: "youtube_video";
|
||||
|
||||
Reference in New Issue
Block a user