UNPKG

@seidhr/sanity-plugin-muna-schemas

Version:

Muna or ᛗᚢᚾᚨ means remember in norse. Muna is a schema for the Sanity Studio that enables detailed descriptions of cultural heritage objects and knowledge about their contexts as well as pages about them (or anything else really.)

58 lines (53 loc) 1.07 kB
export default { name: 'MiradorGallery', type: 'object', title: 'Mirador galleri', titleEN: 'Mirador gallery', options: { semanticSanity: { exclude: true } }, fields: [ { name: 'disabled', title: 'Avslått?', titleEN: 'Disabled', type: 'boolean', }, { name: 'items', title: 'Vinduer', titleEN: 'Items', type: 'array', of: [{ type: 'MiradorGalleryWindow' }], }, { name: 'label', title: 'Tittel', titleEN: 'Heading', type: 'string', }, { name: 'description', title: 'Beskrivelse', titleEN: 'Description', type: 'simpleBlockContent', }, ], preview: { select: { title: 'label', media: 'items.0.manifestRef.image', items: 'items' }, prepare({ title, media, items }) { const count = items?.length ?? 'no' return { title: title ?? 'Missing title', subtitle: `Mirador galleri, ${count} document(s)`, media: media ? media : '' } } }, }