feat: add FilesBlock interface and component integration
Deploy / verify (push) Successful in 46s
Deploy / deploy (push) Successful in 1m8s

- 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:
Peter Meier
2026-04-22 10:23:20 +02:00
parent bedfe597ab
commit 5b5ec7c659
6 changed files with 481 additions and 0 deletions
+23
View File
@@ -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";