171 lines
5.6 KiB
HTML
Raw Permalink Normal View History

2023-01-10 22:23:04 +01:00
<!DOCTYPE html>
2020-07-11 13:45:14 +02:00
<html>
2023-01-10 22:23:04 +01:00
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
2023-03-26 17:19:37 +02:00
<link rel="stylesheet" href="https://assets.cantorgymnasium.de/fonts/mdi/v7/css/materialdesignicons.min.css">
2023-04-21 16:02:58 +02:00
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@staticcms/app@^2.0.0/dist/main.css" />
2023-01-10 22:23:04 +01:00
<title>Static CMS</title>
</head>
<body>
2023-04-21 16:02:58 +02:00
<script src="https://cdn.jsdelivr.net/npm/@staticcms/app@^2.0.0/dist/static-cms-app.js"></script>
<script type="module">
// imports
import {
AboutPreview,
BlogPreview,
ContestPreview,
GanztagPreview,
PagePreview,
EventPreview,
AnmeldungPreview,
HeaderPreview,
ChronikPreview,
KontaktPreview,
AnmeldeformularPreview,
ChronikIndexPreview,
AuthorPreview,
FormsPreview,
CantorpreisPreview,
ProjektwochePreview,
AbiturientenPreview,
PreviewStyles,
} from "./previews/page-previews/index.js";
import {
BooleanPreview,
DraftPreview,
CountPreview,
BodyPreview,
DatePreview,
} from "./previews/field-previews/index.js";
import {
GalleryShortcode,
ImageShortcode,
DownloadShortcode,
CardShortcode,
YoutubeShortcode,
AudioShortcode,
SliderShortcode,
} from "./shortcodes/index.js";
import { StatusPage, WikiLink } from "./links/index.js";
import Icons from "./icons.js";
// cms initialization
2023-01-10 22:23:04 +01:00
CMS.init();
2023-02-11 20:15:36 +01:00
// preview templates
2023-01-14 17:31:54 +01:00
CMS.registerPreviewTemplate("about-index", AboutPreview);
CMS.registerPreviewTemplate("blog", BlogPreview);
CMS.registerPreviewTemplate("wettbewerbe", ContestPreview);
CMS.registerPreviewTemplate("ganztagsangebote", GanztagPreview);
CMS.registerPreviewTemplate("contact-index", KontaktPreview);
CMS.registerPreviewTemplate("event-index", EventPreview);
CMS.registerPreviewTemplate("anmeldung-index", AnmeldungPreview);
CMS.registerPreviewTemplate("schulchronik", ChronikPreview);
CMS.registerPreviewTemplate("anmeldeformular", AnmeldeformularPreview);
CMS.registerPreviewTemplate("schulchronik-index", ChronikIndexPreview);
CMS.registerPreviewTemplate("author", AuthorPreview);
CMS.registerPreviewTemplate("forms", FormsPreview);
CMS.registerPreviewTemplate("cantorpreis", CantorpreisPreview);
CMS.registerPreviewTemplate("begabte", ContestPreview);
["projektwoche", "superhaufen"].forEach((page) =>
CMS.registerPreviewTemplate(page, ProjektwochePreview)
);
["abiturienten", "cantorfora"].forEach((page) =>
CMS.registerPreviewTemplate(page, AbiturientenPreview)
);
[
"blog-index",
"cantorpreis-index",
"forms-index",
"ganztagsangebote-index",
"wettbewerbe-index",
"begabte-index",
"abiturienten-index",
"projektwoche-index",
"author-index",
].forEach((page) => CMS.registerPreviewTemplate(page, HeaderPreview));
[
"abiturienten",
"cantorfora-index",
"pages",
"anmeldeformular",
"schulchronik-index",
"chronikseiten",
].forEach((page) => CMS.registerPreviewTemplate(page, PagePreview));
PreviewStyles.forEach((url) => {
CMS.registerPreviewStyle(url);
2023-02-11 20:15:36 +01:00
});
//shortcodes
CMS.registerShortcode("gallery", GalleryShortcode);
CMS.registerShortcode("image", ImageShortcode);
CMS.registerShortcode("download", DownloadShortcode);
CMS.registerShortcode("card", CardShortcode);
CMS.registerShortcode("youtube", YoutubeShortcode);
CMS.registerShortcode("audio", AudioShortcode);
CMS.registerShortcode("slider", SliderShortcode);
// links
CMS.registerAdditionalLink(StatusPage);
CMS.registerAdditionalLink(WikiLink);
// icons
Icons.forEach((i) => CMS.registerIcon(i.name, i.icon));
// field previews
CMS.registerFieldPreview("author", "active", BooleanPreview);
CMS.registerFieldPreview("author", "simplified", BooleanPreview);
CMS.registerFieldPreview("blog", "date", DatePreview);
CMS.registerFieldPreview("schulchronik", "topics", CountPreview);
["projektwoche", "superhaufen"].forEach((collection) =>
CMS.registerFieldPreview(collection, "tiles", CountPreview)
);
[
"forms",
"blog",
"cantorpreis",
"pages",
"ganztagsangebote",
"wettbewerbe",
"begabte",
"projektwoche",
"schulchronik",
"abiturienten",
"superhaufen",
"cantorfora",
"chronikseiten",
].forEach((collection) =>
2023-04-20 07:51:28 +02:00
CMS.registerFieldPreview(collection, "draft", DraftPreview)
);
["blog", "author", "chronikseiten", "pages", "cantorpreis", "begabte"].forEach(
(collection) => CMS.registerFieldPreview(collection, "body", BodyPreview)
);
[
"cantorpreis-index",
"wettbewerbe-index",
"abiturienten-index",
"pages",
"projektwoche",
"cantorfora",
"blog-index",
"about-index",
"anmeldung-index",
"contact-index",
"event-index",
"forms-index",
"ganztagsangebote-index",
"begabte-index",
"projektwoche-index",
].forEach((collection) =>
CMS.registerFieldPreview(collection, "description", BodyPreview)
);
["chronikseiten", "blog"].forEach((collection) =>
CMS.registerFieldPreview(collection, "title", BodyPreview)
);
2023-01-30 19:54:31 +01:00
</script>
2023-01-10 22:23:04 +01:00
</body>
2020-07-11 13:45:14 +02:00
</html>