move cms
This commit is contained in:
parent
57a3a02b64
commit
4774cb11cb
@ -1,665 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<link rel="stylesheet" href="https://cantorgymnasium.de/plugins/fontawesome/css/all.min.css">
|
||||
<title>Static CMS</title>
|
||||
</head>
|
||||
<body>
|
||||
<style>
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
</style>
|
||||
<!-- Include the script that builds the page and powers Static CMS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/@staticcms/app@latest/dist/static-cms-app.js"></script>
|
||||
<script>
|
||||
CMS.init();
|
||||
var icons = [['home', 'fa fa-house'], ['settings', 'fa fa-gear'], ['user', 'fa fa-user'], ['page', 'fa fa-file'], ['document', 'fa fa-file-lines'], ['news', 'fa fa-newspaper'], ['award', 'fa fa-award'], ['group', 'fa fa-people-group'], ['trophy', 'fa fa-trophy'], ['book', 'fa fa-book'], ['timeline', 'fa fa-timeline'], ['graduation-cap', 'fa fa-graduation-cap'], ['info', 'fa fa-circle-info']];
|
||||
icons.forEach(icon => {
|
||||
CMS.registerIcon(icon[0], ({}) => { return(h('i', {"className": icon[1]})); });
|
||||
});
|
||||
const CustomPage = () => {
|
||||
return h('div', {}, 'I am a custom page!');
|
||||
};
|
||||
|
||||
CMS.registerAdditionalLink({
|
||||
id: 'info',
|
||||
title: 'Informationen',
|
||||
data: CustomPage,
|
||||
options: {
|
||||
icon: 'info',
|
||||
},
|
||||
});
|
||||
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("\"","") ?? '';
|
||||
console.log(dir);
|
||||
return { dir: dir };
|
||||
}
|
||||
|
||||
return { dir: '' };
|
||||
},
|
||||
toArgs: ({ dir }) => {
|
||||
return [`dir=\"${dir}\"`];
|
||||
},
|
||||
control: ({ dir, onChange }) => {
|
||||
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: "),
|
||||
h('input', {
|
||||
key: 'control-input',
|
||||
value: dir,
|
||||
"style": {
|
||||
border: "1px solid #ced4da", borderRadius: "8px", padding: "10px", width: "80%"
|
||||
},
|
||||
onChange: event => {
|
||||
onChange({ dir: event.target.value });
|
||||
},
|
||||
}));
|
||||
},
|
||||
preview: ({ dir }) => {
|
||||
return h('div', {"className": "row", "style": { border: "1px solid #868686", borderRadius: "8px", padding: "10px" }},
|
||||
h('b', {"style": { marginRight: "5px" }}, "Gallerie-Ordner:"),
|
||||
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("\"","") ?? '';
|
||||
console.log(src);
|
||||
return { src };
|
||||
}
|
||||
|
||||
return { dir: '' };
|
||||
},
|
||||
toArgs: ({ src }) => {
|
||||
return [`src=\"${src}\"`];
|
||||
},
|
||||
/* control: ({ src, onChange, controlProps: { field, collection, entry } }) => {
|
||||
const controlID = useUUID();
|
||||
const handleOnChange = (newSrc) => {
|
||||
onChange(newSrc);
|
||||
}
|
||||
const handleOpenMediaLibrary = useMediaInsert(
|
||||
src,
|
||||
{ field, controlID },
|
||||
handleOnChange,
|
||||
);
|
||||
const assetSource = useMediaAsset(src, collection, field, entry);
|
||||
|
||||
return h('span', {}, [
|
||||
h('button', {
|
||||
key: 'control-button',
|
||||
onClick: handleOpenMediaLibrary,
|
||||
}, 'Click to open media library'),
|
||||
h(
|
||||
'img',
|
||||
{
|
||||
key: 'control-preview',
|
||||
src: assetSource,
|
||||
},
|
||||
'',
|
||||
),
|
||||
]);
|
||||
},*/
|
||||
control: ({ src, onChange }) => {
|
||||
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:"),
|
||||
h('input', {
|
||||
key: 'control-input',
|
||||
value: src,
|
||||
"style": {
|
||||
border: "1px solid #ced4da", borderRadius: "8px", padding: "10px", width: "80%"
|
||||
},
|
||||
onChange: event => {
|
||||
onChange({ src: event.target.value });
|
||||
},
|
||||
}));
|
||||
},
|
||||
preview: ({ src }) => {
|
||||
return h('div', {"className": "row", "style": { border: "1px solid #ccc", borderRadius: "16px", padding: "10px" }},
|
||||
h('b', {"style": { marginRight: "5px" }}, "Gallerie-Ordner:"),
|
||||
h('code', {}, src));
|
||||
},
|
||||
});
|
||||
CMS.registerShortcode('card', {
|
||||
label: 'Link-Karte',
|
||||
openTag: '{{< ',
|
||||
closeTag: ' >}}',
|
||||
separator: ' ',
|
||||
toProps: args => {
|
||||
if (args.length > 0) {
|
||||
var title = "";
|
||||
var link = "";
|
||||
console.log(args);
|
||||
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 }) => {
|
||||
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:"),
|
||||
h('input', {
|
||||
key: 'control-input',
|
||||
value: title,
|
||||
"style": {
|
||||
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,
|
||||
"style": {
|
||||
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 }) => {
|
||||
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),
|
||||
),
|
||||
h('a', {"className": "mb-0 btn btn-primary btn-sm text-decoration-none", "href": link}, "Mehr anzeigen")
|
||||
)))},
|
||||
});
|
||||
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 }) => {
|
||||
return h('div', {"className": "row", "style": { border: "1px solid #868686", borderRadius: "8px", padding: "10px" }},
|
||||
h('b', {"style": {fontFamily: "sans-serif", margin: "10px"}}, "YoutTube-Video:"),
|
||||
h('input', {
|
||||
key: 'control-input',
|
||||
value: src,
|
||||
"style": {
|
||||
border: "1px solid #ced4da", borderRadius: "8px", padding: "10px", width: "80%"
|
||||
},
|
||||
onChange: event => {
|
||||
onChange({ src: event.target.value });
|
||||
},
|
||||
}),
|
||||
h('div', {"className": "row", "style": {"marginTop": "10px"}},
|
||||
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}`,
|
||||
},
|
||||
'',
|
||||
),
|
||||
);
|
||||
},
|
||||
});
|
||||
CMS.registerShortcode('load-photoswipe', {
|
||||
label: 'Gallerie-Servicemodul',
|
||||
openTag: '{{< ',
|
||||
closeTag: ' >}}',
|
||||
separator: '',
|
||||
control: () => {
|
||||
return h('div', {"style": { border: "1px solid #868686", borderRadius: "8px", padding: "10px" }},
|
||||
h('b', {"style": {fontFamily: "sans-serif", margin: "10px"}}, "Gallerie-Servicemodul"));
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
const CategoriesControl = ({ label, value, field, onChange }) => {
|
||||
const separator = useMemo(() => field.separator ?? ', ', [field.separator]);
|
||||
|
||||
const handleChange = useCallback((e) => {
|
||||
onChange(e.target.value.split(separator).map(e => e.trim()));
|
||||
}, [separator, onChange]);
|
||||
|
||||
return h('div', {},
|
||||
h('label', { for: 'inputId' }, label),
|
||||
h('input', {
|
||||
id: 'inputId',
|
||||
type: 'text',
|
||||
value: value ? value.join(separator) : '',
|
||||
onChange: this.handleChange,
|
||||
})
|
||||
);
|
||||
};
|
||||
|
||||
const CategoriesPreview = ({ value }) => {
|
||||
return h(
|
||||
'ul',
|
||||
{},
|
||||
value.map(function (val, index) {
|
||||
return h('li', { key: index }, val);
|
||||
}),
|
||||
);
|
||||
};
|
||||
|
||||
const schema = {
|
||||
properties: {
|
||||
separator: { type: 'string' },
|
||||
},
|
||||
};
|
||||
|
||||
CMS.registerWidget('categories', CategoriesControl, CategoriesPreview, schema);
|
||||
</script>
|
||||
<script>
|
||||
CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/bootstrap/bootstrap.min.css");
|
||||
CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/slick/slick.css");
|
||||
CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/animate/animate.min.css");
|
||||
CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/venobox/venobox.css");
|
||||
CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/fontawesome/css/all.css");
|
||||
CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/fira/fira.css");
|
||||
CMS.registerPreviewStyle("https://cantorgymnasium.de/scss/style.css");
|
||||
</script>
|
||||
<script>
|
||||
var ChronikPreview = ({widgetFor, widgetsFor, entry, document, window }) => {
|
||||
const divStyle = {
|
||||
backgroundImage: 'url("/media/backgrounds/page-title.png"),url("/media/backgrounds/page-title.png")',
|
||||
};
|
||||
return h('div', {"id": "sc-root"},
|
||||
h('section', {"className": "page-title-section overlay", "style": divStyle},
|
||||
h('div', {"className": "container"},
|
||||
h('div', {"className": "col-md-8"},
|
||||
h('ul', {"className": "list-inline custom-breadcrumb"},
|
||||
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": "fa-solid fa-angle-right text-white"})),
|
||||
h('li', {"className": "list-inline-item text-white h2 font-secondary"}, entry.data.title)
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
h('section', {"className": "section-sm"},
|
||||
h('div', {"className": "container"},
|
||||
h('div', {"className": "row"},
|
||||
h('div', {"className": "col-12 mb-4 content"},
|
||||
widgetsFor('topics').map(function(i, index) {
|
||||
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"},
|
||||
h('span', {"ariaHidden": "true"}, '\u{00d7}')
|
||||
)
|
||||
),
|
||||
h('div', {"className": "modal-body"},
|
||||
h('div', {"className": "content"}, i.content)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}),
|
||||
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"},
|
||||
h('span', {"ariaHidden": "true"}, '\u{00d7}')
|
||||
)
|
||||
),
|
||||
h('div', {"className": "modal-body"},
|
||||
h('div', {"className": "content"}, widgetFor('pretext'))
|
||||
)
|
||||
)
|
||||
)
|
||||
) : 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');
|
||||
script.src = "https://cantorgymnasium.de/plugins/wordcloud/wordcloud2.min.js";
|
||||
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')
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
CMS.registerPreviewTemplate("schulchronik", ChronikPreview);
|
||||
|
||||
</script>
|
||||
<script>
|
||||
var PostPreviewContent = ({widgetFor, entry}) => {
|
||||
const divStyle = {
|
||||
backgroundImage: 'url("/media/backgrounds/page-title.png"),url("/media/backgrounds/page-title.png")',
|
||||
};
|
||||
return h('div', {},
|
||||
h('section', {"className": "page-title-section overlay", "style": divStyle},
|
||||
h('div', {"className": "container"},
|
||||
h('div', {"className": "col-md-8"},
|
||||
h('ul', {"className": "list-inline custom-breadcrumb"},
|
||||
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": "fa-solid fa-angle-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('div', {"className": "content"}, widgetFor('body'))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
CMS.registerPreviewTemplate("impressum", PostPreviewContent);
|
||||
CMS.registerPreviewTemplate("datenschutz", PostPreviewContent);
|
||||
CMS.registerPreviewTemplate("schuelerrat-geschaeftsordnung", PostPreviewContent);
|
||||
CMS.registerPreviewTemplate("schuelervertretung-index", PostPreviewContent);
|
||||
CMS.registerPreviewTemplate("elternvertretung-index", PostPreviewContent);
|
||||
CMS.registerPreviewTemplate("jia-index", PostPreviewContent);
|
||||
CMS.registerPreviewTemplate("bibo", PostPreviewContent);
|
||||
CMS.registerPreviewTemplate("abiturienten", PostPreviewContent);
|
||||
CMS.registerPreviewTemplate("cantorfora", PostPreviewContent);
|
||||
CMS.registerPreviewTemplate("contact-index", PostPreviewContent);
|
||||
|
||||
</script>
|
||||
<script>
|
||||
var AnmeldungPreviewContent = ({widgetsFor, widgetFor, entry}) => {
|
||||
const divStyle = {
|
||||
backgroundImage: 'url("/media/backgrounds/page-title.png"),url("/media/backgrounds/page-title.png")',
|
||||
};
|
||||
return h('div', {},
|
||||
h('section', {"className": "page-title-section overlay", "style": divStyle},
|
||||
h('div', {"className": "container"},
|
||||
h('div', {"className": "col-md-8"},
|
||||
h('ul', {"className": "list-inline custom-breadcrumb"},
|
||||
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": "fa-solid fa-angle-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 mb-5"},
|
||||
h('div', {"className": "col-md-6 content"},
|
||||
widgetFor('body')
|
||||
)
|
||||
),
|
||||
h('div', {"className": "row"},
|
||||
widgetsFor('elements').map(function(element, index) {
|
||||
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"},
|
||||
h('h4', {"className": "card-title mb-3"},
|
||||
element.data.title
|
||||
),
|
||||
h('div', {"className": "content"},
|
||||
element.widgets.content
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
})
|
||||
)
|
||||
)
|
||||
),
|
||||
);
|
||||
};
|
||||
CMS.registerPreviewTemplate("anmeldung-index", AnmeldungPreviewContent);
|
||||
</script>
|
||||
<script>
|
||||
var EventPreview = ({widgetsFor, entry}) => {
|
||||
const divStyle = {
|
||||
backgroundImage: 'url("/media/backgrounds/page-title.png"),url("/media/backgrounds/page-title.png")',
|
||||
};
|
||||
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 custom-breadcrumb"},
|
||||
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": "fa-solid fa-angle-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"},
|
||||
h('div', {"className": "container"},
|
||||
h('div', {"className": "row"},
|
||||
h('div', {"className": "col-12 "},
|
||||
h('ul', {"className": "list-unstyled"},
|
||||
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 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))
|
||||
),
|
||||
h('div', {"className": "d-md-table-cell px-4 vertical-alighn-middle mb-4 mb-md-0"},
|
||||
h('p', {"className": "h4 mb-3 d-block"}, event.data.title),
|
||||
h('p', {"className": "mb-0"}, event.data.summary)
|
||||
),
|
||||
h('div', {"className": "d-md-table-cell text-right pr-0 pr-md-4"},
|
||||
h('p', {},
|
||||
h('i', {"className": "fa-solid fa-location-dot text-primary mr-2"}),
|
||||
event.data.location
|
||||
)
|
||||
)
|
||||
);
|
||||
})
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
};
|
||||
CMS.registerPreviewTemplate("event-index", EventPreview);
|
||||
</script>
|
||||
<script>
|
||||
var PagePreview = ({widgetFor, entry}) => {
|
||||
const divStyle = {
|
||||
backgroundImage: 'url("/media/backgrounds/page-title.png"),url("/media/backgrounds/page-title.png")',
|
||||
};
|
||||
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 custom-breadcrumb"},
|
||||
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": "fa-solid fa-angle-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)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
};
|
||||
CMS.registerPreviewTemplate("blog-index", PagePreview);
|
||||
CMS.registerPreviewTemplate("cantorpreis-index", PagePreview);
|
||||
CMS.registerPreviewTemplate("forms-index", PagePreview);
|
||||
CMS.registerPreviewTemplate("ganztagsangebote-index", PagePreview);
|
||||
CMS.registerPreviewTemplate("wettbewerbe-index", PagePreview);
|
||||
CMS.registerPreviewTemplate("begabtenfoerderung-index", PagePreview);
|
||||
</script>
|
||||
<script>
|
||||
var PagePreviewImage = ({ widgetFor, 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.png"),url("/media/backgrounds/page-title.png")',
|
||||
};
|
||||
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 custom-breadcrumb"},
|
||||
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": "fa-solid fa-angle-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}),
|
||||
widgetFor('body'))
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
};
|
||||
CMS.registerPreviewTemplate("about-index", PagePreviewImage);
|
||||
CMS.registerPreviewTemplate("blog", PagePreviewImage);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -3,30 +3,24 @@ backend:
|
||||
repo: gcg/gcg.pages.cantorgymnasium.de
|
||||
branch: master
|
||||
auth_type: pkce
|
||||
app_id: 469e4923e9b0a2d128604dfdf8e5c413665d65f730e4f563541e237210d29992
|
||||
app_id: f9d3e269912cc9560d183167726afc7ccb517862904d0a6c0b10105719964bab
|
||||
api_root: https://gitlab.cantorgymnasium.de/api/v4
|
||||
base_url: https://gitlab.cantorgymnasium.de
|
||||
auth_endpoint: oauth/authorize
|
||||
commit_messages:
|
||||
create: "{{slug}} in {{collection}} erstellt"
|
||||
update: "{{slug}} in {{collection}} aktualisiert"
|
||||
delete: "{{slug}} aus {{collection}} gelöscht"
|
||||
uploadMedia: "{{path}} hochgeladen"
|
||||
deleteMedia: "{{path}} gelöscht"
|
||||
|
||||
local_backend: true
|
||||
use_graphql: true
|
||||
graphql_api_root: https://gitlab.cantorgymnasium.de/api/graphql
|
||||
|
||||
media_folder: "static/media"
|
||||
public_folder: "/media"
|
||||
site_url: https://cantorgymnasium.de
|
||||
display_url: https://cantorgymnasium.de
|
||||
logo_url: /media/logo_y.svg
|
||||
locale: "de"
|
||||
|
||||
show_preview_links: false
|
||||
|
||||
collections:
|
||||
- name: "config"
|
||||
icon: "settings"
|
||||
label: "Konfiguration"
|
||||
description: "Hier können die Basiseinstellungen der Website geändert werden."
|
||||
editor:
|
||||
@ -41,31 +35,14 @@ collections:
|
||||
public_folder: "media/home"
|
||||
format: yml
|
||||
fields:
|
||||
- label: "Banner"
|
||||
name: "top_banner"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Text", name: "text", widget: "string", required: false}
|
||||
- {label: "Farbe", name: "color", widget: "color", required: false}
|
||||
- {label: "Schriftfarbe", name: "font_color", widget: "color", required: false}
|
||||
- {label: "Symbol", name: "icon", widget: "string", required: false}
|
||||
- label: "Zeitschaltung"
|
||||
name: temporarily
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Startdatum", name: "start_date", widget: "datetime", required: false, date_format: "dd.MM.yyyy", time_format: false, format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"}
|
||||
- {label: "Enddatum", name: "end_date", widget: "datetime", required: false, date_format: "dd.MM.yyyy", time_format: false, format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"}
|
||||
- label: "Karusell"
|
||||
- label: "Slider"
|
||||
name: "slider"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "image", required: false}
|
||||
- {label: "Titel", name: "title", widget: "string", required: false}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "image"}
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- label: "Elemente"
|
||||
label_singular: "Element"
|
||||
name: "slider_item"
|
||||
widget: "list"
|
||||
fields:
|
||||
@ -92,8 +69,8 @@ collections:
|
||||
name: "success_banner"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Bild", name: "image", widget: "image", required: false}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- {label: "Bild", name: "image", widget: "image"}
|
||||
- label: "Elemente"
|
||||
name: "feature_item"
|
||||
widget: "list"
|
||||
@ -107,86 +84,80 @@ collections:
|
||||
name: "about"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Titel", name: "title", widget: "string", required: false}
|
||||
- {label: "Inhalt", name: "content", widget: "markdown", required: false}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Inhalt", name: "content", widget: "markdown"}
|
||||
- label: "Button"
|
||||
name: "button"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Bezeichnung", name: "label", widget: "string", required: false}
|
||||
- {label: "Link", name: "link", widget: "string", required: false}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- {label: "Bezeichnung", name: "label", widget: "string"}
|
||||
- {label: "Link", name: "link", widget: "string"}
|
||||
- label: "Ganztagsangebote"
|
||||
name: "ganztagsangebote"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Titel", name: "title", widget: "string", required: false}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- label: "Aktionsbutton"
|
||||
name: "cta"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Titel", name: "title", widget: "string", required: false}
|
||||
- {label: "Untertitel", name: "subtitle", widget: "string", required: false}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Untertitel", name: "subtitle", widget: "string"}
|
||||
- label: "Button"
|
||||
name: "button"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Bezeichnung", name: "label", widget: "string", required: false}
|
||||
- {label: "Link", name: "link", widget: "string", required: false}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- {label: "Bezeichnung", name: "label", widget: "string"}
|
||||
- {label: "Link", name: "link", widget: "string"}
|
||||
- label: "Informationen"
|
||||
name: "info"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "image", required: false}
|
||||
- {label: "Titel", name: "title", widget: "string", required: false}
|
||||
- {label: "Inhalt", name: "content", widget: "text", required: false}
|
||||
- {label: "Video-Link", name: "video_link", widget: "string", required: false}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "image"}
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Inhalt", name: "content", widget: "text"}
|
||||
- {label: "Video-Link", name: "video_link", widget: "string"}
|
||||
- label: "Termine"
|
||||
name: "termine"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Titel", name: "title", widget: "string", required: false}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- label: "Zahlen"
|
||||
name: "zahlen"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- label: "Elemente"
|
||||
name: "zahl_element"
|
||||
widget: "list"
|
||||
fields:
|
||||
- {label: "Bezeichnung", name: "name", widget: "string", required: false}
|
||||
- {label: "Zahl", name: "count", widget: "number", required: false}
|
||||
- {label: "Bezeichnung", name: "name", widget: "string"}
|
||||
- {label: "Zahl", name: "count", widget: "number"}
|
||||
- label: "Blog"
|
||||
name: "blog"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- label: "Digitalpakt-Banner"
|
||||
name: "digitalpakt"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Titel", name: "title", widget: "string", required: false}
|
||||
- name: "hugo-config"
|
||||
label: "Website-Konfiguration"
|
||||
file: "config.yml"
|
||||
file: "config.toml"
|
||||
fields:
|
||||
- {label: "Website-URL", name: "baseURL", widget: "string"}
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Elemente je Seite", name: "paginate", widget: "number", value_type: "int"}
|
||||
- {label: "Lände von Zusammenfassungen", name: "summaryLength", widget: "number", value_type: "int"}
|
||||
- {label: "Standardsprache in Unterordner", name: "defaultContentLanguageInSubdir", widget: "boolean", required: false}
|
||||
- {label: "Standardsprache in Unterordner", name: "defaultContentLanguageInSubdir", widget: "boolean"}
|
||||
- {label: "Standardsprache", name: "defaultContentLanguage", widget: "string"}
|
||||
- {label: "Emoji", name: "enableEmoji", widget: "boolean", required: false}
|
||||
- {label: "robots.txt", name: "enableRobotsTxt", widget: "boolean", required: false}
|
||||
- {label: "Emoji", name: "enableEmoji", widget: "boolean"}
|
||||
- {label: "robots.txt", name: "enableRobotsTxt", widget: "boolean"}
|
||||
- {label: "Zeitzone", name: "timeZone", widget: "string"}
|
||||
- label: "Markdown-Enstellungen"
|
||||
name: "markup"
|
||||
@ -202,7 +173,7 @@ collections:
|
||||
- label: "Renderer-Einstellungen"
|
||||
name: "renderer"
|
||||
widget: "object"
|
||||
fields: [{label: "Unsicheren Inhalt erlauben", name: "unsafe", widget: "boolean", required: false}]
|
||||
fields: [{label: "Unsicheren Inhalt erlauben", name: "unsafe", widget: "boolean"}]
|
||||
- label: "Einstellungen"
|
||||
name: "params"
|
||||
widget: "object"
|
||||
@ -228,16 +199,12 @@ collections:
|
||||
- {label: "Route (Link)", name: "route_link", widget: "string"}
|
||||
- {label: "Telefonnummer", name: "mobile", widget: "string"}
|
||||
- {label: "E-Mail-Adresse", name: "email", widget: "string"}
|
||||
- {label: "E-Mail-Adresse (UI-Ansicht)", name: "email_pretty", widget: "string"}
|
||||
- {label: "Beschreibung", name: "description", widget: "string"}
|
||||
- {label: "Kontakt-Titelleiste", name: "top_header", widget: "boolean"}
|
||||
- {label: "Vorschaubilder", name: "images", widget: "stringlist", required: false}
|
||||
- {label: "Twitter-Konto", name: "twitter", widget: "string", required: false}
|
||||
- label: "Ladeanimation"
|
||||
name: "preloader"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- {label: "Logo", name: "preloader", widget: "image"}
|
||||
- {label: "Ladeanimation", name: "loader", widget: "image"}
|
||||
- label: "Soz. Netzwerke"
|
||||
@ -268,7 +235,7 @@ collections:
|
||||
- {label: "Titel", name: "name", widget: "string"}
|
||||
- {label: "Link", name: "URL", widget: "string"}
|
||||
- label: "Sprachen"
|
||||
name: "languages"
|
||||
name: "Languages"
|
||||
widget: "object"
|
||||
collapsed: true
|
||||
fields:
|
||||
@ -284,43 +251,17 @@ collections:
|
||||
- {label: "Copyright-Hinweis", name: "copyright", widget: "string"}
|
||||
- {label: "Impressum-Link", name: "impressumURL", widget: "string"}
|
||||
- {label: "Datenschutz-Link", name: "dseURL", widget: "string"}
|
||||
- label: "Privatsphäre"
|
||||
name: "privacy"
|
||||
widget: "object"
|
||||
fields:
|
||||
- label: "Disqus"
|
||||
name: "disqus"
|
||||
widget: "object"
|
||||
fields: [{label: "Deaktivieren", name: "disable", widget: "boolean", required: false}]
|
||||
- label: "Google Analytics"
|
||||
name: "googleAnalytics"
|
||||
widget: "object"
|
||||
fields: [{label: "Deaktivieren", name: "disable", widget: "boolean", required: false}]
|
||||
- label: "Instagram"
|
||||
name: "instagram"
|
||||
widget: "object"
|
||||
fields: [{label: "Deaktivieren", name: "disable", widget: "boolean", required: false}]
|
||||
- label: "Twitter"
|
||||
name: "twitter"
|
||||
widget: "object"
|
||||
fields: [{label: "Tracking deaktivieren", name: "enableDNT", widget: "boolean", required: false}]
|
||||
- label: "YouTube"
|
||||
name: "youtube"
|
||||
widget: "object"
|
||||
fields: [{label: "Piped-Proxy", name: "privacyEnhanced", widget: "boolean", required: false}]
|
||||
- label: "Vimeo"
|
||||
name: "vimeo"
|
||||
widget: "object"
|
||||
fields: [{label: "Tracking deaktivieren", name: "enableDNT", widget: "boolean", required: false}]
|
||||
- name: "index-pages"
|
||||
icon: "page"
|
||||
label: "Hauptseiten"
|
||||
|
||||
|
||||
|
||||
|
||||
- name: "pages-de"
|
||||
label: "Statische Seiten"
|
||||
editor:
|
||||
preview: true
|
||||
frame: false
|
||||
files:
|
||||
- name: "blog-index"
|
||||
label: "Aktuelles"
|
||||
label: "Blog"
|
||||
file: "content/german/blog/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
@ -331,7 +272,7 @@ collections:
|
||||
file: "content/german/about/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {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}
|
||||
@ -340,25 +281,18 @@ collections:
|
||||
label: "Anmeldung"
|
||||
file: "content/german/anmeldung/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string", required: true}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {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"
|
||||
name: "elements"
|
||||
widget: "list"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string", required: true}
|
||||
- {label: "Text", name: "content", widget: "markdown", required: true}
|
||||
required: false
|
||||
- {label: "Text", name: "body", widget: "markdown", required: false}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
- name: "cantorpreis-index"
|
||||
label: "Cantor-Preis"
|
||||
file: "content/german/cantorpreis/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- name: "contact-index"
|
||||
@ -366,7 +300,7 @@ collections:
|
||||
file: "content/german/kontakt/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
@ -375,26 +309,26 @@ collections:
|
||||
file: "content/german/termine/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- label: Termine
|
||||
label_singular: "Termin"
|
||||
label_singular: " "
|
||||
name: "events"
|
||||
widget: "list"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string", required: true}
|
||||
- {label: "Datum/Startdatum", name: "date", widget: "datetime", required: true, date_format: "dd.MM.yyyy", time_format: false, format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"}
|
||||
- {label: "Enddatum", name: "enddate", widget: "datetime", required: false, date_format: "dd.MM.yyyy", time_format: false, format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX", default: ""}
|
||||
- {label: "Datum/Startdatum", name: "date", widget: "datetime", required: true, date_format: "DD.MM.YYYY", time_format: "HH:mm"}
|
||||
- {label: "Enddatum", name: "enddate", widget: "datetime", required: false, date_format: "DD.MM.YYYY", time_format: "HH:mm", default: ""}
|
||||
- {label: "Ort", name: "location", widget: "string", required: true}
|
||||
- {label: "Beschreibung", name: "summary", widget: "string", required: false}
|
||||
required: false
|
||||
- name: "forms-index"
|
||||
label: "Dokumente und Formulare"
|
||||
label: "Formulare und Vorlagen"
|
||||
file: "content/german/forms/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- name: "ganztagsangebote-index"
|
||||
@ -402,15 +336,35 @@ collections:
|
||||
file: "content/german/ganztagsangebote/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- name: "impressum"
|
||||
label: "Impressum"
|
||||
file: "content/german/impressum/index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "pages"}
|
||||
- {label: "Type", name: "layout", widget: "hidden", default: "single.html"}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
- name: "datenschutz"
|
||||
label: "Datenschutz"
|
||||
file: "content/german/datenschutz/index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "pages"}
|
||||
- {label: "Type", name: "layout", widget: "hidden", default: "single.html"}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
- name: "wettbewerbe-index"
|
||||
label: "Wettbewerbe"
|
||||
file: "content/german/wettbewerbe/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- name: "begabtenfoerderung-index"
|
||||
@ -418,15 +372,48 @@ collections:
|
||||
file: "content/german/begabtenfoerderung/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- name: "schuelervertretung-index"
|
||||
label: "Schülervertretung"
|
||||
file: "content/german/schuelervertretung/index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "pages"}
|
||||
- {label: "Type", name: "layout", widget: "hidden", default: "single.html"}
|
||||
- {label: "Text", name: "body", widget: "markdown", required: false}
|
||||
- name: "schuelerrat-geschaeftsordnung"
|
||||
label: "Geschäftsordnung der Schülervertretung"
|
||||
file: "content/german/schuelervertretung/geschaeftsordnung.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "pages"}
|
||||
- {label: "Type", name: "layout", widget: "hidden", default: "single.html"}
|
||||
- {label: "Text", name: "body", widget: "markdown", required: false}
|
||||
- name: "bibo"
|
||||
label: "Schulbibliothek"
|
||||
file: "content/german/bibo/index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "pages"}
|
||||
- {label: "Type", name: "layout", widget: "hidden", default: "single.html"}
|
||||
- {label: "Text", name: "body", widget: "markdown", required: false}
|
||||
- name: "abiturienten"
|
||||
label: "Abiturienten"
|
||||
file: "content/german/abiturienten/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Text", name: "body", widget: "markdown", required: false}
|
||||
@ -435,44 +422,43 @@ collections:
|
||||
file: "content/german/cantorfora/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Text", name: "body", widget: "markdown", required: false}
|
||||
- name: "pages"
|
||||
icon: "page"
|
||||
label: "Zusatzseiten"
|
||||
label_singular: "Zusatzseite"
|
||||
folder: "content/german/pages"
|
||||
create: true
|
||||
editor:
|
||||
preview: true
|
||||
frame: false
|
||||
slug: "{{slug}}"
|
||||
- name: "elternvertretung-index"
|
||||
label: "Elternvertretung"
|
||||
file: "content/german/elternvertretung/index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "pages"}
|
||||
- {label: "Layout", name: "layout", widget: "hidden", default: "single.html"}
|
||||
- label: "Aliase"
|
||||
name: "aliases"
|
||||
widget: "categories"
|
||||
required: false
|
||||
- {label: "Type", name: "layout", widget: "hidden", default: "single.html"}
|
||||
- {label: "Text", name: "body", widget: "markdown", required: false}
|
||||
- name: "author"
|
||||
icon: "user"
|
||||
label: "Autoren"
|
||||
label_singular: "Autoren"
|
||||
folder: "content/german/author"
|
||||
create: true
|
||||
slug: "{{slug}}"
|
||||
- name: "jia-index"
|
||||
label: "Junior-Ingenieur-Akademie"
|
||||
file: "content/german/schuelervertretung/index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "pages"}
|
||||
- {label: "Type", name: "layout", widget: "hidden", default: "single.html"}
|
||||
- {label: "Text", name: "body", widget: "markdown", required: false}
|
||||
- name: "author-de" # Used in routes, e.g., /admin/collections/blog
|
||||
label: "Autor*innen" # Used in the UI
|
||||
label_singular: "Autor*in"
|
||||
folder: "content/german/author" # The path to the folder where the documents are stored
|
||||
create: true # Allow users to create new documents in this collection
|
||||
slug: "{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
|
||||
editor:
|
||||
preview: false
|
||||
media_folder: '/static/media/people'
|
||||
public_folder: '/media/people'
|
||||
fields:
|
||||
fields: # The fields for each document, usually in front matter
|
||||
- {label: "Name", name: "title", widget: "string"}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", default: "", required: false}
|
||||
@ -501,29 +487,20 @@ collections:
|
||||
- {label: "Link", name: "link", widget: "string"}
|
||||
required: false
|
||||
- {label: "Beschreibung", name: "body", widget: "markdown"}
|
||||
- name: "blog"
|
||||
icon: "news"
|
||||
label: "Aktuelles"
|
||||
- name: "blog-de"
|
||||
label: "Blogbeiträge"
|
||||
label_singular: "Blogbeitrag"
|
||||
folder: "content/german/blog"
|
||||
filter: {field: "type", value: "post"}
|
||||
create: true
|
||||
slug: "{{slug}}"
|
||||
editor:
|
||||
preview: true
|
||||
preview: false
|
||||
media_folder: '/static/media/blog'
|
||||
public_folder: '/media/blog'
|
||||
view_groups:
|
||||
- label: Drafts
|
||||
field: draft
|
||||
sortable_fields:
|
||||
fields: ['date', 'title']
|
||||
default:
|
||||
field: date
|
||||
direction: Descending
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Datum", name: "date", widget: "datetime", date_format: "dd/MM/yyyy", time_format: false}
|
||||
- {label: "Datum", name: "date", widget: "datetime", date_format: "DD.MM.YYYY", time_format: "HH:mm"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", default: "", required: false}
|
||||
@ -531,25 +508,25 @@ collections:
|
||||
- label: "Beitragsautor"
|
||||
name: "author"
|
||||
widget: "relation"
|
||||
collection: "author"
|
||||
collection: "author-de"
|
||||
search_fields: ["title"]
|
||||
value_field: "title"
|
||||
display_fields: ["title"]
|
||||
- label: "Kategorien"
|
||||
name: "categories"
|
||||
widget: "list"
|
||||
required: false
|
||||
field: {label: "Kategorie", name: "category", widget: "array"}
|
||||
field: {label: "Kategorie", name: "category", widget: "string"}
|
||||
- label: "Tags"
|
||||
name: "tags"
|
||||
widget: "list"
|
||||
required: false
|
||||
field: {label: "Tag", name: "tag", widget: "array"}
|
||||
field: {label: "Tag", name: "tag", widget: "string"}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "post"}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
- name: "forms"
|
||||
icon: "document"
|
||||
label: "Dokumente"
|
||||
label_singular: "Dokument"
|
||||
- name: "forms-de"
|
||||
label: "Formulare und Vorlagen"
|
||||
label_singular: "Formular"
|
||||
description: "Hier sind Formulare, Vorlagen und andere Dokumente zu hinterlegen."
|
||||
folder: "content/german/forms"
|
||||
filter: {field: "type", value: "forms"}
|
||||
@ -561,16 +538,29 @@ collections:
|
||||
public_folder: '/media/forms'
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Veröffentlichungsdatum", name: "date", widget: "datetime", date_format: "DD.MM.YYYY", time_format: "HH:mm"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Bild", name: "image", widget: "image", default: "/media/image.png", required: false}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "forms"}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
- name: "cantorpreis"
|
||||
icon: "award"
|
||||
label: "Cantor-Preisträger"
|
||||
label_singular: "Cantor-Preisträger"
|
||||
- name: "anmeldung-de"
|
||||
label: "Anmeldung"
|
||||
label_singular: "Anmeldeinformation"
|
||||
folder: "content/german/anmeldung"
|
||||
filter: {field: "type", value: "anmeldung"}
|
||||
create: true
|
||||
editor:
|
||||
preview: false
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "anmeldung"}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
- name: "cantorpreis-de"
|
||||
label: "Cantor-Preisträger*innen"
|
||||
label_singular: "Cantor-Preisträger*in"
|
||||
folder: "content/german/cantorpreis"
|
||||
filter: {field: "type", value: "cantorpreis"}
|
||||
create: true
|
||||
@ -594,8 +584,7 @@ collections:
|
||||
- {label: "Link", name: "link", widget: "string"}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "cantorpreis"}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
- name: "ganztagsangebote"
|
||||
icon: "group"
|
||||
- name: "ganztagsangebote-de"
|
||||
label: "Ganztagsangebote"
|
||||
label_singular: "Ganztagsangebot"
|
||||
folder: "content/german/ganztagsangebote"
|
||||
@ -607,11 +596,14 @@ collections:
|
||||
public_folder: '/media/ganztagsangebote'
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Veröffentlichungsdatum", name: "date", widget: "datetime", date_format: "DD.MM.YYYY", time_format: "HH:mm"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Bild", name: "image", widget: "image", default: "/media/ganztagsangebote/image.png", required: false}
|
||||
- {label: "Themenbereich", name: "category", widget: "string", required: true}
|
||||
- label: "Themenbereiche"
|
||||
name: "categories_ag"
|
||||
widget: "list"
|
||||
- {label: "Dauer", name: "duration", widget: "string"}
|
||||
- {label: "Tag/Stunden", name: "weekly", widget: "string"}
|
||||
- {label: "Klassenstufen", name: "class", widget: "string"}
|
||||
@ -619,8 +611,7 @@ collections:
|
||||
- {label: "Anmeldelink", name: "apply_url", widget: "hidden", default: "https://moodle.bildung-lsa.de/gcg/mod/choice/view.php?id=828"}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "ganztagsangebote"}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
- name: "wettbewerbe"
|
||||
icon: "trophy"
|
||||
- name: "wettbewerbe-de"
|
||||
label: "Wettbewerbe"
|
||||
label_singular: "Wettbewerb"
|
||||
folder: "content/german/wettbewerbe"
|
||||
@ -632,7 +623,7 @@ collections:
|
||||
public_folder: '/media/contests'
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Bild", name: "image", widget: "image", default: "/media/image.png", required: false}
|
||||
@ -641,8 +632,7 @@ collections:
|
||||
- {label: "Website", name: "web_url", widget: "string", required: false}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "wettbewerbe"}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
- name: "begabtenfoerderung"
|
||||
icon: "book"
|
||||
- name: "begabtenfoerderung-de"
|
||||
label: "Begabtenförderung"
|
||||
label_singular: "Begabtenförderung"
|
||||
folder: "content/german/begabtenfoerderung"
|
||||
@ -654,7 +644,7 @@ collections:
|
||||
public_folder: '/media/begabtenfoerderung'
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Bild", name: "image", widget: "image", default: "/media/image.png", required: false}
|
||||
@ -664,31 +654,23 @@ collections:
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "begabtenfoerderung"}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
- name: "schulchronik"
|
||||
icon: "timeline"
|
||||
label: "Schulchronik"
|
||||
label_singular: "Chronikjahr"
|
||||
folder: "content/german/schulchronik"
|
||||
filter: {field: "type", value: "schulchronik"}
|
||||
create: true
|
||||
#editor:
|
||||
#preview: false
|
||||
media_folder: '/static/media/schulchronik'
|
||||
public_folder: '/media/schulchronik'
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {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: "Type", name: "type", widget: "hidden", default: "schulchronik"}
|
||||
- {label: "Einleitung", name: "pretext", hint: "Jahreszahltext", widget: "markdown", required: false}
|
||||
- label: "Kreative Haufen"
|
||||
name: "topics"
|
||||
widget: "list"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string", required: true}
|
||||
- {label: "Element-ID", hint: "Kleingeschriebene Bezeichnung ohne Leer- und Sonderzeichen, darf sich nicht innerhalb einer Seite doppeln", name: "id", widget: "string", required: true}
|
||||
- {label: "Inhalt", name: "content", widget: "markdown", required: true}
|
||||
required: false
|
||||
- {label: "Text", name: "body", widget: "markdown", required: false, default: "{{< load-photoswipe >}}"}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
- name: "abiturienten"
|
||||
icon: "graduation-cap"
|
||||
label: "Abiturienten"
|
||||
label_singular: "Abiturjahrgang"
|
||||
folder: "content/german/abiturienten"
|
||||
@ -700,9 +682,9 @@ collections:
|
||||
public_folder: '/media/abiturienten'
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {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: "Mehrere Bilder", name: "multiple", widget: "boolean", default: false, required: false}
|
||||
- {label: "Mehrere Bilder", name: "multiple", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "abiturienten"}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
440
static/admin-old/index.html
Normal file
440
static/admin-old/index.html
Normal file
@ -0,0 +1,440 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>GCG Website: Netlify CMS</title>
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
||||
<link rel="manifest" href="/site.webmanifest">
|
||||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#1a1a37">
|
||||
<meta name="msapplication-TileColor" content="#1a1a37">
|
||||
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
|
||||
<meta name="theme-color" content="#1a1a37">
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
|
||||
<script src="https://sharadcodes.github.io/hugo-shortcodes-netlify-cms/dist/hugo_shortcodes_netlify_cms.js"></script>
|
||||
<script>
|
||||
CMS.registerEditorComponent({
|
||||
id: "collapsible-note",
|
||||
label: "Zugeklappter Abschnitt",
|
||||
collapsed: true,
|
||||
fields: [
|
||||
{
|
||||
name: 'summary',
|
||||
label: 'Titel',
|
||||
widget: 'string'
|
||||
},
|
||||
{
|
||||
name: 'details',
|
||||
label: 'Inhalt',
|
||||
widget: 'markdown'
|
||||
}
|
||||
],
|
||||
|
||||
pattern: /^{{% collapsible title=\"(.*?)\" %}}$\s*?(.*?)\n^{{% \/collapsible %}}$/ms,
|
||||
fromBlock: function(match) {
|
||||
return {
|
||||
summary: match[1],
|
||||
details: match[2]
|
||||
};
|
||||
},
|
||||
toBlock: function(data) {
|
||||
return `
|
||||
{{% collapsible title="${data.summary}" %}}
|
||||
|
||||
${data.details}
|
||||
|
||||
{{% /collapsible %}}
|
||||
`;
|
||||
},
|
||||
toPreview: function(data) {
|
||||
return `
|
||||
<div class="container mb-0">
|
||||
<div class="card border-primary rounded-0 hover-shadow mb-5">
|
||||
<div class="card-body mb-0">
|
||||
<details class="mb-0">
|
||||
<summary class="mb-0">${data.summary}</summary>
|
||||
<div class="content"><p class="content">${data.details}</p></div>
|
||||
</details>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
CMS.registerEditorComponent({
|
||||
id: "content",
|
||||
label: "\"content\"-Tag",
|
||||
collapsed: false,
|
||||
fields: [
|
||||
{
|
||||
name: 'details',
|
||||
label: 'Inhalt',
|
||||
widget: 'markdown'
|
||||
}
|
||||
],
|
||||
|
||||
pattern: /^{{% content %}}$\s*?(.*?)\n^{{% \/content %}}$/ms,
|
||||
fromBlock: function(match) {
|
||||
return {
|
||||
details: match[1]
|
||||
};
|
||||
},
|
||||
toBlock: function(data) {
|
||||
return `
|
||||
{{% content %}}
|
||||
|
||||
${data.details}
|
||||
|
||||
{{% /content %}}
|
||||
`;
|
||||
},
|
||||
toPreview: function(data) {
|
||||
return `
|
||||
<div class="content">
|
||||
${data.details}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
CMS.registerEditorComponent({
|
||||
id: "card",
|
||||
label: "Link-Karte",
|
||||
collapsed: false,
|
||||
fields: [
|
||||
{
|
||||
name: 'link',
|
||||
label: 'Link',
|
||||
widget: 'string'
|
||||
},
|
||||
{
|
||||
name: 'title',
|
||||
label: 'Bezeichnung',
|
||||
widget: 'string'
|
||||
}
|
||||
],
|
||||
|
||||
pattern: /^{{< card link=\"(.*?)\" title=\"(.*?)\" >}}/,
|
||||
fromBlock: function(match) {
|
||||
return {
|
||||
link: match[1],
|
||||
title: match[2]
|
||||
};
|
||||
},
|
||||
toBlock: function(data) {
|
||||
return `
|
||||
{{< card link="${data.link}" title="${data.title}" >}}
|
||||
`;
|
||||
},
|
||||
toPreview: function(data) {
|
||||
return `
|
||||
<div class="container mb-0">
|
||||
<div class="card border-primary rounded-0 hover-shadow mb-5">
|
||||
<div class="card-body mb-0">
|
||||
<h4 class="card-title"><a class="text-decoration-none" href='${data.link}'>${data.title}</a></h4>
|
||||
<a href='${data.link}' class="mb-0 btn btn-primary btn-sm text-decoration-none">{{ i18n "show_more"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
`;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!-- <script>
|
||||
CMS.registerPreviewStyle("https://eesev9ie.github.io/style.css");
|
||||
CMS.registerEditorComponent({
|
||||
id: "gallery",
|
||||
label: "Bildergallerie",
|
||||
fields: [{
|
||||
name: "dir",
|
||||
label: "Ordner",
|
||||
widget: "string"
|
||||
},
|
||||
],
|
||||
pattern: /{{< gallery dir="([a-zA-Z0-9]+)" />}}/,
|
||||
fromBlock: function(match) {
|
||||
return {
|
||||
username: dir[1],
|
||||
};
|
||||
},
|
||||
toBlock: function(obj) {
|
||||
return `{{< gallery dir="${obj.dir}" />}}`;
|
||||
},
|
||||
toPreview: function(obj) {
|
||||
return `{{< gallery dir="${obj.dir}" />}}`;
|
||||
},
|
||||
});
|
||||
</script> -->
|
||||
<script>
|
||||
CMS.registerEditorComponent({
|
||||
id: "gallery-dir",
|
||||
label: "Gallerie",
|
||||
fields: [{
|
||||
name: "dir",
|
||||
label: "Ordner",
|
||||
widget: "string"
|
||||
}],
|
||||
pattern: /{{< gallery dir=\"(.*?)\" \/>}}/,
|
||||
fromBlock: function(match) {
|
||||
return {
|
||||
dir: match[1],
|
||||
};
|
||||
},
|
||||
toBlock: function(obj) {
|
||||
return `{{< gallery dir=\"${obj.dir}\" \/>}}`;
|
||||
},
|
||||
toPreview: function(obj) {
|
||||
return `{{< gallery dir=\"${obj.dir}\" \/>}}`;
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/bootstrap/bootstrap.min.css");
|
||||
CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/slick/slick.css");
|
||||
CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/animate/animate.min.css");
|
||||
CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/venobox/venobox.css");
|
||||
CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/fontawesome/css/all.css");
|
||||
CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/fira/fira.css");
|
||||
CMS.registerPreviewStyle("https://cantorgymnasium.de/scss/style.css");
|
||||
</script>
|
||||
<script>
|
||||
var PostPreview = createClass({
|
||||
render: function() {
|
||||
var entry = this.props.entry;
|
||||
var image = entry.getIn(['data', 'image']);
|
||||
var bg = this.props.getAsset(image);
|
||||
const divStyle = {
|
||||
backgroundImage: 'url("/media/backgrounds/page-title.png"),url("/media/backgrounds/page-title.png")',
|
||||
};
|
||||
return h('div', {},
|
||||
h('section', {"className": "page-title-section overlay", "style": divStyle},
|
||||
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('a', {"className": "text-primary font-secondary", href: ""}, "Schulchronik")),
|
||||
h('li', {"className": "list-inline-item ha"},
|
||||
h("i", {"className": "fa-solid fa-angle-right text-white"})),
|
||||
h('li', {"className": "list-inline-item text-white h1 font-secondary"}, entry.getIn(['data', 'title']))
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
h('section', {"className": "section-sm"},
|
||||
h('div', {"className": "container"},
|
||||
h('div', {"className": "row"},
|
||||
h('div', {"className": "col-12 mb-4"}, this.props.widgetFor('body'))
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
CMS.registerPreviewTemplate("schulchronik", PostPreview);
|
||||
CMS.registerPreviewTemplate("schuelerrat-index", PostPreview);
|
||||
|
||||
</script>
|
||||
<script>
|
||||
var PostPreviewContent = createClass({
|
||||
render: function() {
|
||||
var entry = this.props.entry;
|
||||
var image = entry.getIn(['data', 'image']);
|
||||
var bg = this.props.getAsset(image);
|
||||
const divStyle = {
|
||||
backgroundImage: 'url("/media/backgrounds/page-title.png"),url("/media/backgrounds/page-title.png")',
|
||||
};
|
||||
return h('div', {},
|
||||
h('section', {"className": "page-title-section overlay", "style": divStyle},
|
||||
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('a', {"className": "text-primary font-secondary", href: ""}, "Schulchronik")),
|
||||
h('li', {"className": "list-inline-item ha"},
|
||||
h("i", {"className": "fa-solid fa-angle-right text-white"})),
|
||||
h('li', {"className": "list-inline-item text-white h1 font-secondary"}, entry.getIn(['data', 'title']))
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
h('section', {"className": "section-sm"},
|
||||
h('div', {"className": "container"},
|
||||
h('div', {"className": "row"},
|
||||
h('div', {"className": "col-12 mb-4"},
|
||||
h('div', {"className": "content"}, this.props.widgetFor('body'))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
CMS.registerPreviewTemplate("anmeldung-index", PostPreviewContent);
|
||||
CMS.registerPreviewTemplate("impressum", PostPreviewContent);
|
||||
CMS.registerPreviewTemplate("schuelerrat-geschaeftsordnung", PostPreviewContent);
|
||||
|
||||
</script>
|
||||
<script>
|
||||
var EventPreview = createClass({
|
||||
render: function() {
|
||||
var entry = this.props.entry;
|
||||
var image = entry.getIn(['data', 'image']);
|
||||
var bg = this.props.getAsset(image);
|
||||
const divStyle = {
|
||||
backgroundImage: 'url("/media/backgrounds/page-title.png"),url("/media/backgrounds/page-title.png")',
|
||||
};
|
||||
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 custom-breadcrumb"},
|
||||
h('li', {"className": "list-inline-item h1"},
|
||||
h('a', {"className": "text-primary font-secondary", href: ""}, "Startseite")
|
||||
),
|
||||
h('li', {"className": "list-inline-item ha"},
|
||||
h("i", {"className": "fa-solid fa-angle-right text-white"})
|
||||
),
|
||||
h('li', {"className": "list-inline-item text-white h1 font-secondary"}, entry.getIn(['data', 'title'])
|
||||
)
|
||||
),
|
||||
h('p', {"className": "text-lighten"}, entry.getIn(['data', 'description']))
|
||||
)
|
||||
)
|
||||
)
|
||||
),
|
||||
h('section', {"className": "section"},
|
||||
h('div', {"className": "container"},
|
||||
h('div', {"className": "row"},
|
||||
h('div', {"className": "col-12 "},
|
||||
h('ul', {"className": "list-unstyled"},
|
||||
this.props.widgetsFor('events').map(function(event, index) {
|
||||
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('span', {"className": "h2 d-block"}, new Intl.DateTimeFormat('de-De', { day: 'numeric'}).format(event.getIn(['data', 'date']))),
|
||||
new Intl.DateTimeFormat('de-De', { month: 'short', year: 'numeric' }).format(event.getIn(['data', 'date']))
|
||||
),
|
||||
h('div', {"className": "d-md-table-cell px-4 vertical-alighn-middle mb-4 mb-md-0"},
|
||||
h('p', {"className": "h4 mb-3 d-block"}, event.getIn(['data', 'title'])),
|
||||
h('p', {"className": "mb-0"}, event.getIn(['data', 'summary']))
|
||||
),
|
||||
h('div', {"className": "d-md-table-cell text-right pr-0 pr-md-4"},
|
||||
h('p', {},
|
||||
h('i', {"className": "fa-solid fa-location-dot text-primary mr-2"}),
|
||||
event.getIn(['data', 'location'])
|
||||
)
|
||||
)
|
||||
);
|
||||
})
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
CMS.registerPreviewTemplate("event-index", EventPreview);
|
||||
|
||||
</script>
|
||||
<script>
|
||||
var PagePreview = createClass({
|
||||
render: function() {
|
||||
var entry = this.props.entry;
|
||||
var image = entry.getIn(['data', 'image']);
|
||||
var bg = this.props.getAsset(image);
|
||||
const divStyle = {
|
||||
backgroundImage: 'url("/media/backgrounds/page-title.png"),url("/media/backgrounds/page-title.png")',
|
||||
};
|
||||
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 custom-breadcrumb"},
|
||||
h('li', {"className": "list-inline-item h1"},
|
||||
h('a', {"className": "text-primary font-secondary", href: ""}, "Startseite")
|
||||
),
|
||||
h('li', {"className": "list-inline-item ha"},
|
||||
h("i", {"className": "fa-solid fa-angle-right text-white"})
|
||||
),
|
||||
h('li', {"className": "list-inline-item text-white h1 font-secondary"}, entry.getIn(['data', 'title'])
|
||||
)
|
||||
),
|
||||
h('p', {"className": "text-lighten"}, entry.getIn(['data', 'description']))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
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);
|
||||
|
||||
</script>
|
||||
<script>
|
||||
var PagePreviewImage = createClass({
|
||||
render: function() {
|
||||
var entry = this.props.entry;
|
||||
var image = entry.getIn(['data', 'image']);
|
||||
var bg = this.props.getAsset(image);
|
||||
const divStyle = {
|
||||
backgroundImage: 'url("/media/backgrounds/page-title.png"),url("/media/backgrounds/page-title.png")',
|
||||
};
|
||||
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 custom-breadcrumb"},
|
||||
h('li', {"className": "list-inline-item h1"},
|
||||
h('a', {"className": "text-primary font-secondary", href: ""}, "Startseite")
|
||||
),
|
||||
h('li', {"className": "list-inline-item ha"},
|
||||
h("i", {"className": "fa-solid fa-angle-right text-white"})
|
||||
),
|
||||
h('li', {"className": "list-inline-item text-white h1 font-secondary"}, entry.getIn(['data', 'title'])
|
||||
)
|
||||
),
|
||||
h('p', {"className": "text-lighten"}, entry.getIn(['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: bg.toString(), alt: "about image"}),
|
||||
this.props.widgetFor('body'))
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
CMS.registerPreviewTemplate("about-index", PagePreviewImage);
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -3,24 +3,30 @@ backend:
|
||||
repo: gcg/gcg.pages.cantorgymnasium.de
|
||||
branch: master
|
||||
auth_type: pkce
|
||||
app_id: f9d3e269912cc9560d183167726afc7ccb517862904d0a6c0b10105719964bab
|
||||
app_id: 469e4923e9b0a2d128604dfdf8e5c413665d65f730e4f563541e237210d29992
|
||||
api_root: https://gitlab.cantorgymnasium.de/api/v4
|
||||
base_url: https://gitlab.cantorgymnasium.de
|
||||
auth_endpoint: oauth/authorize
|
||||
use_graphql: true
|
||||
graphql_api_root: https://gitlab.cantorgymnasium.de/api/graphql
|
||||
commit_messages:
|
||||
create: "{{slug}} in {{collection}} erstellt"
|
||||
update: "{{slug}} in {{collection}} aktualisiert"
|
||||
delete: "{{slug}} aus {{collection}} gelöscht"
|
||||
uploadMedia: "{{path}} hochgeladen"
|
||||
deleteMedia: "{{path}} gelöscht"
|
||||
|
||||
local_backend: true
|
||||
|
||||
media_folder: "static/media"
|
||||
public_folder: "/media"
|
||||
site_url: https://cantorgymnasium.de
|
||||
display_url: https://cantorgymnasium.de
|
||||
logo_url: /media/logo_y.svg
|
||||
locale: "de"
|
||||
|
||||
show_preview_links: false
|
||||
|
||||
collections:
|
||||
- name: "config"
|
||||
icon: "settings"
|
||||
label: "Konfiguration"
|
||||
description: "Hier können die Basiseinstellungen der Website geändert werden."
|
||||
editor:
|
||||
@ -35,14 +41,31 @@ collections:
|
||||
public_folder: "media/home"
|
||||
format: yml
|
||||
fields:
|
||||
- label: "Slider"
|
||||
- label: "Banner"
|
||||
name: "top_banner"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Text", name: "text", widget: "string", required: false}
|
||||
- {label: "Farbe", name: "color", widget: "color", required: false}
|
||||
- {label: "Schriftfarbe", name: "font_color", widget: "color", required: false}
|
||||
- {label: "Symbol", name: "icon", widget: "string", required: false}
|
||||
- label: "Zeitschaltung"
|
||||
name: temporarily
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Startdatum", name: "start_date", widget: "datetime", required: false, date_format: "dd.MM.yyyy", time_format: false, format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"}
|
||||
- {label: "Enddatum", name: "end_date", widget: "datetime", required: false, date_format: "dd.MM.yyyy", time_format: false, format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"}
|
||||
- label: "Karusell"
|
||||
name: "slider"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "image"}
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "image", required: false}
|
||||
- {label: "Titel", name: "title", widget: "string", required: false}
|
||||
- label: "Elemente"
|
||||
label_singular: "Element"
|
||||
name: "slider_item"
|
||||
widget: "list"
|
||||
fields:
|
||||
@ -69,8 +92,8 @@ collections:
|
||||
name: "success_banner"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- {label: "Bild", name: "image", widget: "image"}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Bild", name: "image", widget: "image", required: false}
|
||||
- label: "Elemente"
|
||||
name: "feature_item"
|
||||
widget: "list"
|
||||
@ -84,80 +107,86 @@ collections:
|
||||
name: "about"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Inhalt", name: "content", widget: "markdown"}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Titel", name: "title", widget: "string", required: false}
|
||||
- {label: "Inhalt", name: "content", widget: "markdown", required: false}
|
||||
- label: "Button"
|
||||
name: "button"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- {label: "Bezeichnung", name: "label", widget: "string"}
|
||||
- {label: "Link", name: "link", widget: "string"}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Bezeichnung", name: "label", widget: "string", required: false}
|
||||
- {label: "Link", name: "link", widget: "string", required: false}
|
||||
- label: "Ganztagsangebote"
|
||||
name: "ganztagsangebote"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Titel", name: "title", widget: "string", required: false}
|
||||
- label: "Aktionsbutton"
|
||||
name: "cta"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Untertitel", name: "subtitle", widget: "string"}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Titel", name: "title", widget: "string", required: false}
|
||||
- {label: "Untertitel", name: "subtitle", widget: "string", required: false}
|
||||
- label: "Button"
|
||||
name: "button"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- {label: "Bezeichnung", name: "label", widget: "string"}
|
||||
- {label: "Link", name: "link", widget: "string"}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Bezeichnung", name: "label", widget: "string", required: false}
|
||||
- {label: "Link", name: "link", widget: "string", required: false}
|
||||
- label: "Informationen"
|
||||
name: "info"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "image"}
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Inhalt", name: "content", widget: "text"}
|
||||
- {label: "Video-Link", name: "video_link", widget: "string"}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "image", required: false}
|
||||
- {label: "Titel", name: "title", widget: "string", required: false}
|
||||
- {label: "Inhalt", name: "content", widget: "text", required: false}
|
||||
- {label: "Video-Link", name: "video_link", widget: "string", required: false}
|
||||
- label: "Termine"
|
||||
name: "termine"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Titel", name: "title", widget: "string", required: false}
|
||||
- label: "Zahlen"
|
||||
name: "zahlen"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- label: "Elemente"
|
||||
name: "zahl_element"
|
||||
widget: "list"
|
||||
fields:
|
||||
- {label: "Bezeichnung", name: "name", widget: "string"}
|
||||
- {label: "Zahl", name: "count", widget: "number"}
|
||||
- {label: "Bezeichnung", name: "name", widget: "string", required: false}
|
||||
- {label: "Zahl", name: "count", widget: "number", required: false}
|
||||
- label: "Blog"
|
||||
name: "blog"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- label: "Digitalpakt-Banner"
|
||||
name: "digitalpakt"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Titel", name: "title", widget: "string", required: false}
|
||||
- name: "hugo-config"
|
||||
label: "Website-Konfiguration"
|
||||
file: "config.toml"
|
||||
file: "config.yml"
|
||||
fields:
|
||||
- {label: "Website-URL", name: "baseURL", widget: "string"}
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Elemente je Seite", name: "paginate", widget: "number", value_type: "int"}
|
||||
- {label: "Lände von Zusammenfassungen", name: "summaryLength", widget: "number", value_type: "int"}
|
||||
- {label: "Standardsprache in Unterordner", name: "defaultContentLanguageInSubdir", widget: "boolean"}
|
||||
- {label: "Standardsprache in Unterordner", name: "defaultContentLanguageInSubdir", widget: "boolean", required: false}
|
||||
- {label: "Standardsprache", name: "defaultContentLanguage", widget: "string"}
|
||||
- {label: "Emoji", name: "enableEmoji", widget: "boolean"}
|
||||
- {label: "robots.txt", name: "enableRobotsTxt", widget: "boolean"}
|
||||
- {label: "Emoji", name: "enableEmoji", widget: "boolean", required: false}
|
||||
- {label: "robots.txt", name: "enableRobotsTxt", widget: "boolean", required: false}
|
||||
- {label: "Zeitzone", name: "timeZone", widget: "string"}
|
||||
- label: "Markdown-Enstellungen"
|
||||
name: "markup"
|
||||
@ -173,7 +202,7 @@ collections:
|
||||
- label: "Renderer-Einstellungen"
|
||||
name: "renderer"
|
||||
widget: "object"
|
||||
fields: [{label: "Unsicheren Inhalt erlauben", name: "unsafe", widget: "boolean"}]
|
||||
fields: [{label: "Unsicheren Inhalt erlauben", name: "unsafe", widget: "boolean", required: false}]
|
||||
- label: "Einstellungen"
|
||||
name: "params"
|
||||
widget: "object"
|
||||
@ -199,12 +228,16 @@ collections:
|
||||
- {label: "Route (Link)", name: "route_link", widget: "string"}
|
||||
- {label: "Telefonnummer", name: "mobile", widget: "string"}
|
||||
- {label: "E-Mail-Adresse", name: "email", widget: "string"}
|
||||
- {label: "E-Mail-Adresse (UI-Ansicht)", name: "email_pretty", widget: "string"}
|
||||
- {label: "Beschreibung", name: "description", widget: "string"}
|
||||
- {label: "Kontakt-Titelleiste", name: "top_header", widget: "boolean"}
|
||||
- {label: "Vorschaubilder", name: "images", widget: "stringlist", required: false}
|
||||
- {label: "Twitter-Konto", name: "twitter", widget: "string", required: false}
|
||||
- label: "Ladeanimation"
|
||||
name: "preloader"
|
||||
widget: "object"
|
||||
fields:
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean"}
|
||||
- {label: "Aktivieren", name: "enable", widget: "boolean", required: false}
|
||||
- {label: "Logo", name: "preloader", widget: "image"}
|
||||
- {label: "Ladeanimation", name: "loader", widget: "image"}
|
||||
- label: "Soz. Netzwerke"
|
||||
@ -235,7 +268,7 @@ collections:
|
||||
- {label: "Titel", name: "name", widget: "string"}
|
||||
- {label: "Link", name: "URL", widget: "string"}
|
||||
- label: "Sprachen"
|
||||
name: "Languages"
|
||||
name: "languages"
|
||||
widget: "object"
|
||||
collapsed: true
|
||||
fields:
|
||||
@ -251,17 +284,43 @@ collections:
|
||||
- {label: "Copyright-Hinweis", name: "copyright", widget: "string"}
|
||||
- {label: "Impressum-Link", name: "impressumURL", widget: "string"}
|
||||
- {label: "Datenschutz-Link", name: "dseURL", widget: "string"}
|
||||
|
||||
|
||||
|
||||
|
||||
- name: "pages-de"
|
||||
label: "Statische Seiten"
|
||||
- label: "Privatsphäre"
|
||||
name: "privacy"
|
||||
widget: "object"
|
||||
fields:
|
||||
- label: "Disqus"
|
||||
name: "disqus"
|
||||
widget: "object"
|
||||
fields: [{label: "Deaktivieren", name: "disable", widget: "boolean", required: false}]
|
||||
- label: "Google Analytics"
|
||||
name: "googleAnalytics"
|
||||
widget: "object"
|
||||
fields: [{label: "Deaktivieren", name: "disable", widget: "boolean", required: false}]
|
||||
- label: "Instagram"
|
||||
name: "instagram"
|
||||
widget: "object"
|
||||
fields: [{label: "Deaktivieren", name: "disable", widget: "boolean", required: false}]
|
||||
- label: "Twitter"
|
||||
name: "twitter"
|
||||
widget: "object"
|
||||
fields: [{label: "Tracking deaktivieren", name: "enableDNT", widget: "boolean", required: false}]
|
||||
- label: "YouTube"
|
||||
name: "youtube"
|
||||
widget: "object"
|
||||
fields: [{label: "Piped-Proxy", name: "privacyEnhanced", widget: "boolean", required: false}]
|
||||
- label: "Vimeo"
|
||||
name: "vimeo"
|
||||
widget: "object"
|
||||
fields: [{label: "Tracking deaktivieren", name: "enableDNT", widget: "boolean", required: false}]
|
||||
- name: "index-pages"
|
||||
icon: "page"
|
||||
label: "Hauptseiten"
|
||||
editor:
|
||||
preview: true
|
||||
frame: false
|
||||
files:
|
||||
- name: "blog-index"
|
||||
label: "Blog"
|
||||
label: "Aktuelles"
|
||||
file: "content/german/blog/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
@ -272,7 +331,7 @@ collections:
|
||||
file: "content/german/about/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {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}
|
||||
@ -281,18 +340,25 @@ collections:
|
||||
label: "Anmeldung"
|
||||
file: "content/german/anmeldung/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {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: "Text", name: "body", widget: "markdown"}
|
||||
- label: "Elemente"
|
||||
label_singular: "Element"
|
||||
name: "elements"
|
||||
widget: "list"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string", required: true}
|
||||
- {label: "Text", name: "content", widget: "markdown", required: true}
|
||||
required: false
|
||||
- {label: "Text", name: "body", widget: "markdown", required: false}
|
||||
- name: "cantorpreis-index"
|
||||
label: "Cantor-Preis"
|
||||
file: "content/german/cantorpreis/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- name: "contact-index"
|
||||
@ -300,7 +366,7 @@ collections:
|
||||
file: "content/german/kontakt/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
@ -309,26 +375,26 @@ collections:
|
||||
file: "content/german/termine/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- label: Termine
|
||||
label_singular: " "
|
||||
label_singular: "Termin"
|
||||
name: "events"
|
||||
widget: "list"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string", required: true}
|
||||
- {label: "Datum/Startdatum", name: "date", widget: "datetime", required: true, date_format: "DD.MM.YYYY", time_format: "HH:mm"}
|
||||
- {label: "Enddatum", name: "enddate", widget: "datetime", required: false, date_format: "DD.MM.YYYY", time_format: "HH:mm", default: ""}
|
||||
- {label: "Datum/Startdatum", name: "date", widget: "datetime", required: true, date_format: "dd.MM.yyyy", time_format: false, format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"}
|
||||
- {label: "Enddatum", name: "enddate", widget: "datetime", required: false, date_format: "dd.MM.yyyy", time_format: false, format: "yyyy-MM-dd'T'HH:mm:ss.SSSXXX", default: ""}
|
||||
- {label: "Ort", name: "location", widget: "string", required: true}
|
||||
- {label: "Beschreibung", name: "summary", widget: "string", required: false}
|
||||
required: false
|
||||
- name: "forms-index"
|
||||
label: "Formulare und Vorlagen"
|
||||
label: "Dokumente und Formulare"
|
||||
file: "content/german/forms/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- name: "ganztagsangebote-index"
|
||||
@ -336,35 +402,15 @@ collections:
|
||||
file: "content/german/ganztagsangebote/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- name: "impressum"
|
||||
label: "Impressum"
|
||||
file: "content/german/impressum/index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "pages"}
|
||||
- {label: "Type", name: "layout", widget: "hidden", default: "single.html"}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
- name: "datenschutz"
|
||||
label: "Datenschutz"
|
||||
file: "content/german/datenschutz/index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "pages"}
|
||||
- {label: "Type", name: "layout", widget: "hidden", default: "single.html"}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
- name: "wettbewerbe-index"
|
||||
label: "Wettbewerbe"
|
||||
file: "content/german/wettbewerbe/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- name: "begabtenfoerderung-index"
|
||||
@ -372,48 +418,15 @@ collections:
|
||||
file: "content/german/begabtenfoerderung/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- name: "schuelervertretung-index"
|
||||
label: "Schülervertretung"
|
||||
file: "content/german/schuelervertretung/index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "pages"}
|
||||
- {label: "Type", name: "layout", widget: "hidden", default: "single.html"}
|
||||
- {label: "Text", name: "body", widget: "markdown", required: false}
|
||||
- name: "schuelerrat-geschaeftsordnung"
|
||||
label: "Geschäftsordnung der Schülervertretung"
|
||||
file: "content/german/schuelervertretung/geschaeftsordnung.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "pages"}
|
||||
- {label: "Type", name: "layout", widget: "hidden", default: "single.html"}
|
||||
- {label: "Text", name: "body", widget: "markdown", required: false}
|
||||
- name: "bibo"
|
||||
label: "Schulbibliothek"
|
||||
file: "content/german/bibo/index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "pages"}
|
||||
- {label: "Type", name: "layout", widget: "hidden", default: "single.html"}
|
||||
- {label: "Text", name: "body", widget: "markdown", required: false}
|
||||
- name: "abiturienten"
|
||||
label: "Abiturienten"
|
||||
file: "content/german/abiturienten/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Text", name: "body", widget: "markdown", required: false}
|
||||
@ -422,43 +435,44 @@ collections:
|
||||
file: "content/german/cantorfora/_index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Text", name: "body", widget: "markdown", required: false}
|
||||
- name: "elternvertretung-index"
|
||||
label: "Elternvertretung"
|
||||
file: "content/german/elternvertretung/index.md"
|
||||
- name: "pages"
|
||||
icon: "page"
|
||||
label: "Zusatzseiten"
|
||||
label_singular: "Zusatzseite"
|
||||
folder: "content/german/pages"
|
||||
create: true
|
||||
editor:
|
||||
preview: true
|
||||
frame: false
|
||||
slug: "{{slug}}"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "pages"}
|
||||
- {label: "Type", name: "layout", widget: "hidden", default: "single.html"}
|
||||
- {label: "Layout", name: "layout", widget: "hidden", default: "single.html"}
|
||||
- label: "Aliase"
|
||||
name: "aliases"
|
||||
widget: "categories"
|
||||
required: false
|
||||
- {label: "Text", name: "body", widget: "markdown", required: false}
|
||||
- name: "jia-index"
|
||||
label: "Junior-Ingenieur-Akademie"
|
||||
file: "content/german/schuelervertretung/index.md"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "pages"}
|
||||
- {label: "Type", name: "layout", widget: "hidden", default: "single.html"}
|
||||
- {label: "Text", name: "body", widget: "markdown", required: false}
|
||||
- name: "author-de" # Used in routes, e.g., /admin/collections/blog
|
||||
label: "Autor*innen" # Used in the UI
|
||||
label_singular: "Autor*in"
|
||||
folder: "content/german/author" # The path to the folder where the documents are stored
|
||||
create: true # Allow users to create new documents in this collection
|
||||
slug: "{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
|
||||
- name: "author"
|
||||
icon: "user"
|
||||
label: "Autoren"
|
||||
label_singular: "Autoren"
|
||||
folder: "content/german/author"
|
||||
create: true
|
||||
slug: "{{slug}}"
|
||||
editor:
|
||||
preview: false
|
||||
media_folder: '/static/media/people'
|
||||
public_folder: '/media/people'
|
||||
fields: # The fields for each document, usually in front matter
|
||||
fields:
|
||||
- {label: "Name", name: "title", widget: "string"}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", default: "", required: false}
|
||||
@ -487,20 +501,29 @@ collections:
|
||||
- {label: "Link", name: "link", widget: "string"}
|
||||
required: false
|
||||
- {label: "Beschreibung", name: "body", widget: "markdown"}
|
||||
- name: "blog-de"
|
||||
label: "Blogbeiträge"
|
||||
- name: "blog"
|
||||
icon: "news"
|
||||
label: "Aktuelles"
|
||||
label_singular: "Blogbeitrag"
|
||||
folder: "content/german/blog"
|
||||
filter: {field: "type", value: "post"}
|
||||
create: true
|
||||
slug: "{{slug}}"
|
||||
editor:
|
||||
preview: false
|
||||
preview: true
|
||||
media_folder: '/static/media/blog'
|
||||
public_folder: '/media/blog'
|
||||
view_groups:
|
||||
- label: Drafts
|
||||
field: draft
|
||||
sortable_fields:
|
||||
fields: ['date', 'title']
|
||||
default:
|
||||
field: date
|
||||
direction: Descending
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Datum", name: "date", widget: "datetime", date_format: "DD.MM.YYYY", time_format: "HH:mm"}
|
||||
- {label: "Datum", name: "date", widget: "datetime", date_format: "dd/MM/yyyy", time_format: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", default: "", required: false}
|
||||
@ -508,25 +531,25 @@ collections:
|
||||
- label: "Beitragsautor"
|
||||
name: "author"
|
||||
widget: "relation"
|
||||
collection: "author-de"
|
||||
collection: "author"
|
||||
search_fields: ["title"]
|
||||
value_field: "title"
|
||||
display_fields: ["title"]
|
||||
- label: "Kategorien"
|
||||
name: "categories"
|
||||
widget: "list"
|
||||
required: false
|
||||
field: {label: "Kategorie", name: "category", widget: "string"}
|
||||
field: {label: "Kategorie", name: "category", widget: "array"}
|
||||
- label: "Tags"
|
||||
name: "tags"
|
||||
widget: "list"
|
||||
required: false
|
||||
field: {label: "Tag", name: "tag", widget: "string"}
|
||||
field: {label: "Tag", name: "tag", widget: "array"}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "post"}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
- name: "forms-de"
|
||||
label: "Formulare und Vorlagen"
|
||||
label_singular: "Formular"
|
||||
- name: "forms"
|
||||
icon: "document"
|
||||
label: "Dokumente"
|
||||
label_singular: "Dokument"
|
||||
description: "Hier sind Formulare, Vorlagen und andere Dokumente zu hinterlegen."
|
||||
folder: "content/german/forms"
|
||||
filter: {field: "type", value: "forms"}
|
||||
@ -538,29 +561,16 @@ collections:
|
||||
public_folder: '/media/forms'
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Veröffentlichungsdatum", name: "date", widget: "datetime", date_format: "DD.MM.YYYY", time_format: "HH:mm"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Bild", name: "image", widget: "image", default: "/media/image.png", required: false}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "forms"}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
- name: "anmeldung-de"
|
||||
label: "Anmeldung"
|
||||
label_singular: "Anmeldeinformation"
|
||||
folder: "content/german/anmeldung"
|
||||
filter: {field: "type", value: "anmeldung"}
|
||||
create: true
|
||||
editor:
|
||||
preview: false
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "anmeldung"}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
- name: "cantorpreis-de"
|
||||
label: "Cantor-Preisträger*innen"
|
||||
label_singular: "Cantor-Preisträger*in"
|
||||
- name: "cantorpreis"
|
||||
icon: "award"
|
||||
label: "Cantor-Preisträger"
|
||||
label_singular: "Cantor-Preisträger"
|
||||
folder: "content/german/cantorpreis"
|
||||
filter: {field: "type", value: "cantorpreis"}
|
||||
create: true
|
||||
@ -584,7 +594,8 @@ collections:
|
||||
- {label: "Link", name: "link", widget: "string"}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "cantorpreis"}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
- name: "ganztagsangebote-de"
|
||||
- name: "ganztagsangebote"
|
||||
icon: "group"
|
||||
label: "Ganztagsangebote"
|
||||
label_singular: "Ganztagsangebot"
|
||||
folder: "content/german/ganztagsangebote"
|
||||
@ -596,14 +607,11 @@ collections:
|
||||
public_folder: '/media/ganztagsangebote'
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Veröffentlichungsdatum", name: "date", widget: "datetime", date_format: "DD.MM.YYYY", time_format: "HH:mm"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Bild", name: "image", widget: "image", default: "/media/ganztagsangebote/image.png", required: false}
|
||||
- label: "Themenbereiche"
|
||||
name: "categories_ag"
|
||||
widget: "list"
|
||||
- {label: "Themenbereich", name: "category", widget: "string", required: true}
|
||||
- {label: "Dauer", name: "duration", widget: "string"}
|
||||
- {label: "Tag/Stunden", name: "weekly", widget: "string"}
|
||||
- {label: "Klassenstufen", name: "class", widget: "string"}
|
||||
@ -611,7 +619,8 @@ collections:
|
||||
- {label: "Anmeldelink", name: "apply_url", widget: "hidden", default: "https://moodle.bildung-lsa.de/gcg/mod/choice/view.php?id=828"}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "ganztagsangebote"}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
- name: "wettbewerbe-de"
|
||||
- name: "wettbewerbe"
|
||||
icon: "trophy"
|
||||
label: "Wettbewerbe"
|
||||
label_singular: "Wettbewerb"
|
||||
folder: "content/german/wettbewerbe"
|
||||
@ -623,7 +632,7 @@ collections:
|
||||
public_folder: '/media/contests'
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Bild", name: "image", widget: "image", default: "/media/image.png", required: false}
|
||||
@ -632,7 +641,8 @@ collections:
|
||||
- {label: "Website", name: "web_url", widget: "string", required: false}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "wettbewerbe"}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
- name: "begabtenfoerderung-de"
|
||||
- name: "begabtenfoerderung"
|
||||
icon: "book"
|
||||
label: "Begabtenförderung"
|
||||
label_singular: "Begabtenförderung"
|
||||
folder: "content/german/begabtenfoerderung"
|
||||
@ -644,7 +654,7 @@ collections:
|
||||
public_folder: '/media/begabtenfoerderung'
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: false, required: false}
|
||||
- {label: "Hintergrundbild", name: "bg_image", widget: "hidden", default: "/media/backgrounds/page-title.png"}
|
||||
- {label: "Metabeschreibung", name: "description", widget: "text", required: false}
|
||||
- {label: "Bild", name: "image", widget: "image", default: "/media/image.png", required: false}
|
||||
@ -654,23 +664,31 @@ collections:
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "begabtenfoerderung"}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
- name: "schulchronik"
|
||||
icon: "timeline"
|
||||
label: "Schulchronik"
|
||||
label_singular: "Chronikjahr"
|
||||
folder: "content/german/schulchronik"
|
||||
filter: {field: "type", value: "schulchronik"}
|
||||
create: true
|
||||
#editor:
|
||||
#preview: false
|
||||
media_folder: '/static/media/schulchronik'
|
||||
public_folder: '/media/schulchronik'
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {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: "Type", name: "type", widget: "hidden", default: "schulchronik"}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
- {label: "Einleitung", name: "pretext", hint: "Jahreszahltext", widget: "markdown", required: false}
|
||||
- label: "Kreative Haufen"
|
||||
name: "topics"
|
||||
widget: "list"
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string", required: true}
|
||||
- {label: "Element-ID", hint: "Kleingeschriebene Bezeichnung ohne Leer- und Sonderzeichen, darf sich nicht innerhalb einer Seite doppeln", name: "id", widget: "string", required: true}
|
||||
- {label: "Inhalt", name: "content", widget: "markdown", required: true}
|
||||
required: false
|
||||
- {label: "Text", name: "body", widget: "markdown", required: false, default: "{{< load-photoswipe >}}"}
|
||||
- name: "abiturienten"
|
||||
icon: "graduation-cap"
|
||||
label: "Abiturienten"
|
||||
label_singular: "Abiturjahrgang"
|
||||
folder: "content/german/abiturienten"
|
||||
@ -682,9 +700,9 @@ collections:
|
||||
public_folder: '/media/abiturienten'
|
||||
fields:
|
||||
- {label: "Titel", name: "title", widget: "string"}
|
||||
- {label: "Entwurf", name: "draft", widget: "boolean", default: "false", required: false}
|
||||
- {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: "Mehrere Bilder", name: "multiple", widget: "boolean", default: "false", required: false}
|
||||
- {label: "Mehrere Bilder", name: "multiple", widget: "boolean", default: false, required: false}
|
||||
- {label: "Type", name: "type", widget: "hidden", default: "abiturienten"}
|
||||
- {label: "Text", name: "body", widget: "markdown"}
|
||||
|
@ -1,202 +1,314 @@
|
||||
<!doctype html>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>GCG Website: Netlify CMS</title>
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
||||
<link rel="manifest" href="/site.webmanifest">
|
||||
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#1a1a37">
|
||||
<meta name="msapplication-TileColor" content="#1a1a37">
|
||||
<meta name="msapplication-TileImage" content="/mstile-144x144.png">
|
||||
<meta name="theme-color" content="#1a1a37">
|
||||
|
||||
|
||||
<link rel="stylesheet" href="https://cantorgymnasium.de/plugins/fontawesome/css/all.min.css">
|
||||
<title>Static CMS</title>
|
||||
</head>
|
||||
<body>
|
||||
<script src="https://unpkg.com/netlify-cms@^2.0.0/dist/netlify-cms.js"></script>
|
||||
<script src="https://sharadcodes.github.io/hugo-shortcodes-netlify-cms/dist/hugo_shortcodes_netlify_cms.js"></script>
|
||||
<style>
|
||||
body {
|
||||
font-family: sans-serif;
|
||||
}
|
||||
</style>
|
||||
<!-- Include the script that builds the page and powers Static CMS -->
|
||||
<script src="https://cdn.jsdelivr.net/npm/@staticcms/app@latest/dist/static-cms-app.js"></script>
|
||||
<script>
|
||||
CMS.registerEditorComponent({
|
||||
id: "collapsible-note",
|
||||
label: "Zugeklappter Abschnitt",
|
||||
collapsed: true,
|
||||
fields: [
|
||||
{
|
||||
name: 'summary',
|
||||
label: 'Titel',
|
||||
widget: 'string'
|
||||
},
|
||||
{
|
||||
name: 'details',
|
||||
label: 'Inhalt',
|
||||
widget: 'markdown'
|
||||
}
|
||||
],
|
||||
|
||||
pattern: /^{{% collapsible title=\"(.*?)\" %}}$\s*?(.*?)\n^{{% \/collapsible %}}$/ms,
|
||||
fromBlock: function(match) {
|
||||
return {
|
||||
summary: match[1],
|
||||
details: match[2]
|
||||
CMS.init();
|
||||
var icons = [['home', 'fa fa-house'], ['settings', 'fa fa-gear'], ['user', 'fa fa-user'], ['page', 'fa fa-file'], ['document', 'fa fa-file-lines'], ['news', 'fa fa-newspaper'], ['award', 'fa fa-award'], ['group', 'fa fa-people-group'], ['trophy', 'fa fa-trophy'], ['book', 'fa fa-book'], ['timeline', 'fa fa-timeline'], ['graduation-cap', 'fa fa-graduation-cap'], ['info', 'fa fa-circle-info']];
|
||||
icons.forEach(icon => {
|
||||
CMS.registerIcon(icon[0], ({}) => { return(h('i', {"className": icon[1]})); });
|
||||
});
|
||||
const CustomPage = () => {
|
||||
return h('div', {}, 'I am a custom page!');
|
||||
};
|
||||
},
|
||||
toBlock: function(data) {
|
||||
return `
|
||||
{{% collapsible title="${data.summary}" %}}
|
||||
|
||||
${data.details}
|
||||
|
||||
{{% /collapsible %}}
|
||||
`;
|
||||
CMS.registerAdditionalLink({
|
||||
id: 'info',
|
||||
title: 'Informationen',
|
||||
data: CustomPage,
|
||||
options: {
|
||||
icon: 'info',
|
||||
},
|
||||
toPreview: function(data) {
|
||||
return `
|
||||
<div class="container mb-0">
|
||||
<div class="card border-primary rounded-0 hover-shadow mb-5">
|
||||
<div class="card-body mb-0">
|
||||
<details class="mb-0">
|
||||
<summary class="mb-0">${data.summary}</summary>
|
||||
<div class="content"><p class="content">${data.details}</p></div>
|
||||
</details>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`;
|
||||
});
|
||||
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("\"","") ?? '';
|
||||
console.log(dir);
|
||||
return { dir: dir };
|
||||
}
|
||||
|
||||
return { dir: '' };
|
||||
},
|
||||
toArgs: ({ dir }) => {
|
||||
return [`dir=\"${dir}\"`];
|
||||
},
|
||||
control: ({ dir, onChange }) => {
|
||||
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: "),
|
||||
h('input', {
|
||||
key: 'control-input',
|
||||
value: dir,
|
||||
"style": {
|
||||
border: "1px solid #ced4da", borderRadius: "8px", padding: "10px", width: "80%"
|
||||
},
|
||||
onChange: event => {
|
||||
onChange({ dir: event.target.value });
|
||||
},
|
||||
}));
|
||||
},
|
||||
preview: ({ dir }) => {
|
||||
return h('div', {"className": "row", "style": { border: "1px solid #868686", borderRadius: "8px", padding: "10px" }},
|
||||
h('b', {"style": { marginRight: "5px" }}, "Gallerie-Ordner:"),
|
||||
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("\"","") ?? '';
|
||||
console.log(src);
|
||||
return { src };
|
||||
}
|
||||
|
||||
return { dir: '' };
|
||||
},
|
||||
toArgs: ({ src }) => {
|
||||
return [`src=\"${src}\"`];
|
||||
},
|
||||
/* control: ({ src, onChange, controlProps: { field, collection, entry } }) => {
|
||||
const controlID = useUUID();
|
||||
const handleOnChange = (newSrc) => {
|
||||
onChange(newSrc);
|
||||
}
|
||||
const handleOpenMediaLibrary = useMediaInsert(
|
||||
src,
|
||||
{ field, controlID },
|
||||
handleOnChange,
|
||||
);
|
||||
const assetSource = useMediaAsset(src, collection, field, entry);
|
||||
|
||||
return h('span', {}, [
|
||||
h('button', {
|
||||
key: 'control-button',
|
||||
onClick: handleOpenMediaLibrary,
|
||||
}, 'Click to open media library'),
|
||||
h(
|
||||
'img',
|
||||
{
|
||||
key: 'control-preview',
|
||||
src: assetSource,
|
||||
},
|
||||
'',
|
||||
),
|
||||
]);
|
||||
},*/
|
||||
control: ({ src, onChange }) => {
|
||||
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:"),
|
||||
h('input', {
|
||||
key: 'control-input',
|
||||
value: src,
|
||||
"style": {
|
||||
border: "1px solid #ced4da", borderRadius: "8px", padding: "10px", width: "80%"
|
||||
},
|
||||
onChange: event => {
|
||||
onChange({ src: event.target.value });
|
||||
},
|
||||
}));
|
||||
},
|
||||
preview: ({ src }) => {
|
||||
return h('div', {"className": "row", "style": { border: "1px solid #ccc", borderRadius: "16px", padding: "10px" }},
|
||||
h('b', {"style": { marginRight: "5px" }}, "Gallerie-Ordner:"),
|
||||
h('code', {}, src));
|
||||
},
|
||||
});
|
||||
CMS.registerShortcode('card', {
|
||||
label: 'Link-Karte',
|
||||
openTag: '{{< ',
|
||||
closeTag: ' >}}',
|
||||
separator: ' ',
|
||||
toProps: args => {
|
||||
if (args.length > 0) {
|
||||
var title = "";
|
||||
var link = "";
|
||||
console.log(args);
|
||||
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 }) => {
|
||||
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:"),
|
||||
h('input', {
|
||||
key: 'control-input',
|
||||
value: title,
|
||||
"style": {
|
||||
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,
|
||||
"style": {
|
||||
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 }) => {
|
||||
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),
|
||||
),
|
||||
h('a', {"className": "mb-0 btn btn-primary btn-sm text-decoration-none", "href": link}, "Mehr anzeigen")
|
||||
)))},
|
||||
});
|
||||
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 }) => {
|
||||
return h('div', {"className": "row", "style": { border: "1px solid #868686", borderRadius: "8px", padding: "10px" }},
|
||||
h('b', {"style": {fontFamily: "sans-serif", margin: "10px"}}, "YoutTube-Video:"),
|
||||
h('input', {
|
||||
key: 'control-input',
|
||||
value: src,
|
||||
"style": {
|
||||
border: "1px solid #ced4da", borderRadius: "8px", padding: "10px", width: "80%"
|
||||
},
|
||||
onChange: event => {
|
||||
onChange({ src: event.target.value });
|
||||
},
|
||||
}),
|
||||
h('div', {"className": "row", "style": {"marginTop": "10px"}},
|
||||
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}`,
|
||||
},
|
||||
'',
|
||||
),
|
||||
);
|
||||
},
|
||||
});
|
||||
CMS.registerShortcode('load-photoswipe', {
|
||||
label: 'Gallerie-Servicemodul',
|
||||
openTag: '{{< ',
|
||||
closeTag: ' >}}',
|
||||
separator: '',
|
||||
control: () => {
|
||||
return h('div', {"style": { border: "1px solid #868686", borderRadius: "8px", padding: "10px" }},
|
||||
h('b', {"style": {fontFamily: "sans-serif", margin: "10px"}}, "Gallerie-Servicemodul"));
|
||||
},
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
CMS.registerEditorComponent({
|
||||
id: "content",
|
||||
label: "\"content\"-Tag",
|
||||
collapsed: false,
|
||||
fields: [
|
||||
{
|
||||
name: 'details',
|
||||
label: 'Inhalt',
|
||||
widget: 'markdown'
|
||||
}
|
||||
],
|
||||
const CategoriesControl = ({ label, value, field, onChange }) => {
|
||||
const separator = useMemo(() => field.separator ?? ', ', [field.separator]);
|
||||
|
||||
pattern: /^{{% content %}}$\s*?(.*?)\n^{{% \/content %}}$/ms,
|
||||
fromBlock: function(match) {
|
||||
return {
|
||||
details: match[1]
|
||||
const handleChange = useCallback((e) => {
|
||||
onChange(e.target.value.split(separator).map(e => e.trim()));
|
||||
}, [separator, onChange]);
|
||||
|
||||
return h('div', {},
|
||||
h('label', { for: 'inputId' }, label),
|
||||
h('input', {
|
||||
id: 'inputId',
|
||||
type: 'text',
|
||||
value: value ? value.join(separator) : '',
|
||||
onChange: this.handleChange,
|
||||
})
|
||||
);
|
||||
};
|
||||
},
|
||||
toBlock: function(data) {
|
||||
return `
|
||||
{{% content %}}
|
||||
|
||||
${data.details}
|
||||
|
||||
{{% /content %}}
|
||||
`;
|
||||
},
|
||||
toPreview: function(data) {
|
||||
return `
|
||||
<div class="content">
|
||||
${data.details}
|
||||
</div>
|
||||
`;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<script>
|
||||
CMS.registerEditorComponent({
|
||||
id: "card",
|
||||
label: "Link-Karte",
|
||||
collapsed: false,
|
||||
fields: [
|
||||
{
|
||||
name: 'link',
|
||||
label: 'Link',
|
||||
widget: 'string'
|
||||
},
|
||||
{
|
||||
name: 'title',
|
||||
label: 'Bezeichnung',
|
||||
widget: 'string'
|
||||
}
|
||||
],
|
||||
|
||||
pattern: /^{{< card link=\"(.*?)\" title=\"(.*?)\" >}}/,
|
||||
fromBlock: function(match) {
|
||||
return {
|
||||
link: match[1],
|
||||
title: match[2]
|
||||
const CategoriesPreview = ({ value }) => {
|
||||
return h(
|
||||
'ul',
|
||||
{},
|
||||
value.map(function (val, index) {
|
||||
return h('li', { key: index }, val);
|
||||
}),
|
||||
);
|
||||
};
|
||||
},
|
||||
toBlock: function(data) {
|
||||
return `
|
||||
{{< card link="${data.link}" title="${data.title}" >}}
|
||||
`;
|
||||
},
|
||||
toPreview: function(data) {
|
||||
return `
|
||||
<div class="container mb-0">
|
||||
<div class="card border-primary rounded-0 hover-shadow mb-5">
|
||||
<div class="card-body mb-0">
|
||||
<h4 class="card-title"><a class="text-decoration-none" href='${data.link}'>${data.title}</a></h4>
|
||||
<a href='${data.link}' class="mb-0 btn btn-primary btn-sm text-decoration-none">{{ i18n "show_more"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
`;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<!-- <script>
|
||||
CMS.registerPreviewStyle("https://eesev9ie.github.io/style.css");
|
||||
CMS.registerEditorComponent({
|
||||
id: "gallery",
|
||||
label: "Bildergallerie",
|
||||
fields: [{
|
||||
name: "dir",
|
||||
label: "Ordner",
|
||||
widget: "string"
|
||||
const schema = {
|
||||
properties: {
|
||||
separator: { type: 'string' },
|
||||
},
|
||||
],
|
||||
pattern: /{{< gallery dir="([a-zA-Z0-9]+)" />}}/,
|
||||
fromBlock: function(match) {
|
||||
return {
|
||||
username: dir[1],
|
||||
};
|
||||
},
|
||||
toBlock: function(obj) {
|
||||
return `{{< gallery dir="${obj.dir}" />}}`;
|
||||
},
|
||||
toPreview: function(obj) {
|
||||
return `{{< gallery dir="${obj.dir}" />}}`;
|
||||
},
|
||||
});
|
||||
</script> -->
|
||||
<script>
|
||||
CMS.registerEditorComponent({
|
||||
id: "gallery-dir",
|
||||
label: "Gallerie",
|
||||
fields: [{
|
||||
name: "dir",
|
||||
label: "Ordner",
|
||||
widget: "string"
|
||||
}],
|
||||
pattern: /{{< gallery dir=\"(.*?)\" \/>}}/,
|
||||
fromBlock: function(match) {
|
||||
return {
|
||||
dir: match[1],
|
||||
};
|
||||
},
|
||||
toBlock: function(obj) {
|
||||
return `{{< gallery dir=\"${obj.dir}\" \/>}}`;
|
||||
},
|
||||
toPreview: function(obj) {
|
||||
return `{{< gallery dir=\"${obj.dir}\" \/>}}`;
|
||||
},
|
||||
});
|
||||
|
||||
CMS.registerWidget('categories', CategoriesControl, CategoriesPreview, schema);
|
||||
</script>
|
||||
<script>
|
||||
CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/bootstrap/bootstrap.min.css");
|
||||
@ -208,24 +320,20 @@ CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/fira/fira.css");
|
||||
CMS.registerPreviewStyle("https://cantorgymnasium.de/scss/style.css");
|
||||
</script>
|
||||
<script>
|
||||
var PostPreview = createClass({
|
||||
render: function() {
|
||||
var entry = this.props.entry;
|
||||
var image = entry.getIn(['data', 'image']);
|
||||
var bg = this.props.getAsset(image);
|
||||
var ChronikPreview = ({widgetFor, widgetsFor, entry, document, window }) => {
|
||||
const divStyle = {
|
||||
backgroundImage: 'url("/media/backgrounds/page-title.png"),url("/media/backgrounds/page-title.png")',
|
||||
};
|
||||
return h('div', {},
|
||||
return h('div', {"id": "sc-root"},
|
||||
h('section', {"className": "page-title-section overlay", "style": divStyle},
|
||||
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.getIn(['data', 'title']))
|
||||
h('li', {"className": "list-inline-item text-white h2 font-secondary"}, entry.data.title)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -233,24 +341,82 @@ var PostPreview = createClass({
|
||||
h('section', {"className": "section-sm"},
|
||||
h('div', {"className": "container"},
|
||||
h('div', {"className": "row"},
|
||||
h('div', {"className": "col-12 mb-4"}, this.props.widgetFor('body'))
|
||||
h('div', {"className": "col-12 mb-4 content"},
|
||||
widgetsFor('topics').map(function(i, index) {
|
||||
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"},
|
||||
h('span', {"ariaHidden": "true"}, '\u{00d7}')
|
||||
)
|
||||
),
|
||||
h('div', {"className": "modal-body"},
|
||||
h('div', {"className": "content"}, i.content)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}),
|
||||
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"},
|
||||
h('span', {"ariaHidden": "true"}, '\u{00d7}')
|
||||
)
|
||||
),
|
||||
h('div', {"className": "modal-body"},
|
||||
h('div', {"className": "content"}, widgetFor('pretext'))
|
||||
)
|
||||
)
|
||||
)
|
||||
) : 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');
|
||||
script.src = "https://cantorgymnasium.de/plugins/wordcloud/wordcloud2.min.js";
|
||||
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')
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
};
|
||||
|
||||
CMS.registerPreviewTemplate("schulchronik", PostPreview);
|
||||
CMS.registerPreviewTemplate("schuelerrat-index", PostPreview);
|
||||
CMS.registerPreviewTemplate("schulchronik", ChronikPreview);
|
||||
|
||||
</script>
|
||||
<script>
|
||||
var PostPreviewContent = createClass({
|
||||
render: function() {
|
||||
var entry = this.props.entry;
|
||||
var image = entry.getIn(['data', 'image']);
|
||||
var bg = this.props.getAsset(image);
|
||||
var PostPreviewContent = ({widgetFor, entry}) => {
|
||||
const divStyle = {
|
||||
backgroundImage: 'url("/media/backgrounds/page-title.png"),url("/media/backgrounds/page-title.png")',
|
||||
};
|
||||
@ -259,11 +425,13 @@ var PostPreviewContent = createClass({
|
||||
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('a', {"className": "text-primary font-secondary", href: ""}, "Schulchronik")),
|
||||
h('li', {"className": "list-inline-item ha"},
|
||||
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": "fa-solid fa-angle-right text-white"})),
|
||||
h('li', {"className": "list-inline-item text-white h1 font-secondary"}, entry.getIn(['data', 'title']))
|
||||
h('li', {"className": "list-inline-item text-white h2 font-secondary"}, entry.data.title)
|
||||
),
|
||||
h('p', {"className": "text-lighten"}, entry.data.description
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -272,26 +440,78 @@ var PostPreviewContent = createClass({
|
||||
h('div', {"className": "container"},
|
||||
h('div', {"className": "row"},
|
||||
h('div', {"className": "col-12 mb-4"},
|
||||
h('div', {"className": "content"}, this.props.widgetFor('body'))
|
||||
h('div', {"className": "content"}, widgetFor('body'))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
CMS.registerPreviewTemplate("anmeldung-index", PostPreviewContent);
|
||||
CMS.registerPreviewTemplate("impressum", PostPreviewContent);
|
||||
CMS.registerPreviewTemplate("datenschutz", PostPreviewContent);
|
||||
CMS.registerPreviewTemplate("schuelerrat-geschaeftsordnung", PostPreviewContent);
|
||||
CMS.registerPreviewTemplate("schuelervertretung-index", PostPreviewContent);
|
||||
CMS.registerPreviewTemplate("elternvertretung-index", PostPreviewContent);
|
||||
CMS.registerPreviewTemplate("jia-index", PostPreviewContent);
|
||||
CMS.registerPreviewTemplate("bibo", PostPreviewContent);
|
||||
CMS.registerPreviewTemplate("abiturienten", PostPreviewContent);
|
||||
CMS.registerPreviewTemplate("cantorfora", PostPreviewContent);
|
||||
CMS.registerPreviewTemplate("contact-index", PostPreviewContent);
|
||||
|
||||
</script>
|
||||
<script>
|
||||
var EventPreview = createClass({
|
||||
render: function() {
|
||||
var entry = this.props.entry;
|
||||
var image = entry.getIn(['data', 'image']);
|
||||
var bg = this.props.getAsset(image);
|
||||
var AnmeldungPreviewContent = ({widgetsFor, widgetFor, entry}) => {
|
||||
const divStyle = {
|
||||
backgroundImage: 'url("/media/backgrounds/page-title.png"),url("/media/backgrounds/page-title.png")',
|
||||
};
|
||||
return h('div', {},
|
||||
h('section', {"className": "page-title-section overlay", "style": divStyle},
|
||||
h('div', {"className": "container"},
|
||||
h('div', {"className": "col-md-8"},
|
||||
h('ul', {"className": "list-inline custom-breadcrumb"},
|
||||
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": "fa-solid fa-angle-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 mb-5"},
|
||||
h('div', {"className": "col-md-6 content"},
|
||||
widgetFor('body')
|
||||
)
|
||||
),
|
||||
h('div', {"className": "row"},
|
||||
widgetsFor('elements').map(function(element, index) {
|
||||
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"},
|
||||
h('h4', {"className": "card-title mb-3"},
|
||||
element.data.title
|
||||
),
|
||||
h('div', {"className": "content"},
|
||||
element.widgets.content
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
})
|
||||
)
|
||||
)
|
||||
),
|
||||
);
|
||||
};
|
||||
CMS.registerPreviewTemplate("anmeldung-index", AnmeldungPreviewContent);
|
||||
</script>
|
||||
<script>
|
||||
var EventPreview = ({widgetsFor, entry}) => {
|
||||
const divStyle = {
|
||||
backgroundImage: 'url("/media/backgrounds/page-title.png"),url("/media/backgrounds/page-title.png")',
|
||||
};
|
||||
@ -301,16 +521,16 @@ var EventPreview = createClass({
|
||||
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.getIn(['data', 'title'])
|
||||
h('li', {"className": "list-inline-item text-white h2 font-secondary"}, entry.data.title
|
||||
)
|
||||
),
|
||||
h('p', {"className": "text-lighten"}, entry.getIn(['data', 'description']))
|
||||
h('p', {"className": "text-lighten"}, entry.data.description)
|
||||
)
|
||||
)
|
||||
)
|
||||
@ -320,20 +540,21 @@ var EventPreview = createClass({
|
||||
h('div', {"className": "row"},
|
||||
h('div', {"className": "col-12 "},
|
||||
h('ul', {"className": "list-unstyled"},
|
||||
this.props.widgetsFor('events').map(function(event, index) {
|
||||
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('span', {"className": "h2 d-block"}, new Intl.DateTimeFormat('de-De', { day: 'numeric'}).format(event.getIn(['data', 'date']))),
|
||||
new Intl.DateTimeFormat('de-De', { month: 'short', year: 'numeric' }).format(event.getIn(['data', 'date']))
|
||||
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))
|
||||
),
|
||||
h('div', {"className": "d-md-table-cell px-4 vertical-alighn-middle mb-4 mb-md-0"},
|
||||
h('p', {"className": "h4 mb-3 d-block"}, event.getIn(['data', 'title'])),
|
||||
h('p', {"className": "mb-0"}, event.getIn(['data', 'summary']))
|
||||
h('p', {"className": "h4 mb-3 d-block"}, event.data.title),
|
||||
h('p', {"className": "mb-0"}, event.data.summary)
|
||||
),
|
||||
h('div', {"className": "d-md-table-cell text-right pr-0 pr-md-4"},
|
||||
h('p', {},
|
||||
h('i', {"className": "fa-solid fa-location-dot text-primary mr-2"}),
|
||||
event.getIn(['data', 'location'])
|
||||
event.data.location
|
||||
)
|
||||
)
|
||||
);
|
||||
@ -344,18 +565,11 @@ var EventPreview = createClass({
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
CMS.registerPreviewTemplate("event-index", EventPreview);
|
||||
|
||||
</script>
|
||||
<script>
|
||||
var PagePreview = createClass({
|
||||
render: function() {
|
||||
var entry = this.props.entry;
|
||||
var image = entry.getIn(['data', 'image']);
|
||||
var bg = this.props.getAsset(image);
|
||||
var PagePreview = ({widgetFor, entry}) => {
|
||||
const divStyle = {
|
||||
backgroundImage: 'url("/media/backgrounds/page-title.png"),url("/media/backgrounds/page-title.png")',
|
||||
};
|
||||
@ -365,38 +579,51 @@ var PagePreview = createClass({
|
||||
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.getIn(['data', 'title'])
|
||||
h('li', {"className": "list-inline-item text-white h2 font-secondary"}, entry.data.title
|
||||
)
|
||||
),
|
||||
h('p', {"className": "text-lighten"}, entry.getIn(['data', 'description']))
|
||||
h('p', {"className": "text-lighten"}, entry.data.description)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
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);
|
||||
|
||||
CMS.registerPreviewTemplate("begabtenfoerderung-index", PagePreview);
|
||||
</script>
|
||||
<script>
|
||||
var PagePreviewImage = createClass({
|
||||
render: function() {
|
||||
var entry = this.props.entry;
|
||||
var image = entry.getIn(['data', 'image']);
|
||||
var bg = this.props.getAsset(image);
|
||||
var PagePreviewImage = ({ widgetFor, 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.png"),url("/media/backgrounds/page-title.png")',
|
||||
};
|
||||
@ -406,17 +633,17 @@ var PagePreviewImage = createClass({
|
||||
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.getIn(['data', 'title'])
|
||||
h('li', {"className": "list-inline-item text-white h2 font-secondary"}, entry.data.title
|
||||
)
|
||||
),
|
||||
h('p', {"className": "text-lighten"}, entry.getIn(['data', 'description']))
|
||||
)
|
||||
h('p', {"className": "text-lighten"}, entry.data.description
|
||||
))
|
||||
)
|
||||
)
|
||||
),
|
||||
@ -424,17 +651,15 @@ var PagePreviewImage = createClass({
|
||||
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: bg.toString(), alt: "about image"}),
|
||||
this.props.widgetFor('body'))
|
||||
h('img', {"className": "img-fluid w-100 mb-4", src: imageUrl}),
|
||||
widgetFor('body'))
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
};
|
||||
CMS.registerPreviewTemplate("about-index", PagePreviewImage);
|
||||
|
||||
CMS.registerPreviewTemplate("blog", PagePreviewImage);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
x
Reference in New Issue
Block a user