gcg-website/static/schulchronik/admin/index.html

115 lines
3.7 KiB
HTML
Raw Normal View History

2023-02-26 21:34:27 +01:00
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
2023-05-29 16:22:34 +02:00
<link
rel="stylesheet"
href="https://assets.cantorgymnasium.de/fonts/mdi/v7/css/materialdesignicons.min.css"
/>
<link
rel="stylesheet"
2023-08-03 22:21:34 +02:00
href="https://cdn.jsdelivr.net/npm/@staticcms/app@^3.0.0/dist/main.css"
2023-05-29 16:22:34 +02:00
/>
2023-02-26 21:34:27 +01:00
<title>Chronikverwaltung</title>
</head>
<body>
2023-08-03 22:21:34 +02:00
<script src="https://cdn.jsdelivr.net/npm/@staticcms/app@^3.0.0/dist/static-cms-app.js"></script>
2023-05-11 06:44:30 +02:00
<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";
2023-02-26 21:34:27 +01:00
2023-05-11 06:44:30 +02:00
// cms initialization
CMS.init({ config });
2023-02-26 21:34:27 +01:00
2023-05-11 06:44:30 +02:00
// 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)
);
2023-05-29 16:22:34 +02:00
["cantorpreis-index", "abiturienten-index"].forEach((page) =>
CMS.registerPreviewTemplate(page, HeaderPreview)
);
2023-05-11 06:44:30 +02:00
[
"abiturienten",
"cantorfora-index",
"schulchronik-index",
"chronikseiten",
].forEach((page) => CMS.registerPreviewTemplate(page, PagePreview));
PreviewStyles.forEach((url) => {
CMS.registerPreviewStyle(url);
2023-02-26 21:34:27 +01:00
});
2023-05-11 06:44:30 +02: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);
2023-02-26 21:34:27 +01:00
2023-05-11 06:44:30 +02:00
// links
CMS.registerAdditionalLink(WikiLink);
2023-02-26 21:34:27 +01:00
2023-05-11 06:44:30 +02:00
// 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)
);
2023-05-29 16:22:34 +02:00
["chronikseiten", "cantorpreis"].forEach((collection) =>
CMS.registerFieldPreview(collection, "body", BodyPreview)
2023-05-11 06:44:30 +02:00
);
2023-05-29 16:22:34 +02:00
["cantorpreis-index", "abiturienten-index", "cantorfora"].forEach(
(collection) =>
CMS.registerFieldPreview(collection, "description", BodyPreview)
2023-05-11 06:44:30 +02:00
);
CMS.registerFieldPreview("chronikseiten", "title", BodyPreview);
2023-02-26 21:34:27 +01:00
</script>
</body>
</html>