const PostCollection = { name: "post", label: "Artikel", description: "Hier könnt ihr die Artikel der Schülerzeitung bearbeiten.", icon: "news", folder: "content/post", create: true, editor: { preview: true, frame: true, size: "half", }, filter: { field: "type", value: "post", }, summary_fields: ["title", "date", "draft"], fields: [ { name: "title", label: "Titel", widget: "string", required: true, }, { name: "draft", label: "Entwurf", widget: "boolean", required: false, }, { name: "date", label: "Datum", widget: "datetime", date_format: "dd.MM.yyyy", time_format: false, format: "yyyy-MM-dd", required: true, }, { name: "description", label: "Beschreibung", widget: "text", required: false, }, { name: "image", label: "Titelbild", widget: "image", required: false, }, { name: "tags", label: "Tags", widget: "list", delimiter: ",", required: false, }, { name: "categories", label: "Kategorien", widget: "list", delimiter: ",", required: false, }, { name: "type", widget: "hidden", default: "post", }, { name: "body", label: "Inhalt", widget: "markdown", required: true, }, ], }; const PagesCollection = { name: "page", label: "Seiten", description: "Hier könnt ihr die Zusatzseiten der Website bearbeiten.", icon: "page", folder: "content/page", create: true, editor: { preview: true, frame: true, size: "half", }, media_library: { folder_support: true, }, summary_fields: ["title", "date", "draft", "description"], fields: [ { name: "title", label: "Titel", widget: "string", required: true, }, { name: "draft", label: "Entwurf", widget: "boolean", required: false, }, { name: "date", label: "Datum", widget: "datetime", date_format: "dd.MM.yyyy", time_format: false, format: "yyyy-MM-dd", required: true, }, { name: "description", label: "Beschreibung", widget: "text", required: false, }, { name: "tags", label: "Tags", widget: "list", delimiter: ",", required: false, }, { name: "show-in-menu", label: "Im Menü anzeigen", widget: "boolean", required: false, }, { name: "menu", label: "Menü", widget: "object", condition: { field: "show-in-menu", value: true, }, required: false, fields: [ { name: "main", label: "Hauptmenü", widget: "object", fields: [ { name: "weight", label: "Gewichtung", widget: "string", required: true, }, { name: "params", label: "Parameter", widget: "keyvalue", required: false, } ] } ] }, { name: "body", label: "Inhalt", widget: "markdown", required: true, }, ], }; export { PostCollection, PagesCollection };