From 721bc4bf78395153204500a02cb97129a268210c Mon Sep 17 00:00:00 2001 From: nicwands Date: Tue, 23 Jun 2026 10:56:36 -0400 Subject: [PATCH] add diptych --- .../content-types/mosaic-item/schema.json | 10 ++++----- src/components/global/dipytch.json | 21 +++++++++++++++++++ src/components/global/media.json | 4 ++++ types/generated/components.d.ts | 14 +++++++++++++ 4 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 src/components/global/dipytch.json diff --git a/src/api/mosaic-item/content-types/mosaic-item/schema.json b/src/api/mosaic-item/content-types/mosaic-item/schema.json index d446058..207c221 100644 --- a/src/api/mosaic-item/content-types/mosaic-item/schema.json +++ b/src/api/mosaic-item/content-types/mosaic-item/schema.json @@ -25,6 +25,11 @@ "images" ] }, + "image_attribution": { + "type": "component", + "component": "global.link", + "repeatable": false + }, "dl": { "type": "component", "component": "global.descriptive-list", @@ -36,11 +41,6 @@ "global.copy", "global.media" ] - }, - "image_attribution": { - "type": "component", - "component": "global.link", - "repeatable": false } } } diff --git a/src/components/global/dipytch.json b/src/components/global/dipytch.json new file mode 100644 index 0000000..8762e39 --- /dev/null +++ b/src/components/global/dipytch.json @@ -0,0 +1,21 @@ +{ + "collectionName": "components_global_dipytches", + "info": { + "displayName": "Dipytch", + "icon": "landscape" + }, + "options": {}, + "attributes": { + "left_media": { + "type": "component", + "component": "global.media", + "repeatable": false + }, + "right_media": { + "type": "component", + "component": "global.media", + "repeatable": false + } + }, + "config": {} +} diff --git a/src/components/global/media.json b/src/components/global/media.json index ba73ade..46b7285 100644 --- a/src/components/global/media.json +++ b/src/components/global/media.json @@ -20,6 +20,10 @@ "allowedTypes": [ "videos" ] + }, + "looping": { + "type": "boolean", + "default": true } }, "config": {} diff --git a/types/generated/components.d.ts b/types/generated/components.d.ts index c20ab36..416dd94 100644 --- a/types/generated/components.d.ts +++ b/types/generated/components.d.ts @@ -23,6 +23,18 @@ export interface GlobalDescriptiveList extends Struct.ComponentSchema { }; } +export interface GlobalDipytch extends Struct.ComponentSchema { + collectionName: 'components_global_dipytches'; + info: { + displayName: 'Dipytch'; + icon: 'landscape'; + }; + attributes: { + left_media: Schema.Attribute.Component<'global.media', false>; + right_media: Schema.Attribute.Component<'global.media', false>; + }; +} + export interface GlobalLink extends Struct.ComponentSchema { collectionName: 'components_global_links'; info: { @@ -43,6 +55,7 @@ export interface GlobalMedia extends Struct.ComponentSchema { }; attributes: { image: Schema.Attribute.Media<'images'> & Schema.Attribute.Required; + looping: Schema.Attribute.Boolean & Schema.Attribute.DefaultTo; video: Schema.Attribute.Media<'videos'>; }; } @@ -65,6 +78,7 @@ declare module '@strapi/strapi' { export interface ComponentSchemas { 'global.copy': GlobalCopy; 'global.descriptive-list': GlobalDescriptiveList; + 'global.dipytch': GlobalDipytch; 'global.link': GlobalLink; 'global.media': GlobalMedia; 'global.seo': GlobalSeo;