gcg-website/static/admin/index.html
Denys Konovalov 83d93c212d cms
2022-03-27 15:38:20 +02:00

464 lines
16 KiB
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">
</head>
<body>
<!-- Include the script that builds the page and powers Netlify CMS -->
<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: /^{{% open-element title=\"(.*?)\" %}}$\s*?(.*?)\n^{{% \/open-element %}}$/ms,
fromBlock: function(match) {
return {
summary: match[1],
details: match[2]
};
},
toBlock: function(data) {
return `
{{% open-element title="${data.summary}" %}}
${data.details}
{{% /open-element %}}
`;
},
toPreview: function(data) {
return `
<div class="container">
<div class="card border-primary rounded-0 hover-shadow mb-5">
<div class="card-body">
<details>
<summary>${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">
<div class="card border-primary rounded-0 hover-shadow mb-5">
<div class="card-body">
<h4 class="card-title"><a href='${data.link}'>${data.title}</a></h4>
<a href='${data.link}' class="btn btn-primary btn-sm">Mehr anzeigen</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.registerEditorComponent({
id: "gallery-script",
label: "Gallerie-Skript (Immer am Anfang hinzufügen)",
fields: [],
collapsed:true,
pattern: /{{< load-photoswipe >}}/,
fromBlock: function(match) {
return {
};
},
toBlock: function(obj) {
return `{{< load-photoswipe >}}`;
},
toPreview: function(obj) {
return ``;
},
});
</script>
<script>
CMS.registerPreviewStyle("https://neu.cantorgymnasium.de/plugins/bootstrap/bootstrap.min.css");
CMS.registerPreviewStyle("https://neu.cantorgymnasium.de/plugins/slick/slick.css");
CMS.registerPreviewStyle("https://neu.cantorgymnasium.de/plugins/animate/animate.css");
CMS.registerPreviewStyle("https://neu.cantorgymnasium.de/plugins/venobox/venobox.css");
CMS.registerPreviewStyle("https://neu.cantorgymnasium.de/plugins/themify-icons/themify-icons.css");
CMS.registerPreviewStyle("https://neu.cantorgymnasium.de/plugins/fira/fira.css");
CMS.registerPreviewStyle("https://neu.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": "ti-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": "ti-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": "ti-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": "ti-location-pin 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": "ti-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": "ti-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>
<!-- src: bg.toString()}),-->