495 lines
13 KiB
React
495 lines
13 KiB
React
// tina/config.ts
|
|
import { defineConfig } from "tinacms";
|
|
import { UsernamePasswordAuthJSProvider, TinaUserCollection } from "tinacms-authjs/dist/tinacms";
|
|
var config_default = defineConfig({
|
|
contentApiUrlOverride: "/api/tina/gql",
|
|
authProvider: new UsernamePasswordAuthJSProvider(),
|
|
build: {
|
|
outputFolder: "admin",
|
|
publicFolder: "public"
|
|
},
|
|
media: {
|
|
tina: {
|
|
mediaRoot: "images",
|
|
publicFolder: "public",
|
|
static: false
|
|
}
|
|
},
|
|
schema: {
|
|
collections: [
|
|
TinaUserCollection,
|
|
{
|
|
name: "post",
|
|
label: "Blog Posts",
|
|
path: "content/blog",
|
|
format: "mdx",
|
|
fields: [
|
|
{
|
|
type: "string",
|
|
name: "title",
|
|
label: "Title",
|
|
isTitle: true,
|
|
required: true
|
|
},
|
|
{
|
|
type: "datetime",
|
|
name: "date",
|
|
label: "Publication Date",
|
|
required: true
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "excerpt",
|
|
label: "Excerpt",
|
|
required: true,
|
|
description: "Short summary of the blog post"
|
|
},
|
|
{
|
|
type: "image",
|
|
name: "coverImage",
|
|
label: "Cover Image",
|
|
description: "Featured image for the blog post"
|
|
},
|
|
{
|
|
type: "rich-text",
|
|
name: "body",
|
|
label: "Body",
|
|
isBody: true,
|
|
required: true
|
|
}
|
|
],
|
|
defaultItem: () => {
|
|
return {
|
|
title: "New Blog Post",
|
|
date: (/* @__PURE__ */ new Date()).toISOString(),
|
|
excerpt: ""
|
|
};
|
|
}
|
|
},
|
|
{
|
|
name: "page",
|
|
label: "Pages",
|
|
path: "content/pages",
|
|
format: "mdx",
|
|
fields: [
|
|
{
|
|
type: "string",
|
|
name: "title",
|
|
label: "Title",
|
|
isTitle: true,
|
|
required: true
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "description",
|
|
label: "Description",
|
|
description: "Meta description for SEO"
|
|
},
|
|
{
|
|
type: "rich-text",
|
|
name: "body",
|
|
label: "Content",
|
|
isBody: true,
|
|
required: true
|
|
}
|
|
]
|
|
},
|
|
{
|
|
name: "theaterHomepage",
|
|
label: "Theater Homepage",
|
|
path: "content/theater",
|
|
format: "mdx",
|
|
ui: {
|
|
allowedActions: {
|
|
create: false,
|
|
delete: false
|
|
}
|
|
},
|
|
fields: [
|
|
{
|
|
type: "string",
|
|
name: "title",
|
|
label: "Page Title",
|
|
isTitle: true,
|
|
required: true
|
|
},
|
|
// Hero Section
|
|
{
|
|
type: "object",
|
|
name: "hero",
|
|
label: "Hero Section",
|
|
fields: [
|
|
{
|
|
type: "string",
|
|
name: "title_de",
|
|
label: "Title (German)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "title_en",
|
|
label: "Title (English)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "subtitle_de",
|
|
label: "Subtitle (German)",
|
|
required: true,
|
|
ui: {
|
|
component: "textarea"
|
|
}
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "subtitle_en",
|
|
label: "Subtitle (English)",
|
|
required: true,
|
|
ui: {
|
|
component: "textarea"
|
|
}
|
|
}
|
|
]
|
|
},
|
|
// Section 1: Das Projekt
|
|
{
|
|
type: "object",
|
|
name: "projekt",
|
|
label: "Section 1: Das Projekt / The Project",
|
|
fields: [
|
|
{
|
|
type: "string",
|
|
name: "title_de",
|
|
label: "Title (German)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "title_en",
|
|
label: "Title (English)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "rich-text",
|
|
name: "content_de",
|
|
label: "Content (German)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "rich-text",
|
|
name: "content_en",
|
|
label: "Content (English)",
|
|
required: true
|
|
}
|
|
]
|
|
},
|
|
// Section 2: Wer steckt dahinter
|
|
{
|
|
type: "object",
|
|
name: "team",
|
|
label: "Section 2: Wer steckt dahinter / Who's Behind It",
|
|
fields: [
|
|
{
|
|
type: "string",
|
|
name: "title_de",
|
|
label: "Title (German)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "title_en",
|
|
label: "Title (English)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "rich-text",
|
|
name: "content_de",
|
|
label: "Content (German)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "rich-text",
|
|
name: "content_en",
|
|
label: "Content (English)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "object",
|
|
name: "organizations",
|
|
label: "Organizations",
|
|
list: true,
|
|
fields: [
|
|
{
|
|
type: "string",
|
|
name: "name",
|
|
label: "Name"
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "role_de",
|
|
label: "Role (German)"
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "role_en",
|
|
label: "Role (English)"
|
|
},
|
|
{
|
|
type: "image",
|
|
name: "logo",
|
|
label: "Logo",
|
|
description: "Organization logo image (SVG, PNG, JPG supported)"
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "url",
|
|
label: "Website URL",
|
|
description: "Organization website link"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
// Section 3: Das Stück
|
|
{
|
|
type: "object",
|
|
name: "stueck",
|
|
label: "Section 3: Das St\xFCck / The Play",
|
|
fields: [
|
|
{
|
|
type: "string",
|
|
name: "title_de",
|
|
label: "Title (German)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "title_en",
|
|
label: "Title (English)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "rich-text",
|
|
name: "content_de",
|
|
label: "Content (German)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "rich-text",
|
|
name: "content_en",
|
|
label: "Content (English)",
|
|
required: true
|
|
}
|
|
]
|
|
},
|
|
// Section 4: Mitwirkung
|
|
{
|
|
type: "object",
|
|
name: "mitwirkung",
|
|
label: "Section 4: Mitwirkung / Participation",
|
|
fields: [
|
|
{
|
|
type: "string",
|
|
name: "title_de",
|
|
label: "Title (German)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "title_en",
|
|
label: "Title (English)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "rich-text",
|
|
name: "content_de",
|
|
label: "Content (German)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "rich-text",
|
|
name: "content_en",
|
|
label: "Content (English)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "director_name",
|
|
label: "Director Name"
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "director_email",
|
|
label: "Director Email"
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "director_phone",
|
|
label: "Director Phone"
|
|
}
|
|
]
|
|
},
|
|
// Section 5: Termine
|
|
{
|
|
type: "object",
|
|
name: "termine",
|
|
label: "Section 5: Termine / Schedule",
|
|
fields: [
|
|
{
|
|
type: "string",
|
|
name: "title_de",
|
|
label: "Title (German)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "title_en",
|
|
label: "Title (English)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "object",
|
|
name: "events",
|
|
label: "Events",
|
|
list: true,
|
|
fields: [
|
|
{
|
|
type: "string",
|
|
name: "title_de",
|
|
label: "Event Title (German)"
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "title_en",
|
|
label: "Event Title (English)"
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "date",
|
|
label: "Date/Period"
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "description_de",
|
|
label: "Description (German)",
|
|
ui: {
|
|
component: "textarea"
|
|
}
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "description_en",
|
|
label: "Description (English)",
|
|
ui: {
|
|
component: "textarea"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
// Section 6: Presse
|
|
{
|
|
type: "object",
|
|
name: "presse",
|
|
label: "Section 6: Presse / Press",
|
|
fields: [
|
|
{
|
|
type: "string",
|
|
name: "title_de",
|
|
label: "Title (German)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "title_en",
|
|
label: "Title (English)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "rich-text",
|
|
name: "content_de",
|
|
label: "Content (German)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "rich-text",
|
|
name: "content_en",
|
|
label: "Content (English)",
|
|
required: true
|
|
}
|
|
]
|
|
},
|
|
// Section 7: Foto Galerie
|
|
{
|
|
type: "object",
|
|
name: "gallery",
|
|
label: "Section 7: Foto Galerie / Photo Gallery",
|
|
fields: [
|
|
{
|
|
type: "string",
|
|
name: "title_de",
|
|
label: "Title (German)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "title_en",
|
|
label: "Title (English)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "image",
|
|
name: "images",
|
|
label: "Gallery Images",
|
|
list: true
|
|
}
|
|
]
|
|
},
|
|
// Section 8: Tickets
|
|
{
|
|
type: "object",
|
|
name: "tickets",
|
|
label: "Section 8: Tickets",
|
|
fields: [
|
|
{
|
|
type: "string",
|
|
name: "title_de",
|
|
label: "Title (German)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "title_en",
|
|
label: "Title (English)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "rich-text",
|
|
name: "content_de",
|
|
label: "Content (German)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "rich-text",
|
|
name: "content_en",
|
|
label: "Content (English)",
|
|
required: true
|
|
},
|
|
{
|
|
type: "string",
|
|
name: "ticket_url",
|
|
label: "Ticket Purchase URL",
|
|
description: "External link to ticket partner"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
});
|
|
export {
|
|
config_default as default
|
|
};
|