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-01-10 22:23:04 +01:00
|
|
|
<title>Static CMS</title>
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<style>
|
|
|
|
body {
|
|
|
|
font-family: sans-serif;
|
|
|
|
}
|
2023-02-08 15:49:01 +01:00
|
|
|
.icon-md {
|
|
|
|
font-size: 25px;
|
|
|
|
}
|
2023-01-10 22:23:04 +01:00
|
|
|
</style>
|
2023-02-06 23:01:12 +01:00
|
|
|
<script src="https://cdn.jsdelivr.net/npm/@staticcms/app@^1.2.7/dist/static-cms-app.js"></script>
|
2023-02-09 22:26:15 +01:00
|
|
|
<!--script src="https://cantorgymnasium.de/plugins/wordcloud/wordcloud2.min.js"></script-->
|
2023-02-11 20:15:36 +01:00
|
|
|
<script id="cms-init">
|
2023-01-10 22:23:04 +01:00
|
|
|
CMS.init();
|
2023-02-11 20:15:36 +01:00
|
|
|
</script>
|
|
|
|
<script id="icons">
|
2023-03-05 19:14:57 +01:00
|
|
|
var icons = [['settings', 'mdi mdi-cog-outline'], ['user', 'mdi mdi-fountain-pen-tip'], ['page', 'mdi mdi-file-document-outline'], ['page-add', 'mdi mdi-file-document-plus-outline'], ['document', 'mdi mdi-file-document-multiple-outline'], ['news', 'mdi mdi-newspaper'], ['award', 'mdi mdi-seal-variant'], ['group', 'mdi mdi-crowd'], ['trophy', 'mdi mdi-trophy-outline'], ['pi', 'mdi mdi-pi-box'], ['pillar', 'mdi mdi-pillar'], ['graduation-cap', 'mdi mdi-school-outline'], ['help', 'mdi mdi-lifebuoy'], ['dash', 'mdi mdi-monitor-dashboard'], ['presentation', 'mdi mdi-presentation'], ['projektwoche', 'mdi mdi-calendar-range-outline']];
|
2023-01-10 22:23:04 +01:00
|
|
|
icons.forEach(icon => {
|
2023-02-09 22:26:15 +01:00
|
|
|
CMS.registerIcon(icon[0], ({}) => { return(h('i', {className: icon[1] + " icon-md"})); });
|
2023-01-10 22:23:04 +01:00
|
|
|
});
|
2023-02-11 20:15:36 +01:00
|
|
|
</script>
|
|
|
|
<script id="status-seite">
|
2023-01-25 19:33:28 +01:00
|
|
|
const StatusPage = () => {
|
2023-04-03 14:37:04 +02:00
|
|
|
return h("iframe", {src: "https://grafana.cantorgymnasium.de/d/ni-7T-J4z/status?orgId=2&refresh=5s&kiosk", width: "100%", height: "100%"});
|
2023-01-10 22:23:04 +01:00
|
|
|
};
|
2023-02-11 20:15:36 +01:00
|
|
|
</script>
|
|
|
|
<script id="links">
|
2023-01-10 22:23:04 +01:00
|
|
|
CMS.registerAdditionalLink({
|
2023-01-25 19:33:28 +01:00
|
|
|
id: 'status',
|
|
|
|
title: 'Status',
|
|
|
|
data: StatusPage,
|
2023-01-10 22:23:04 +01:00
|
|
|
options: {
|
2023-02-08 15:49:01 +01:00
|
|
|
icon: 'dash',
|
2023-01-10 22:23:04 +01:00
|
|
|
},
|
|
|
|
});
|
2023-01-25 19:33:28 +01:00
|
|
|
CMS.registerAdditionalLink({
|
|
|
|
id: 'wiki',
|
|
|
|
title: 'GCG.Wiki',
|
|
|
|
data: 'https://wiki.cantorgymnasium.de',
|
|
|
|
options: {
|
2023-02-08 15:49:01 +01:00
|
|
|
icon: 'help',
|
2023-01-25 19:33:28 +01:00
|
|
|
},
|
2023-02-11 20:15:36 +01:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
<script>
|
2023-01-10 22:23:04 +01:00
|
|
|
CMS.registerShortcode('gallery', {
|
|
|
|
label: 'Gallery',
|
|
|
|
openTag: '{{< ',
|
|
|
|
closeTag: ' />}}',
|
|
|
|
separator: ' ',
|
|
|
|
toProps: args => {
|
|
|
|
if (args.length > 0) {
|
|
|
|
var dir = args.find(arg => arg.startsWith('dir='))?.split('=')[1].replaceAll("\"","") ?? '';
|
|
|
|
return { dir: dir };
|
|
|
|
}
|
|
|
|
return { dir: '' };
|
|
|
|
},
|
|
|
|
toArgs: ({ dir }) => {
|
|
|
|
return [`dir=\"${dir}\"`];
|
|
|
|
},
|
|
|
|
control: ({ dir, onChange }) => {
|
2023-02-09 22:26:15 +01:00
|
|
|
return h('div', {className: "row", style: { border: "1px solid #868686", borderRadius: "8px", padding: "10px" }},
|
|
|
|
h('b', {style: {width: "30%", fontFamily: "sans-serif", margin: "10px"}}, "Gallerie-Ordner: "),
|
2023-01-10 22:23:04 +01:00
|
|
|
h('input', {
|
|
|
|
key: 'control-input',
|
|
|
|
value: dir,
|
2023-02-09 22:26:15 +01:00
|
|
|
style: {
|
2023-01-10 22:23:04 +01:00
|
|
|
border: "1px solid #ced4da", borderRadius: "8px", padding: "10px", width: "80%"
|
|
|
|
},
|
|
|
|
onChange: event => {
|
|
|
|
onChange({ dir: event.target.value });
|
|
|
|
},
|
|
|
|
}));
|
|
|
|
},
|
|
|
|
preview: ({ dir }) => {
|
2023-02-09 22:26:15 +01:00
|
|
|
return h('div', {className: "row", style: { border: "1px solid #868686", borderRadius: "8px", padding: "10px", marginBottom: "5px" }},
|
|
|
|
h('b', {style: { marginRight: "5px" }}, "Gallerie-Ordner:"),
|
2023-01-10 22:23:04 +01:00
|
|
|
h('code', {}, dir));
|
|
|
|
},
|
|
|
|
});
|
|
|
|
CMS.registerShortcode('figure', {
|
|
|
|
label: 'Bild',
|
|
|
|
openTag: '{{< ',
|
|
|
|
closeTag: ' >}}',
|
|
|
|
separator: ' ',
|
|
|
|
toProps: args => {
|
|
|
|
if (args.length > 0) {
|
|
|
|
var src = args.find(arg => arg.startsWith('src='))?.split('=')[1].replaceAll("\"","") ?? '';
|
|
|
|
return { src };
|
|
|
|
}
|
|
|
|
|
|
|
|
return { dir: '' };
|
|
|
|
},
|
|
|
|
toArgs: ({ src }) => {
|
|
|
|
return [`src=\"${src}\"`];
|
|
|
|
},
|
|
|
|
control: ({ src, onChange }) => {
|
2023-02-09 22:26:15 +01:00
|
|
|
return h('div', {className: "row", style: { border: "1px solid #868686", borderRadius: "16px", padding: "10px" }},
|
|
|
|
h('b', {style: {width: "30%", fontFamily: "sans-serif", margin: "10px"}}, "Bild-Pfad:"),
|
2023-01-10 22:23:04 +01:00
|
|
|
h('input', {
|
|
|
|
key: 'control-input',
|
|
|
|
value: src,
|
2023-02-09 22:26:15 +01:00
|
|
|
style: {
|
2023-01-10 22:23:04 +01:00
|
|
|
border: "1px solid #ced4da", borderRadius: "8px", padding: "10px", width: "80%"
|
|
|
|
},
|
|
|
|
onChange: event => {
|
|
|
|
onChange({ src: event.target.value });
|
|
|
|
},
|
|
|
|
}));
|
|
|
|
},
|
|
|
|
preview: ({ src }) => {
|
2023-02-09 22:26:15 +01:00
|
|
|
return h('div', {className: "row", style: { border: "1px solid #ccc", borderRadius: "16px", padding: "10px" }},
|
|
|
|
h('b', {style: { marginRight: "5px" }}, "Gallerie-Ordner:"),
|
2023-01-10 22:23:04 +01:00
|
|
|
h('code', {}, src));
|
|
|
|
},
|
|
|
|
});
|
2023-01-14 17:31:54 +01:00
|
|
|
CMS.registerShortcode('download', {
|
|
|
|
label: 'Download-Karte',
|
|
|
|
openTag: '{{< ',
|
|
|
|
closeTag: ' >}}',
|
|
|
|
separator: ' ',
|
|
|
|
toProps: args => {
|
|
|
|
if (args.length > 0) {
|
|
|
|
var title = "";
|
|
|
|
var link = "";
|
|
|
|
var linkIndex = args.findIndex(arg => arg.startsWith('link="'));
|
|
|
|
var titleIndex = args.findIndex(arg => arg.startsWith('title="'));
|
|
|
|
if (titleIndex + 1 < linkIndex) {
|
|
|
|
title += args.find(arg => arg.startsWith('title='))?.split('=')[1].replaceAll("\"","") ?? '';
|
|
|
|
for (let i = titleIndex + 1; i < linkIndex; i++) {
|
|
|
|
title += " " + args[i].replaceAll("\"","") ;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
title = args.find(arg => arg.startsWith('title='))?.split('=')[1].replaceAll("\"","") ?? ''
|
|
|
|
}
|
|
|
|
if (linkIndex + 1 < args.length) {
|
|
|
|
link += args.find(arg => arg.startsWith('link='))?.split('=')[1].replaceAll("\"","") ?? '';
|
|
|
|
for (let i = linkIndex + 1; i < args.length; i++) {
|
|
|
|
link += " " + args[i].replaceAll("\"","");
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
link = args.find(arg => arg.startsWith('link='))?.split('=')[1].replaceAll("\"","") ?? ''
|
|
|
|
}
|
|
|
|
title.trim();
|
|
|
|
link.trim();
|
|
|
|
return { title: title, link: link };
|
|
|
|
}
|
|
|
|
|
|
|
|
return { title: '', link: '' };
|
|
|
|
},
|
|
|
|
toArgs: ({ title, link }) => {
|
|
|
|
return [`title=\"${title}\"`, `link=\"${link}\"`];
|
|
|
|
},
|
|
|
|
control: ({ title, link, onChange }) => {
|
2023-02-09 22:26:15 +01:00
|
|
|
return h('div', {className: "row", style: { border: "1px solid #868686", borderRadius: "8px", padding: "10px" }},
|
|
|
|
h('b', {style: {width: "30%", fontFamily: "sans-serif", margin: "10px"}}, "Download-Karte:"),
|
2023-01-14 17:31:54 +01:00
|
|
|
h('input', {
|
|
|
|
key: 'control-input',
|
|
|
|
value: title,
|
2023-02-09 22:26:15 +01:00
|
|
|
style: {
|
2023-01-14 17:31:54 +01:00
|
|
|
border: "1px solid #ced4da", borderRadius: "8px", padding: "10px", width: "35%", marginLeft: "5px", marginRight: "5px"
|
|
|
|
},
|
|
|
|
onChange: event => {
|
|
|
|
onChange({ title: event.target.value, link: link });
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
h('input', {
|
|
|
|
key: 'control-input',
|
|
|
|
value: link,
|
2023-02-09 22:26:15 +01:00
|
|
|
style: {
|
2023-01-14 17:31:54 +01:00
|
|
|
border: "1px solid #ced4da", borderRadius: "8px", padding: "10px", width: "35%", marginLeft: "5px", marginRight: "5px"
|
|
|
|
},
|
|
|
|
onChange: event => {
|
|
|
|
onChange({ title: title, link: event.target.value });
|
|
|
|
},
|
|
|
|
})
|
|
|
|
);
|
|
|
|
},
|
|
|
|
preview: ({ title, link }) => {
|
2023-02-09 22:26:15 +01:00
|
|
|
return h('div', {className: "container mb-0"},
|
|
|
|
h('div', {className: "card border-primary rounded-0 hover-shadow mb-5"},
|
|
|
|
h('div', {className: "card-body mb-0"},
|
|
|
|
h('h4', {className: "card-title"},
|
|
|
|
h('a', {className: "text-decoration-none", href: link}, title),
|
2023-01-14 17:31:54 +01:00
|
|
|
),
|
2023-02-09 22:26:15 +01:00
|
|
|
h('a', {className: "mb-0 btn btn-primary btn-sm text-decoration-none", href: link}, "Download")
|
2023-01-14 17:31:54 +01:00
|
|
|
)))},
|
|
|
|
});
|
2023-01-10 22:23:04 +01:00
|
|
|
CMS.registerShortcode('card', {
|
|
|
|
label: 'Link-Karte',
|
|
|
|
openTag: '{{< ',
|
|
|
|
closeTag: ' >}}',
|
|
|
|
separator: ' ',
|
|
|
|
toProps: args => {
|
|
|
|
if (args.length > 0) {
|
|
|
|
var title = "";
|
|
|
|
var link = "";
|
|
|
|
var linkIndex = args.findIndex(arg => arg.startsWith('link="'));
|
|
|
|
var titleIndex = args.findIndex(arg => arg.startsWith('title="'));
|
|
|
|
if (titleIndex + 1 < linkIndex) {
|
|
|
|
title += args.find(arg => arg.startsWith('title='))?.split('=')[1].replaceAll("\"","") ?? '';
|
|
|
|
for (let i = titleIndex + 1; i < linkIndex; i++) {
|
|
|
|
title += " " + args[i].replaceAll("\"","") ;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
title = args.find(arg => arg.startsWith('title='))?.split('=')[1].replaceAll("\"","") ?? ''
|
|
|
|
}
|
|
|
|
if (linkIndex + 1 < args.length) {
|
|
|
|
link += args.find(arg => arg.startsWith('link='))?.split('=')[1].replaceAll("\"","") ?? '';
|
|
|
|
for (let i = linkIndex + 1; i < args.length; i++) {
|
|
|
|
link += " " + args[i].replaceAll("\"","");
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
link = args.find(arg => arg.startsWith('link='))?.split('=')[1].replaceAll("\"","") ?? ''
|
|
|
|
}
|
|
|
|
title.trim();
|
|
|
|
link.trim();
|
|
|
|
return { title: title, link: link };
|
|
|
|
}
|
2022-06-05 14:04:16 +02:00
|
|
|
|
2023-01-10 22:23:04 +01:00
|
|
|
return { title: '', link: '' };
|
2020-10-02 15:25:35 +02:00
|
|
|
},
|
2023-01-10 22:23:04 +01:00
|
|
|
toArgs: ({ title, link }) => {
|
|
|
|
return [`title=\"${title}\"`, `link=\"${link}\"`];
|
|
|
|
},
|
|
|
|
control: ({ title, link, onChange }) => {
|
2023-02-09 22:26:15 +01:00
|
|
|
return h('div', {className: "row", style: { border: "1px solid #868686", borderRadius: "8px", padding: "10px" }},
|
|
|
|
h('b', {style: {width: "30%", fontFamily: "sans-serif", margin: "10px"}}, "Link-Karte:"),
|
2023-01-10 22:23:04 +01:00
|
|
|
h('input', {
|
|
|
|
key: 'control-input',
|
|
|
|
value: title,
|
2023-02-09 22:26:15 +01:00
|
|
|
style: {
|
2023-01-10 22:23:04 +01:00
|
|
|
border: "1px solid #ced4da", borderRadius: "8px", padding: "10px", width: "40%", marginLeft: "5px", marginRight: "5px"
|
|
|
|
},
|
|
|
|
onChange: event => {
|
|
|
|
onChange({ title: event.target.value, link: link });
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
h('input', {
|
|
|
|
key: 'control-input',
|
|
|
|
value: link,
|
2023-02-09 22:26:15 +01:00
|
|
|
style: {
|
2023-01-10 22:23:04 +01:00
|
|
|
border: "1px solid #ced4da", borderRadius: "8px", padding: "10px", width: "40%", marginLeft: "5px", marginRight: "5px"
|
|
|
|
},
|
|
|
|
onChange: event => {
|
|
|
|
onChange({ title: title, link: event.target.value });
|
|
|
|
},
|
|
|
|
})
|
|
|
|
);
|
|
|
|
},
|
|
|
|
preview: ({ title, link }) => {
|
2023-02-09 22:26:15 +01:00
|
|
|
return h('div', {className: "container mb-0"},
|
|
|
|
h('div', {className: "card border-primary rounded-0 hover-shadow mb-5"},
|
|
|
|
h('div', {className: "card-body mb-0"},
|
|
|
|
h('h4', {className: "card-title"},
|
|
|
|
h('a', {className: "text-decoration-none", href: link}, title),
|
2021-10-10 20:56:10 +02:00
|
|
|
),
|
2023-02-09 22:26:15 +01:00
|
|
|
h('a', {className: "mb-0 btn btn-primary btn-sm text-decoration-none", href: link}, "Mehr anzeigen")
|
2023-01-10 22:23:04 +01:00
|
|
|
)))},
|
|
|
|
});
|
|
|
|
CMS.registerShortcode('youtube', {
|
|
|
|
label: 'YouTube-Video',
|
|
|
|
openTag: '{{< ',
|
|
|
|
closeTag: ' >}}',
|
|
|
|
separator: ' ',
|
|
|
|
toProps: args => {
|
|
|
|
if (args.length > 0) {
|
|
|
|
return { src: args[0] };
|
|
|
|
}
|
|
|
|
|
|
|
|
return { src: '' };
|
|
|
|
},
|
|
|
|
toArgs: ({ src }) => { return [src] },
|
|
|
|
control: ({ src, onChange }) => {
|
2023-02-09 22:26:15 +01:00
|
|
|
return h('div', {className: "row", style: { border: "1px solid #868686", borderRadius: "8px", padding: "10px" }},
|
|
|
|
h('b', {style: {fontFamily: "sans-serif", margin: "10px"}}, "YoutTube-Video:"),
|
2023-01-10 22:23:04 +01:00
|
|
|
h('input', {
|
|
|
|
key: 'control-input',
|
|
|
|
value: src,
|
2023-02-09 22:26:15 +01:00
|
|
|
style: {
|
2023-01-10 22:23:04 +01:00
|
|
|
border: "1px solid #ced4da", borderRadius: "8px", padding: "10px", width: "80%"
|
|
|
|
},
|
|
|
|
onChange: event => {
|
|
|
|
onChange({ src: event.target.value });
|
|
|
|
},
|
|
|
|
}),
|
2023-02-09 22:26:15 +01:00
|
|
|
h('div', {className: "row", style: {"marginTop": "10px"}},
|
2023-01-10 22:23:04 +01:00
|
|
|
h(
|
|
|
|
'iframe',
|
|
|
|
{
|
|
|
|
key: 'control-preview',
|
|
|
|
width: '100%',
|
|
|
|
height: '360',
|
|
|
|
src: `https://piped.kavin.rocks/embed/${src}`,
|
|
|
|
style: { borderRadius: "8px" }
|
|
|
|
},
|
|
|
|
'',
|
|
|
|
)
|
|
|
|
));
|
|
|
|
},
|
|
|
|
preview: ({ src }) => {
|
|
|
|
return h(
|
|
|
|
'span',
|
|
|
|
{},
|
|
|
|
h(
|
|
|
|
'iframe',
|
|
|
|
{
|
|
|
|
width: '420',
|
|
|
|
height: '315',
|
|
|
|
src: `https://piped.kavin.rocks/embed/${src}`,
|
|
|
|
},
|
|
|
|
'',
|
|
|
|
),
|
|
|
|
);
|
|
|
|
},
|
|
|
|
});
|
|
|
|
</script>
|
2023-02-11 20:15:36 +01:00
|
|
|
<script id="preview-styles">
|
2023-03-26 17:19:37 +02:00
|
|
|
CMS.registerPreviewStyle("https://assets.cantorgymnasium.de/bootstrap/v4/bootstrap.min.css");
|
|
|
|
CMS.registerPreviewStyle("https://assets.cantorgymnasium.de/fonts/fira/fira.css");
|
|
|
|
CMS.registerPreviewStyle("https://assets.cantorgymnasium.de/fonts/mdi/v7/css/materialdesignicons.min.css");
|
2023-01-10 22:23:04 +01:00
|
|
|
CMS.registerPreviewStyle("https://cantorgymnasium.de/scss/style.css");
|
|
|
|
</script>
|
2023-02-09 19:58:09 +01:00
|
|
|
<!--script>
|
2023-01-10 22:23:04 +01:00
|
|
|
var ChronikPreview = ({widgetFor, widgetsFor, entry, document, window }) => {
|
|
|
|
const divStyle = {
|
2023-01-14 17:31:54 +01:00
|
|
|
backgroundImage: 'url("/media/backgrounds/page-title.webp"),url("/media/backgrounds/page-title.webp")',
|
2023-01-10 22:23:04 +01:00
|
|
|
};
|
|
|
|
return h('div', {"id": "sc-root"},
|
2023-02-09 22:26:15 +01:00
|
|
|
h('section', {className: "page-title-section overlay", style: divStyle},
|
|
|
|
h('div', {className: "container"},
|
|
|
|
h('div', {className: "col-md-8"},
|
|
|
|
h('ul', {className: "list-inline"},
|
|
|
|
h('li', {className: "list-inline-item h2"},
|
|
|
|
h('a', {className: "text-primary font-secondary", href: ""}, "Schulchronik")),
|
|
|
|
h('li', {className: "list-inline-item h2"},
|
|
|
|
h("i", {className: "mdi mdi-chevron-double-right text-white"})),
|
|
|
|
h('li', {className: "list-inline-item text-white h2 font-secondary"}, entry.data.title)
|
2023-01-10 22:23:04 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
2023-02-09 22:26:15 +01:00
|
|
|
h('section', {className: "section-sm"},
|
|
|
|
h('div', {className: "container"},
|
|
|
|
h('div', {className: "row"},
|
|
|
|
h('div', {className: "col-12 mb-4 content"},
|
2023-01-10 22:23:04 +01:00
|
|
|
widgetsFor('topics').map(function(i, index) {
|
2023-02-09 22:26:15 +01:00
|
|
|
return h('div', {"id": i.data.id, className: "modal"},
|
|
|
|
h('div', {className: "modal-dialog modal-lg", "role": "document"},
|
|
|
|
h('div', {className: "modal-content"},
|
|
|
|
h('div', {className: "modal-header"},
|
|
|
|
h('h5', {className: "modal-title"}, i.data.title),
|
|
|
|
h('button', {className: "close", type: "button", "dataDismiss": "modal", "ariaLabel": "Close"},
|
2023-01-10 22:23:04 +01:00
|
|
|
h('span', {"ariaHidden": "true"}, '\u{00d7}')
|
|
|
|
)
|
|
|
|
),
|
2023-02-09 22:26:15 +01:00
|
|
|
h('div', {className: "modal-body"},
|
|
|
|
h('div', {className: "content"}, i.content)
|
2023-01-10 22:23:04 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}),
|
2023-02-09 22:26:15 +01:00
|
|
|
entry.data.pretext != "" && entry.data.pretext != null ? h('div', {"id": "pretext", className: "modal"},
|
|
|
|
h('div', {className: "modal-dialog modal-lg", "role": "document"},
|
|
|
|
h('div', {className: "modal-content"},
|
|
|
|
h('div', {className: "modal-header"},
|
|
|
|
h('h5', {className: "modal-title"}, entry.data.title),
|
|
|
|
h('button', {className: "close", type: "button", "dataDismiss": "modal", "ariaLabel": "Close"},
|
2023-01-10 22:23:04 +01:00
|
|
|
h('span', {"ariaHidden": "true"}, '\u{00d7}')
|
|
|
|
)
|
|
|
|
),
|
2023-02-09 22:26:15 +01:00
|
|
|
h('div', {className: "modal-body"},
|
|
|
|
h('div', {className: "content"}, widgetFor('pretext'))
|
2023-01-10 22:23:04 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
) : null,
|
|
|
|
h('div', {"id": "wc-canvas"}),
|
|
|
|
() => {
|
|
|
|
var topics = [[entry.data.title, 100, "pretext"]];
|
|
|
|
widgetsFor('topics').map(function(i, index) {
|
|
|
|
topics.push([i.data.title, 40, i.data.id]);
|
|
|
|
});
|
|
|
|
var script = document.createElement('script');
|
|
|
|
var div = document.getElementById('sc-root');
|
|
|
|
div.appendChild(script);
|
|
|
|
WordCloud(
|
|
|
|
document.getElementById('wc-canvas'),
|
|
|
|
{
|
|
|
|
click: function (item) {
|
|
|
|
if (item[1] != 100 || (item[1] == 100 && item[2] == "pretext")) {
|
|
|
|
$('#' + item[2]).modal('show');
|
|
|
|
}
|
|
|
|
},
|
|
|
|
color: function (word, weight) {
|
|
|
|
return (weight === 100) ? '#ffbc3b' : '#1a1a37';
|
|
|
|
},
|
|
|
|
fontFamily: 'Fira Sans, serif',
|
|
|
|
fontWeight: 800,
|
|
|
|
list: topics,
|
|
|
|
shrinkToFit: true,
|
|
|
|
gridSize: 25,
|
|
|
|
rotateRatio: 0,
|
|
|
|
}
|
|
|
|
);
|
|
|
|
},
|
|
|
|
widgetFor('body')
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
};
|
2021-10-10 20:56:10 +02:00
|
|
|
|
2023-01-10 22:23:04 +01:00
|
|
|
CMS.registerPreviewTemplate("schulchronik", ChronikPreview);
|
2022-03-27 15:38:20 +02:00
|
|
|
|
2023-02-09 19:58:09 +01:00
|
|
|
</script-->
|
2023-01-10 22:23:04 +01:00
|
|
|
<script>
|
2023-02-11 20:15:36 +01:00
|
|
|
var PostPreviewContent = ({widgetFor, entry}) => {
|
2023-01-10 22:23:04 +01:00
|
|
|
const divStyle = {
|
2023-01-14 17:31:54 +01:00
|
|
|
backgroundImage: 'url("/media/backgrounds/page-title.webp"),url("/media/backgrounds/page-title.webp")',
|
2023-01-10 22:23:04 +01:00
|
|
|
};
|
|
|
|
return h('div', {},
|
2023-02-09 22:26:15 +01:00
|
|
|
h('section', {className: "page-title-section overlay", style: divStyle},
|
|
|
|
h('div', {className: "container"},
|
|
|
|
h('div', {className: "col-md-8"},
|
|
|
|
h('ul', {className: "list-inline"},
|
|
|
|
h('li', {className: "list-inline-item h2"},
|
|
|
|
h('a', {className: "text-primary font-secondary", href: ""}, "Startseite")),
|
|
|
|
h('li', {className: "list-inline-item h2"},
|
|
|
|
h("i", {className: "mdi mdi-chevron-double-right text-white"})),
|
|
|
|
h('li', {className: "list-inline-item text-white h2 font-secondary"}, entry.data.title)
|
2023-01-10 22:23:04 +01:00
|
|
|
),
|
2023-02-11 20:15:36 +01:00
|
|
|
h('p', {className: "text-lighten"}, entry.data.description)))),
|
2023-02-09 22:26:15 +01:00
|
|
|
h('section', {className: "section-sm"},
|
|
|
|
h('div', {className: "container"},
|
|
|
|
h('div', {className: "row"},
|
|
|
|
h('div', {className: "col-12 mb-4"},
|
2023-02-11 20:15:36 +01:00
|
|
|
h('div', {className: "content"}, widgetFor('body')))))));
|
2023-01-10 22:23:04 +01:00
|
|
|
};
|
2023-02-11 20:15:36 +01:00
|
|
|
["abiturienten", "cantorfora", "contact-index", "pages"].forEach(page => {
|
|
|
|
CMS.registerPreviewTemplate(page, PostPreviewContent);
|
|
|
|
});
|
2023-01-10 22:23:04 +01:00
|
|
|
</script>
|
|
|
|
<script>
|
|
|
|
var AnmeldungPreviewContent = ({widgetsFor, widgetFor, entry}) => {
|
|
|
|
const divStyle = {
|
2023-01-14 17:31:54 +01:00
|
|
|
backgroundImage: 'url("/media/backgrounds/page-title.webp"),url("/media/backgrounds/page-title.webp")',
|
2023-01-10 22:23:04 +01:00
|
|
|
};
|
|
|
|
return h('div', {},
|
2023-02-09 22:26:15 +01:00
|
|
|
h('section', {className: "page-title-section overlay", style: divStyle},
|
|
|
|
h('div', {className: "container"},
|
|
|
|
h('div', {className: "col-md-8"},
|
|
|
|
h('ul', {className: "list-inline"},
|
|
|
|
h('li', {className: "list-inline-item h2"},
|
|
|
|
h('a', {className: "text-primary font-secondary", href: ""}, "Startseite")),
|
|
|
|
h('li', {className: "list-inline-item h2"},
|
|
|
|
h("i", {className: "mdi mdi-chevron-double-right text-white"})),
|
2023-02-11 20:15:36 +01:00
|
|
|
h('li', {className: "list-inline-item text-white h2 font-secondary"}, entry.data.title)),
|
|
|
|
h('p', {className: "text-lighten"}, entry.data.description)))),
|
2023-02-09 22:26:15 +01:00
|
|
|
h('section', {className: "section-sm"},
|
|
|
|
h('div', {className: "container"},
|
|
|
|
h('div', {className: "row mb-5"},
|
|
|
|
h('div', {className: "col-md-6 content"},
|
2023-02-11 20:15:36 +01:00
|
|
|
widgetFor('body'))),
|
2023-02-09 22:26:15 +01:00
|
|
|
h('div', {className: "row"},
|
2023-01-10 22:23:04 +01:00
|
|
|
widgetsFor('elements').map(function(element, index) {
|
2023-02-09 22:26:15 +01:00
|
|
|
return h('div', {className: "col-lg-4 col-sm-6 mb-4"},
|
|
|
|
h('div', {className: "card rounded-0 hover-shadow border-top-0 border-left-0 border-right-0"},
|
|
|
|
h('div', {className: "card-body"},
|
2023-02-11 20:15:36 +01:00
|
|
|
h('h4', {className: "card-title mb-3"}, element.data.title),
|
|
|
|
h('div', {className: "content"}, element.widgets.content))));
|
|
|
|
})))));
|
2023-01-10 22:23:04 +01:00
|
|
|
};
|
|
|
|
CMS.registerPreviewTemplate("anmeldung-index", AnmeldungPreviewContent);
|
|
|
|
</script>
|
|
|
|
<script>
|
|
|
|
var EventPreview = ({widgetsFor, entry}) => {
|
|
|
|
const divStyle = {
|
2023-01-14 17:31:54 +01:00
|
|
|
backgroundImage: 'url("/media/backgrounds/page-title.webp"),url("/media/backgrounds/page-title.webp")',
|
2023-01-10 22:23:04 +01:00
|
|
|
};
|
|
|
|
return h('div', {},
|
2023-02-09 22:26:15 +01:00
|
|
|
h('section', {className: "page-title-section overlay", style: divStyle},
|
|
|
|
h('div', {className: "row"},
|
|
|
|
h('div', {className: "container"},
|
|
|
|
h('div', {className: "col-md-8"},
|
|
|
|
h('ul', {className: "list-inline"},
|
|
|
|
h('li', {className: "list-inline-item h2"},
|
2023-02-11 20:15:36 +01:00
|
|
|
h('a', {className: "text-primary font-secondary", href: ""}, "Startseite")),
|
2023-02-09 22:26:15 +01:00
|
|
|
h('li', {className: "list-inline-item h2"},
|
2023-02-11 20:15:36 +01:00
|
|
|
h("i", {className: "mdi mdi-chevron-double-right text-white"})),
|
|
|
|
h('li', {className: "list-inline-item text-white h2 font-secondary"}, entry.data.title)),
|
|
|
|
h('p', {className: "text-lighten"}, entry.data.description))))),
|
2023-02-09 22:26:15 +01:00
|
|
|
h('section', {className: "section"},
|
|
|
|
h('div', {className: "container"},
|
|
|
|
h('div', {className: "row"},
|
|
|
|
h('div', {className: "col-12 "},
|
|
|
|
h('ul', {className: "list-unstyled"},
|
2023-01-10 22:23:04 +01:00
|
|
|
widgetsFor('events').map(function(event, index) {
|
2023-02-09 22:26:15 +01:00
|
|
|
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 termin-tc"}, event.data.date != null && event.data.date != "" ?
|
|
|
|
h('span', {className: "h2 d-block"}, Intl.DateTimeFormat('de-De', { day: 'numeric'}).format(new Date(event.data.date))) : "",
|
|
|
|
h('span', {className: "d-block"}, event.data.date != null && event.data.date != "" ? Intl.DateTimeFormat('de-De', { month: 'short', year: 'numeric' }).format(new Date(event.data.date)) : ""),
|
2023-02-11 20:15:36 +01:00
|
|
|
event.data.enddate != null && event.data.enddate != "" ? [h('br'), Intl.DateTimeFormat('de-De', { day: 'numeric', month: 'short', year: 'numeric'}).format(new Date(event.data.date))] : null),
|
2023-02-09 22:26:15 +01:00
|
|
|
h('div', {className: "d-md-table-cell px-4 vertical-align-middle mb-4 mb-md-0 p-2"},
|
2023-02-11 20:15:36 +01:00
|
|
|
h('p', {className: "h4 mb-0 d-block"}, event.data.title)),
|
2023-02-09 22:26:15 +01:00
|
|
|
event.data.location != null && event.data.location != "" ?
|
|
|
|
h('div', {className: "d-md-table-cell text-right pr-0 pr-md-4 p-2 vertical-align-middle"},
|
2023-01-10 22:23:04 +01:00
|
|
|
h('p', {},
|
2023-02-11 20:15:36 +01:00
|
|
|
h('i', {className: "mdi mdi-map-marker-radius-outline icon-s text-primary mr-2"}), event.data.location)) : null);
|
|
|
|
})))))));
|
2023-01-10 22:23:04 +01:00
|
|
|
};
|
|
|
|
CMS.registerPreviewTemplate("event-index", EventPreview);
|
|
|
|
</script>
|
|
|
|
<script>
|
2023-02-11 20:15:36 +01:00
|
|
|
var PagePreview = ({widgetFor, entry}) => {
|
2023-01-10 22:23:04 +01:00
|
|
|
const divStyle = {
|
2023-01-14 17:31:54 +01:00
|
|
|
backgroundImage: 'url("/media/backgrounds/page-title.webp"),url("/media/backgrounds/page-title.webp")',
|
2023-01-10 22:23:04 +01:00
|
|
|
};
|
|
|
|
return h('div', {},
|
2023-02-09 22:26:15 +01:00
|
|
|
h('section', {className: "page-title-section overlay", style: divStyle},
|
|
|
|
h('div', {className: "row"},
|
|
|
|
h('div', {className: "container"},
|
|
|
|
h('div', {className: "col-md-8"},
|
|
|
|
h('ul', {className: "list-inline"},
|
|
|
|
h('li', {className: "list-inline-item h2"},
|
2023-02-11 20:15:36 +01:00
|
|
|
h('a', {className: "text-primary font-secondary", href: ""}, "Startseite")),
|
2023-02-09 22:26:15 +01:00
|
|
|
h('li', {className: "list-inline-item h2"},
|
2023-02-11 20:15:36 +01:00
|
|
|
h("i", {className: "mdi mdi-chevron-double-right text-white"})),
|
|
|
|
h('li', {className: "list-inline-item text-white h2 font-secondary"}, entry.data.title)),
|
|
|
|
h('p', {className: "text-lighten"}, entry.data.description))))));
|
2023-01-10 22:23:04 +01:00
|
|
|
};
|
2023-02-11 20:15:36 +01:00
|
|
|
|
|
|
|
["blog-index", "cantorpreis-index", "forms-index", "ganztagsangebote-index", "wettbewerbe-index", "begabte-index"].forEach(page => {
|
|
|
|
CMS.registerPreviewTemplate(page, PagePreview);
|
|
|
|
});
|
2023-01-10 22:23:04 +01:00
|
|
|
</script>
|
|
|
|
<script>
|
2023-02-09 22:26:15 +01:00
|
|
|
var PagePreviewImage = ({ widgetFor, widgetsFor, getAsset, entry }) => {
|
2023-01-10 22:23:04 +01:00
|
|
|
const [imageUrl, setImageUrl] = useState('');
|
|
|
|
const image = useMemo(() => entry.data.image, [entry.data.image]);
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
let alive = true;
|
2022-03-27 15:38:20 +02:00
|
|
|
|
2023-01-10 22:23:04 +01:00
|
|
|
const loadImage = async () => {
|
|
|
|
const imageAsset = await getAsset(image);
|
|
|
|
if (alive) {
|
|
|
|
setImageUrl(imageAsset.toString());
|
|
|
|
}
|
|
|
|
};
|
2022-03-27 15:38:20 +02:00
|
|
|
|
2023-01-10 22:23:04 +01:00
|
|
|
loadImage();
|
|
|
|
|
|
|
|
return () => {
|
|
|
|
alive = false;
|
|
|
|
};
|
|
|
|
}, [image]);
|
|
|
|
|
|
|
|
const divStyle = {
|
2023-01-14 17:31:54 +01:00
|
|
|
backgroundImage: 'url("/media/backgrounds/page-title.webp"),url("/media/backgrounds/page-title.webp")',
|
2023-01-10 22:23:04 +01:00
|
|
|
};
|
|
|
|
return h('div', {},
|
2023-02-09 22:26:15 +01:00
|
|
|
h('section', {className: "page-title-section overlay", style: divStyle},
|
|
|
|
h('div', {className: "row"},
|
|
|
|
h('div', {className: "container"},
|
|
|
|
h('div', {className: "col-md-8"},
|
|
|
|
h('ul', {className: "list-inline"},
|
|
|
|
h('li', {className: "list-inline-item h2"},
|
|
|
|
h('a', {className: "text-primary font-secondary", href: ""}, "Startseite")
|
2023-01-10 22:23:04 +01:00
|
|
|
),
|
2023-02-09 22:26:15 +01:00
|
|
|
h('li', {className: "list-inline-item h2"},
|
|
|
|
h("i", {className: "mdi mdi-chevron-double-right text-white"})
|
2023-01-10 22:23:04 +01:00
|
|
|
),
|
2023-02-09 22:26:15 +01:00
|
|
|
h('li', {className: "list-inline-item text-white h2 font-secondary"}, entry.data.title
|
2023-01-10 22:23:04 +01:00
|
|
|
)
|
|
|
|
),
|
2023-02-09 22:26:15 +01:00
|
|
|
h('p', {className: "text-lighten"}, entry.data.description
|
2023-01-10 22:23:04 +01:00
|
|
|
))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
2023-02-09 22:26:15 +01:00
|
|
|
h('section', {className: "section-sm"},
|
|
|
|
h('div', {className: "container"},
|
|
|
|
h('div', {className: "row"},
|
|
|
|
h('div', {className: "col-12 mb-4"},
|
|
|
|
h('img', {className: "img-fluid w-100 mb-4", src: imageUrl}),
|
|
|
|
),
|
|
|
|
h('div', {className: "col-12"},
|
|
|
|
h('ul', {className: "list-inline"},
|
|
|
|
h('li', {className: "list-inline-item mr-4 mb-3 mb-md-0 text-light"},
|
|
|
|
h('span', {className: "font-weight-bold mr-2"}, "Geschrieben von:"),
|
|
|
|
entry.data.author
|
|
|
|
),
|
|
|
|
h('li', { className: "list-inline-item mr-4 mb-3 mb-md-0 text-light" },
|
2023-02-23 16:26:56 +01:00
|
|
|
h('span', { className: "font-weight-bold mr-2"}, "Datum:"), entry.data.date ?
|
|
|
|
Intl.DateTimeFormat('de-De', { day: 'numeric', month: 'short', year: 'numeric'}).format(new Date(entry.data.date)) : ""
|
2023-02-09 22:26:15 +01:00
|
|
|
),
|
|
|
|
h('li', { className: "list-inline-item mr-4 mb-3 mb-md-0 text-light" },
|
|
|
|
h('span', { className: "font-weight-bold mr-2"}, "Kategorie:"),
|
2023-02-11 20:15:36 +01:00
|
|
|
entry.data.categories != null ? entry.data.categories.map((category, index) => {
|
2023-02-09 22:26:15 +01:00
|
|
|
var text = (index != 0 ? ", " : "") + category;
|
|
|
|
return text;
|
2023-02-11 20:15:36 +01:00
|
|
|
}) : ""
|
2023-02-09 22:26:15 +01:00
|
|
|
),
|
|
|
|
)
|
|
|
|
),
|
|
|
|
h('div', { className: "col-12 my-4"},
|
|
|
|
h('div', {className: "border-bottom"})
|
|
|
|
),
|
|
|
|
h('div', {className: "col-12 mb-5 content"},
|
2023-01-30 20:30:00 +01:00
|
|
|
widgetFor('body')
|
2023-02-09 22:26:15 +01:00
|
|
|
)
|
2023-01-10 22:23:04 +01:00
|
|
|
)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
);
|
|
|
|
};
|
|
|
|
CMS.registerPreviewTemplate("blog", PagePreviewImage);
|
|
|
|
</script>
|
2023-02-11 20:15:36 +01:00
|
|
|
<script>
|
|
|
|
var GTAPreview = ({ widgetFor, widgetsFor, getAsset, entry }) => {
|
|
|
|
const [imageUrl, setImageUrl] = useState('');
|
|
|
|
const image = useMemo(() => entry.data.image, [entry.data.image]);
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
let alive = true;
|
|
|
|
|
|
|
|
const loadImage = async () => {
|
|
|
|
const imageAsset = await getAsset(image);
|
|
|
|
if (alive) {
|
|
|
|
setImageUrl(imageAsset.toString());
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
loadImage();
|
|
|
|
|
|
|
|
return () => {
|
|
|
|
alive = false;
|
|
|
|
};
|
|
|
|
}, [image]);
|
|
|
|
|
|
|
|
const divStyle = {
|
|
|
|
backgroundImage: 'url("/media/backgrounds/page-title.webp"),url("/media/backgrounds/page-title.webp")',
|
|
|
|
};
|
|
|
|
return h('div', {},
|
|
|
|
h('section', {className: "page-title-section overlay", style: divStyle},
|
|
|
|
h('div', {className: "row"},
|
|
|
|
h('div', {className: "container"},
|
|
|
|
h('div', {className: "col-md-8"},
|
|
|
|
h('ul', {className: "list-inline"},
|
|
|
|
h('li', {className: "list-inline-item h2"},
|
|
|
|
h('a', {className: "text-primary font-secondary", href: ""}, "Startseite")
|
|
|
|
),
|
|
|
|
h('li', {className: "list-inline-item h2"},
|
|
|
|
h("i", {className: "mdi mdi-chevron-double-right text-white"})
|
|
|
|
),
|
|
|
|
h('li', {className: "list-inline-item text-white h2 font-secondary"}, entry.data.title
|
|
|
|
)
|
|
|
|
),
|
|
|
|
h('p', {className: "text-lighten"}, entry.data.description
|
|
|
|
))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
h('section', {className: "section-sm"},
|
|
|
|
h('div', {className: "container"},
|
|
|
|
h('div', {className: "row"},
|
|
|
|
h('div', {className: "col-12 mb-4"},
|
|
|
|
h('img', {className: "img-fluid w-100 mb-4", src: imageUrl}),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
h('div', {}, h('h2', {}, entry.data.title)
|
|
|
|
),
|
|
|
|
h('div', {className: "row align-items-center mb-5"},
|
|
|
|
h('div', {className: "col-xl-8 order-sm-3 order-xl-2 col-12 order-2"},
|
|
|
|
h('ul', {className: "list-inline"},
|
|
|
|
h('li', {className: "list-inline-item mr-4 mb-3 mb-sm-0"},
|
|
|
|
h('div', {className: "d-flex align-items-center"},
|
|
|
|
h('i', {className: "mdi mdi-calendar-today-outline text-primary icon-md mr-2"}),
|
|
|
|
h('div', {className: "text-left"},
|
|
|
|
h('h6', {className: "mb-0"}, "Zeit"),
|
|
|
|
h('p', {className: "mb-0"}, entry.data.weekly)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
h('li', { className: "list-inline-item mr-4 mb-3 mb-sm-0" },
|
|
|
|
h('div', {className: "d-flex align-items-center"},
|
|
|
|
h('i', {className: "mdi mdi-timer-sand text-primary icon-md mr-2"}),
|
|
|
|
h('div', {className: "text-left"},
|
|
|
|
h('h6', {className: "mb-0"}, "Dauer"),
|
|
|
|
h('p', {className: "mb-0"}, entry.data.duration)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
h('li', { className: "list-inline-item mr-4 mb-3 mb-sm-0" },
|
|
|
|
h('div', {className: "d-flex align-items-center"},
|
|
|
|
h('i', {className: "mdi mdi-crowd text-primary icon-md mr-2"}),
|
|
|
|
h('div', {className: "text-left"},
|
|
|
|
h('h6', {className: "mb-0"}, "Klassen(n)"),
|
|
|
|
h('p', {className: "mb-0"}, entry.data.class)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
h('li', { className: "list-inline-item mr-4 mb-3 mb-sm-0" },
|
|
|
|
h('div', {className: "d-flex align-items-center"},
|
|
|
|
h('i', {className: "mdi mdi-map-marker-radius-outline text-primary icon-md mr-2"}),
|
|
|
|
h('div', {className: "text-left"},
|
|
|
|
h('h6', {className: "mb-0"}, "Raum"),
|
|
|
|
h('p', {className: "mb-0"}, entry.data.room)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
)
|
|
|
|
),
|
|
|
|
h('div', { className: "col-12 mt-4 order-4"},
|
|
|
|
h('div', {className: "border-bottom border-primary"})
|
|
|
|
),
|
|
|
|
),
|
|
|
|
h('div', {className: "row"},
|
|
|
|
h('div', {className: "col-12 mb-5 content"},
|
|
|
|
widgetFor('body')
|
|
|
|
))
|
|
|
|
),
|
|
|
|
));
|
|
|
|
};
|
|
|
|
CMS.registerPreviewTemplate("ganztagsangebote", GTAPreview);
|
|
|
|
</script>
|
|
|
|
<script>
|
|
|
|
var ContestPreview = ({ widgetFor, widgetsFor, getAsset, entry }) => {
|
|
|
|
const [imageUrl, setImageUrl] = useState('');
|
|
|
|
const image = useMemo(() => entry.data.image, [entry.data.image]);
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
let alive = true;
|
|
|
|
|
|
|
|
const loadImage = async () => {
|
|
|
|
const imageAsset = await getAsset(image);
|
|
|
|
if (alive) {
|
|
|
|
setImageUrl(imageAsset.toString());
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
loadImage();
|
|
|
|
|
|
|
|
return () => {
|
|
|
|
alive = false;
|
|
|
|
};
|
|
|
|
}, [image]);
|
|
|
|
|
|
|
|
const divStyle = {
|
|
|
|
backgroundImage: 'url("/media/backgrounds/page-title.webp"),url("/media/backgrounds/page-title.webp")',
|
|
|
|
};
|
|
|
|
return h('div', {},
|
|
|
|
h('section', {className: "page-title-section overlay", style: divStyle},
|
|
|
|
h('div', {className: "row"},
|
|
|
|
h('div', {className: "container"},
|
|
|
|
h('div', {className: "col-md-8"},
|
|
|
|
h('ul', {className: "list-inline"},
|
|
|
|
h('li', {className: "list-inline-item h2"},
|
|
|
|
h('a', {className: "text-primary font-secondary", href: ""}, "Startseite")
|
|
|
|
),
|
|
|
|
h('li', {className: "list-inline-item h2"},
|
|
|
|
h("i", {className: "mdi mdi-chevron-double-right text-white"})
|
|
|
|
),
|
|
|
|
h('li', {className: "list-inline-item text-white h2 font-secondary"}, entry.data.title
|
|
|
|
)
|
|
|
|
),
|
|
|
|
h('p', {className: "text-lighten"}, entry.data.description
|
|
|
|
))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
h('section', {className: "section-sm"},
|
|
|
|
h('div', {className: "container"},
|
|
|
|
h('div', {className: "row"},
|
|
|
|
h('div', {className: "col-12 mb-4"},
|
|
|
|
h('img', {className: "img-fluid w-100 mb-4", src: imageUrl}),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
h('div', {}, h('h2', {}, entry.data.title)
|
|
|
|
),
|
|
|
|
h('div', {className: "row align-items-center mb-5"},
|
|
|
|
h('div', {className: "col-xl-8 order-sm-2 order-xl-2 col-12 order-2 col-sm-6"},
|
|
|
|
h('ul', {className: "list-inline"},
|
|
|
|
h('li', {className: "list-inline-item mr-4 mb-3 mb-sm-0"},
|
|
|
|
h('div', {className: "d-flex align-items-center"},
|
|
|
|
h('i', {className: "mdi mdi-calendar-today-outline text-primary icon-md mr-2"}),
|
|
|
|
h('div', {className: "text-left"},
|
|
|
|
h('h6', {className: "mb-0"}, "Klasse(n)"),
|
|
|
|
h('p', {className: "mb-0"}, entry.data.class)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
)
|
|
|
|
),
|
|
|
|
h('div', {className: "col-xl-2 text-left text-xl-right order-sm-3 order-3 order-xl-3 col-sm-6 col-12 mb-4 mb-xl-0"},
|
|
|
|
h('a', {href: entry.data.web_url, className: "btn btn-primary"}, "Website")
|
|
|
|
),
|
|
|
|
h('div', { className: "col-12 mt-4 order-4"},
|
|
|
|
h('div', {className: "border-bottom border-primary"})
|
|
|
|
),
|
|
|
|
),
|
|
|
|
h('div', {className: "row"},
|
|
|
|
h('div', {className: "col-12 mb-5 content"},
|
|
|
|
widgetFor('body')
|
|
|
|
))
|
|
|
|
),
|
|
|
|
));
|
|
|
|
};
|
|
|
|
CMS.registerPreviewTemplate("wettbewerbe", ContestPreview);
|
|
|
|
</script>
|
2023-01-14 17:31:54 +01:00
|
|
|
<script>
|
|
|
|
var AboutPreview = ({ widgetFor, widgetsFor, getAsset, entry}) => {
|
|
|
|
const [imageUrl, setImageUrl] = useState('');
|
|
|
|
const image = useMemo(() => entry.data.image, [entry.data.image]);
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
let alive = true;
|
|
|
|
|
|
|
|
const loadImage = async () => {
|
|
|
|
const imageAsset = await getAsset(image);
|
|
|
|
if (alive) {
|
|
|
|
setImageUrl(imageAsset.toString());
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
loadImage();
|
|
|
|
|
|
|
|
return () => {
|
|
|
|
alive = false;
|
|
|
|
};
|
|
|
|
}, [image]);
|
|
|
|
|
|
|
|
const divStyle = {
|
|
|
|
backgroundImage: 'url("/media/backgrounds/page-title.webp"),url("/media/backgrounds/page-title.webp")',
|
|
|
|
};
|
|
|
|
return h('div', {},
|
2023-02-09 22:26:15 +01:00
|
|
|
h('section', {className: "page-title-section overlay", style: divStyle},
|
|
|
|
h('div', {className: "row"},
|
|
|
|
h('div', {className: "container"},
|
|
|
|
h('div', {className: "col-md-8"},
|
|
|
|
h('ul', {className: "list-inline"},
|
|
|
|
h('li', {className: "list-inline-item h2"},
|
|
|
|
h('a', {className: "text-primary font-secondary", href: ""}, "Startseite")
|
2023-01-14 17:31:54 +01:00
|
|
|
),
|
2023-02-09 22:26:15 +01:00
|
|
|
h('li', {className: "list-inline-item h2"},
|
|
|
|
h("i", {className: "mdi mdi-chevron-double-right text-white"})
|
2023-01-14 17:31:54 +01:00
|
|
|
),
|
2023-02-09 22:26:15 +01:00
|
|
|
h('li', {className: "list-inline-item text-white h2 font-secondary"}, entry.data.title
|
2023-01-14 17:31:54 +01:00
|
|
|
)
|
|
|
|
),
|
2023-02-09 22:26:15 +01:00
|
|
|
h('p', {className: "text-lighten"}, entry.data.description
|
2023-01-14 17:31:54 +01:00
|
|
|
))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
2023-02-09 22:26:15 +01:00
|
|
|
h('section', {className: "section-sm"},
|
|
|
|
h('div', {className: "container"},
|
|
|
|
h('div', {className: "row"},
|
|
|
|
h('div', {className: "col-12 mb-4"},
|
|
|
|
h('img', {className: "img-fluid w-100 mb-4", src: imageUrl}),
|
2023-01-14 17:31:54 +01:00
|
|
|
widgetFor('body'))
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
entry.data.stats.enable ? h(
|
|
|
|
'section',
|
2023-02-09 22:26:15 +01:00
|
|
|
{className: "section-sm bg-primary"},
|
|
|
|
h('div', {className: "container"},
|
|
|
|
h('div', {className: "row"},
|
2023-01-14 17:31:54 +01:00
|
|
|
widgetsFor('stats').data.zahlen.map(element => {
|
2023-02-09 22:26:15 +01:00
|
|
|
return h('div', {className: "col-md-3 col-sm-6 mb-4 mb-md-0"},
|
|
|
|
h('div', {className: "text-center"},
|
|
|
|
h('h2', {className: "count text-white"}, element.count),
|
|
|
|
h('h5', {className: "text-white"}, element.name)
|
2023-01-14 17:31:54 +01:00
|
|
|
)
|
|
|
|
);
|
|
|
|
})
|
|
|
|
)
|
|
|
|
)
|
|
|
|
) : null
|
|
|
|
);
|
|
|
|
};
|
|
|
|
CMS.registerPreviewTemplate("about-index", AboutPreview);
|
|
|
|
</script>
|
2023-01-30 19:54:31 +01:00
|
|
|
<script>
|
|
|
|
const PostPreviewCard = ({ entry, widgetFor, viewStyle }) => {
|
2023-02-11 20:15:36 +01:00
|
|
|
return h('div', { style: { width: '100%', height: '100%' } },
|
2023-01-30 19:54:31 +01:00
|
|
|
viewStyle === 'grid' ? widgetFor('image') : null,
|
|
|
|
viewStyle === 'grid' ?
|
2023-02-11 20:15:36 +01:00
|
|
|
h('div', { style: { padding: '16px', paddingBottom: '8px', width: '100%' } },
|
|
|
|
h('div', {
|
2023-01-30 19:54:31 +01:00
|
|
|
style: {
|
|
|
|
display: 'flex',
|
|
|
|
width: '100%',
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
alignItems: 'start',
|
2023-02-11 20:15:36 +01:00
|
|
|
}},
|
|
|
|
h('div', {
|
2023-01-30 19:54:31 +01:00
|
|
|
style: {
|
|
|
|
backgroundColor: entry.data.draft === true ? 'RoyalBlue' : 'green',
|
|
|
|
color: 'white',
|
|
|
|
border: 'none',
|
|
|
|
padding: '4px 8px',
|
|
|
|
textAlign: 'center',
|
|
|
|
textDecoration: 'none',
|
|
|
|
display: 'inline-block',
|
|
|
|
cursor: 'pointer',
|
|
|
|
borderRadius: '4px',
|
2023-02-11 20:15:36 +01:00
|
|
|
}},
|
2023-01-30 19:54:31 +01:00
|
|
|
entry.data.draft === true ? 'Entwurf' : 'Öffentlich',
|
|
|
|
),
|
2023-02-09 22:26:15 +01:00
|
|
|
h('span', { style: { fontSize: '16px' } }, Intl.DateTimeFormat('de-De', { day: 'numeric', month: 'numeric', year: 'numeric'}).format(new Date(entry.data.date)))
|
2023-02-11 20:15:36 +01:00
|
|
|
)) : null,
|
|
|
|
h('div', { style: { padding: '16px', paddingTop: '8px', width: '100%' } },
|
|
|
|
h('div', {
|
2023-01-30 19:54:31 +01:00
|
|
|
style: {
|
|
|
|
display: 'flex',
|
|
|
|
width: '100%',
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
alignItems: 'start',
|
2023-02-11 20:15:36 +01:00
|
|
|
}},
|
|
|
|
h('div', {
|
2023-01-30 19:54:31 +01:00
|
|
|
style: {
|
|
|
|
display: 'flex',
|
|
|
|
flexDirection: viewStyle === 'grid' ? 'column' : 'row',
|
|
|
|
alignItems: 'baseline',
|
|
|
|
gap: '8px',
|
2023-02-11 20:15:36 +01:00
|
|
|
}},
|
|
|
|
h('strong', { style: { fontSize: '20px' } }, entry.data.title)))),
|
|
|
|
viewStyle != 'grid' ? h('div', { style: { padding: '16px', paddingBottom: '8px', paddingTop: '0px', width: '100%' } },
|
|
|
|
h('div', {
|
2023-01-30 19:54:31 +01:00
|
|
|
style: {
|
|
|
|
display: 'flex',
|
|
|
|
width: '100%',
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
alignItems: 'start',
|
2023-02-11 20:15:36 +01:00
|
|
|
}},
|
|
|
|
h('div', {
|
2023-01-30 19:54:31 +01:00
|
|
|
style: {
|
|
|
|
backgroundColor: entry.data.draft === true ? 'RoyalBlue' : 'green',
|
|
|
|
color: 'white',
|
|
|
|
border: 'none',
|
|
|
|
padding: '4px 8px',
|
|
|
|
textAlign: 'center',
|
|
|
|
textDecoration: 'none',
|
|
|
|
display: 'inline-block',
|
|
|
|
cursor: 'pointer',
|
2023-02-11 20:15:36 +01:00
|
|
|
borderRadius: '4px'
|
|
|
|
}},
|
|
|
|
entry.data.draft === true ? 'Entwurf' : 'Öffentlich'),
|
|
|
|
h('span', { style: { fontSize: '16px' } }, Intl.DateTimeFormat('de-De', { day: 'numeric', month: 'numeric', year: 'numeric'}).format(new Date(entry.data.date))))
|
2023-01-30 19:54:31 +01:00
|
|
|
) : null,
|
|
|
|
);
|
|
|
|
};
|
|
|
|
const GenericCard = ({ entry, widgetFor, viewStyle }) => {
|
2023-02-11 20:15:36 +01:00
|
|
|
return h('div', { style: { width: '100%', height: '100%' } },
|
2023-01-30 19:54:31 +01:00
|
|
|
viewStyle === 'grid' ? widgetFor('image') : null,
|
|
|
|
viewStyle === 'grid' ?
|
2023-02-11 20:15:36 +01:00
|
|
|
h('div', { style: { padding: '16px', paddingBottom: '8px', width: '100%' } },
|
|
|
|
h('div', {
|
2023-01-30 19:54:31 +01:00
|
|
|
style: {
|
|
|
|
display: 'flex',
|
|
|
|
width: '100%',
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
alignItems: 'start',
|
2023-02-11 20:15:36 +01:00
|
|
|
}},
|
|
|
|
h('div', {
|
2023-01-30 19:54:31 +01:00
|
|
|
style: {
|
|
|
|
backgroundColor: entry.data.draft === true ? 'RoyalBlue' : 'green',
|
|
|
|
color: 'white',
|
|
|
|
border: 'none',
|
|
|
|
padding: '4px 8px',
|
|
|
|
textAlign: 'center',
|
|
|
|
textDecoration: 'none',
|
|
|
|
display: 'inline-block',
|
|
|
|
cursor: 'pointer',
|
|
|
|
borderRadius: '4px',
|
2023-02-11 20:15:36 +01:00
|
|
|
}},
|
2023-01-30 19:54:31 +01:00
|
|
|
entry.data.draft === true ? 'Entwurf' : 'Öffentlich',
|
|
|
|
),
|
2023-02-11 20:15:36 +01:00
|
|
|
h('span', { style: { fontSize: '16px' } }, entry.data.category))) : null,
|
|
|
|
h('div', { style: { padding: '16px', paddingTop: viewStyle === 'grid' ? '8px' : '16px', width: '100%' } },
|
|
|
|
h('div', {
|
2023-01-30 19:54:31 +01:00
|
|
|
style: {
|
|
|
|
display: 'flex',
|
|
|
|
width: '100%',
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
alignItems: 'start',
|
2023-02-11 20:15:36 +01:00
|
|
|
}},
|
|
|
|
h('div', {
|
2023-01-30 19:54:31 +01:00
|
|
|
style: {
|
|
|
|
display: 'flex',
|
|
|
|
flexDirection: viewStyle === 'grid' ? 'column' : 'row',
|
|
|
|
alignItems: 'baseline',
|
|
|
|
gap: '8px',
|
2023-02-11 20:15:36 +01:00
|
|
|
}},
|
|
|
|
h('strong', { style: { fontSize: '20px' } }, entry.data.title)),
|
|
|
|
viewStyle != 'grid' ? h('div', {
|
2023-01-30 19:54:31 +01:00
|
|
|
style: {
|
|
|
|
backgroundColor: entry.data.draft === true ? 'RoyalBlue' : 'green',
|
|
|
|
color: 'white',
|
|
|
|
border: 'none',
|
|
|
|
padding: '4px 8px',
|
|
|
|
textAlign: 'center',
|
|
|
|
textDecoration: 'none',
|
|
|
|
display: 'inline-block',
|
|
|
|
cursor: 'pointer',
|
|
|
|
borderRadius: '4px',
|
2023-02-11 20:15:36 +01:00
|
|
|
}},
|
|
|
|
entry.data.draft === true ? 'Entwurf' : 'Öffentlich') : null)));
|
2023-01-30 19:54:31 +01:00
|
|
|
};
|
2023-02-11 20:15:36 +01:00
|
|
|
const NoDateCard = ({ entry, widgetFor, viewStyle }) => {
|
2023-01-30 19:54:31 +01:00
|
|
|
return h(
|
|
|
|
'div',
|
|
|
|
{ style: { width: '100%', height: '100%' } },
|
|
|
|
viewStyle === 'grid' ? widgetFor('image') : null,
|
|
|
|
h(
|
|
|
|
'div',
|
|
|
|
{ style: { padding: '16px', width: '100%' } },
|
|
|
|
h(
|
|
|
|
'div',
|
|
|
|
{
|
|
|
|
style: {
|
|
|
|
display: 'flex',
|
|
|
|
width: '100%',
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
alignItems: 'start',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
h(
|
|
|
|
'div',
|
|
|
|
{
|
|
|
|
style: {
|
|
|
|
display: 'flex',
|
|
|
|
flexDirection: viewStyle === 'grid' ? 'column' : 'row',
|
|
|
|
alignItems: 'baseline',
|
|
|
|
gap: '8px',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
h('strong', { style: { fontSize: '20px' } }, entry.data.title),
|
|
|
|
),
|
|
|
|
h(
|
|
|
|
'div',
|
|
|
|
{
|
|
|
|
style: {
|
|
|
|
backgroundColor: entry.data.draft === true ? 'RoyalBlue' : 'green',
|
|
|
|
color: 'white',
|
|
|
|
border: 'none',
|
|
|
|
padding: '4px 8px',
|
|
|
|
textAlign: 'center',
|
|
|
|
textDecoration: 'none',
|
|
|
|
display: 'inline-block',
|
|
|
|
cursor: 'pointer',
|
|
|
|
borderRadius: '4px',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
entry.data.draft === true ? 'Entwurf' : 'Öffentlich',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
};
|
|
|
|
const SmallCard = ({ entry, widgetFor, viewStyle }) => {
|
|
|
|
return h(
|
|
|
|
'div',
|
|
|
|
{ style: { width: '100%', height: '100%' } },
|
|
|
|
h(
|
|
|
|
'div',
|
|
|
|
{ style: { padding: '16px', width: '100%' } },
|
|
|
|
h(
|
|
|
|
'div',
|
|
|
|
{
|
|
|
|
style: {
|
|
|
|
display: 'flex',
|
|
|
|
width: '100%',
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
alignItems: 'start',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
h(
|
|
|
|
'div',
|
|
|
|
{
|
|
|
|
style: {
|
|
|
|
display: 'flex',
|
|
|
|
flexDirection: viewStyle === 'grid' ? 'column' : 'row',
|
|
|
|
alignItems: 'baseline',
|
|
|
|
gap: '8px',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
h('strong', { style: { fontSize: '20px' } }, entry.data.title),
|
|
|
|
),
|
|
|
|
h(
|
|
|
|
'div',
|
|
|
|
{
|
|
|
|
style: {
|
|
|
|
backgroundColor: entry.data.draft === true ? 'RoyalBlue' : 'green',
|
|
|
|
color: 'white',
|
|
|
|
border: 'none',
|
|
|
|
padding: '4px 8px',
|
|
|
|
textAlign: 'center',
|
|
|
|
textDecoration: 'none',
|
|
|
|
display: 'inline-block',
|
|
|
|
cursor: 'pointer',
|
|
|
|
borderRadius: '4px',
|
|
|
|
},
|
|
|
|
},
|
|
|
|
entry.data.draft === true ? 'Entwurf' : 'Öffentlich',
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2023-02-11 20:15:36 +01:00
|
|
|
['schulchronik', 'forms', 'pages', 'begabte-index', 'wettbewerbe-index', 'ganztagsangebote-index', 'forms-index', 'event-index', 'contact-index', 'cantorpreis-index', 'anmeldung-index', 'about-index', 'blog-index'].forEach(page => {
|
|
|
|
CMS.registerPreviewCard(page, SmallCard);
|
|
|
|
});
|
|
|
|
|
|
|
|
['ganztagsangebote', 'wettbewerbe', 'begabte'].forEach(page => {
|
|
|
|
CMS.registerPreviewCard(page, GenericCard);
|
|
|
|
});
|
2023-01-30 19:54:31 +01:00
|
|
|
|
|
|
|
CMS.registerPreviewCard('blog', PostPreviewCard);
|
2023-02-11 20:15:36 +01:00
|
|
|
CMS.registerPreviewCard('abiturienten', NoDateCard);
|
|
|
|
CMS.registerPreviewCard('cantorfora', NoDateCard);
|
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>
|