gcg-website/static/schulchronik/admin/index.html
Denys Konovalov b141640a15
All checks were successful
website-dev / dev-build (push) Successful in 1m13s
Merge feat/fachbereiche into dev (#238)
Co-authored-by: Lilli Berthold <lilli.berthold@outlook.de>
Reviewed-on: #238
2023-08-04 18:11:47 +02:00

115 lines
3.7 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link
rel="stylesheet"
href="https://assets.cantorgymnasium.de/fonts/mdi/v7/css/materialdesignicons.min.css"
/>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@staticcms/app@^3.0.0/dist/main.css"
/>
<title>Chronikverwaltung</title>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/@staticcms/app@^3.0.0/dist/static-cms-app.js"></script>
<script type="module">
import config from "../../admin/config/schulchronik.js";
// imports
import {
PagePreview,
HeaderPreview,
ChronikPreview,
ChronikIndexPreview,
CantorpreisPreview,
AbiturientenPreview,
ProjektwochePreview,
PreviewStyles,
} from "../../admin/previews/page-previews/index.js";
import {
BooleanPreview,
DraftPreview,
CountPreview,
BodyPreview,
DatePreview,
} from "../../admin/previews/field-previews/index.js";
import {
GalleryShortcode,
ImageShortcode,
DownloadShortcode,
CardShortcode,
YoutubeShortcode,
AudioShortcode,
SliderShortcode,
} from "../../admin/shortcodes/index.js";
import { WikiLink } from "../../admin/links/index.js";
import Icons from "../../admin/icons.js";
// cms initialization
CMS.init({ config });
// preview templates
CMS.registerPreviewTemplate("chronikjahre", ChronikPreview);
CMS.registerPreviewTemplate("schulchronik-index", ChronikIndexPreview);
CMS.registerPreviewTemplate("cantorpreis", CantorpreisPreview);
CMS.registerPreviewTemplate("superhaufen", ProjektwochePreview);
["abiturienten", "cantorfora"].forEach((page) =>
CMS.registerPreviewTemplate(page, AbiturientenPreview)
);
["cantorpreis-index", "abiturienten-index"].forEach((page) =>
CMS.registerPreviewTemplate(page, HeaderPreview)
);
[
"abiturienten",
"cantorfora-index",
"schulchronik-index",
"chronikseiten",
].forEach((page) => CMS.registerPreviewTemplate(page, PagePreview));
PreviewStyles.forEach((url) => {
CMS.registerPreviewStyle(url);
});
//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(WikiLink);
// icons
Icons.forEach((i) => CMS.registerIcon(i.name, i.icon));
// field previews
CMS.registerFieldPreview("chronikjahre", "topics", CountPreview);
CMS.registerFieldPreview("superhaufen", "tiles", CountPreview);
[
"cantorpreis",
"chronikjahre",
"abiturienten",
"superhaufen",
"cantorfora",
"chronikseiten",
].forEach((collection) =>
CMS.registerFieldPreview(collection, "draft", DraftPreview)
);
["chronikseiten", "cantorpreis"].forEach((collection) =>
CMS.registerFieldPreview(collection, "body", BodyPreview)
);
["cantorpreis-index", "abiturienten-index", "cantorfora"].forEach(
(collection) =>
CMS.registerFieldPreview(collection, "description", BodyPreview)
);
CMS.registerFieldPreview("chronikseiten", "title", BodyPreview);
</script>
</body>
</html>