some cms fixes

This commit is contained in:
2022-12-15 18:45:01 +01:00
parent 52a924743f
commit a659956048
9 changed files with 139 additions and 136 deletions

View File

@ -290,7 +290,6 @@ collections:
- {label: "Titel", name: "title", widget: "string", required: true}
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
- {label: "Bild", name: "image", widget: "image", default: "/media/image.png", required: false}
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
- label: "Elemente"
label_singular: "Element"
@ -527,7 +526,6 @@ collections:
collection: "author-de"
search_fields: ["title"]
value_field: "title"
display_fields: ["title"]
- label: "Kategorien"
name: "categories"
widget: "list"

View File

@ -35,9 +35,7 @@
options: {
icon: 'info',
},
});
});
</script>
<script>
CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/bootstrap/bootstrap.min.css");
@ -58,11 +56,11 @@ var ChronikPreview = ({widgetFor, entry }) => {
h('div', {"className": "container"},
h('div', {"className": "col-md-8"},
h('ul', {"className": "list-inline custom-breadcrumb"},
h('li', {"className": "list-inline-item h1"},
h('li', {"className": "list-inline-item h2"},
h('a', {"className": "text-primary font-secondary", href: ""}, "Schulchronik")),
h('li', {"className": "list-inline-item ha"},
h('li', {"className": "list-inline-item h2"},
h("i", {"className": "fa-solid fa-angle-right text-white"})),
h('li', {"className": "list-inline-item text-white h1 font-secondary"}, entry.data.title)
h('li', {"className": "list-inline-item text-white h2 font-secondary"}, entry.data.title)
)
)
)
@ -122,6 +120,7 @@ CMS.registerPreviewTemplate("jia-index", PostPreviewContent);
CMS.registerPreviewTemplate("bibo", PostPreviewContent);
CMS.registerPreviewTemplate("abiturienten", PostPreviewContent);
CMS.registerPreviewTemplate("cantorfora", PostPreviewContent);
CMS.registerPreviewTemplate("contact-index", PostPreviewContent);
</script>
<script>
@ -189,13 +188,13 @@ var EventPreview = ({widgetsFor, entry}) => {
h('div', {"className": "container"},
h('div', {"className": "col-md-8"},
h('ul', {"className": "list-inline custom-breadcrumb"},
h('li', {"className": "list-inline-item h1"},
h('li', {"className": "list-inline-item h2"},
h('a', {"className": "text-primary font-secondary", href: ""}, "Startseite")
),
h('li', {"className": "list-inline-item ha"},
h('li', {"className": "list-inline-item h2"},
h("i", {"className": "fa-solid fa-angle-right text-white"})
),
h('li', {"className": "list-inline-item text-white h1 font-secondary"}, entry.data.title
h('li', {"className": "list-inline-item text-white h2 font-secondary"}, entry.data.title
)
),
h('p', {"className": "text-lighten"}, entry.data.description)
@ -211,7 +210,7 @@ var EventPreview = ({widgetsFor, entry}) => {
widgetsFor('events').map(function(event, index) {
console.log(event.data.date);
return h('li', {"className": "d-md-table mb-4 w-100 border-bottom hover-shadow"},
h('div', {"className": "d-md-table-cell text-center p-4 bg-primary text-white mb-4 mb-md-0"},
h('div', {"className": "d-md-table-cell text-center p-4 bg-primary text-white mb-4 mb-md-0 termin-tc"},
h('span', {"className": "h2 d-block"}, new Intl.DateTimeFormat('de-De', { day: 'numeric'}).format(new Date(event.data.date))),
new Intl.DateTimeFormat('de-De', { month: 'short', year: 'numeric' }).format(new Date(event.data.date))
),
@ -268,7 +267,6 @@ var PagePreview = ({widgetFor, entry}) => {
CMS.registerPreviewTemplate("blog-index", PagePreview);
CMS.registerPreviewTemplate("cantorpreis-index", PagePreview);
CMS.registerPreviewTemplate("contact-index", PagePreview);
CMS.registerPreviewTemplate("forms-index", PagePreview);
CMS.registerPreviewTemplate("ganztagsangebote-index", PagePreview);
CMS.registerPreviewTemplate("wettbewerbe-index", PagePreview);