RustyCMS: File-based headless CMS with REST API, admin UI, multilingual support
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
57
@types/Contentful_Picture.ts
Normal file
57
@types/Contentful_Picture.ts
Normal file
@@ -0,0 +1,57 @@
|
||||
import type { EntryFieldTypes } from "contentful";
|
||||
import type { CF_ContentType } from "src/@types/Contentful_ContentType.enum";
|
||||
import type { CF_CloudinaryImage } from "src/@types/Contentful_CloudinaryImage";
|
||||
|
||||
|
||||
export type CF_PictureWidths = 400 | 800 | 1200 | 1400
|
||||
export type CF_PictureFormats = "aviv" | "jpg" | "png" | "webp"
|
||||
export type CF_PictureFit = "contain" | "cover" | "fill" | "inside" | "outside"
|
||||
export type CF_PicturePosition = "top"
|
||||
| "right top"
|
||||
| "right"
|
||||
| "right bottom"
|
||||
| "bottom"
|
||||
| "left bottom"
|
||||
| "left"
|
||||
| "left top"
|
||||
| "north"
|
||||
| "northeast"
|
||||
| "east"
|
||||
| "southeast"
|
||||
| "south"
|
||||
| "southwest"
|
||||
| "west"
|
||||
| "northwest"
|
||||
| "center"
|
||||
| "centre"
|
||||
| "cover"
|
||||
| "entropy"
|
||||
| "attention"
|
||||
export type CF_PictureAspectRatio = 'original'
|
||||
| '32:9'
|
||||
| '16:9'
|
||||
| '5:4'
|
||||
| '4:3'
|
||||
| '3:2'
|
||||
| '1:1'
|
||||
| '2:3'
|
||||
| '3:4'
|
||||
| '4:5'
|
||||
|
||||
|
||||
export interface CF_Picture {
|
||||
name: EntryFieldTypes.Text;
|
||||
image: CF_CloudinaryImage[];
|
||||
alt?: EntryFieldTypes.Text;
|
||||
widths: Array<CF_PictureWidths>;
|
||||
aspectRatio: CF_PictureAspectRatio;
|
||||
formats: CF_PictureFormats;
|
||||
fit: CF_PictureFit;
|
||||
position: CF_PicturePosition;
|
||||
layout?: any;
|
||||
}
|
||||
|
||||
export type CF_PictureSkeleton = {
|
||||
contentTypeId: CF_ContentType.picture
|
||||
fields: CF_Picture
|
||||
}
|
||||
Reference in New Issue
Block a user