2020-07-11 13:45:14 +02:00
|
|
|
<!doctype html>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
2020-07-17 21:10:26 +02:00
|
|
|
<title>GCG WebAdmin</title>
|
2020-07-11 13:45:14 +02:00
|
|
|
</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>
|
2020-10-01 15:52:38 +02:00
|
|
|
<script src="https://sharadcodes.github.io/hugo-shortcodes-netlify-cms/dist/hugo_shortcodes_netlify_cms.js"></script>
|
|
|
|
<script>
|
2020-10-02 15:25:35 +02:00
|
|
|
CMS.registerPreviewStyle("https://eesev9ie.github.io/style.css");
|
|
|
|
CMS.registerEditorComponent({
|
|
|
|
id: "gallery",
|
|
|
|
label: "Bildergallerie",
|
2020-10-02 15:32:22 +02:00
|
|
|
fields: [{
|
2020-10-02 15:25:35 +02:00
|
|
|
name: "dir",
|
|
|
|
label: "Ordner",
|
|
|
|
widget: "string"
|
|
|
|
},
|
2020-10-02 15:32:22 +02:00
|
|
|
],
|
2020-10-02 15:47:54 +02:00
|
|
|
pattern: /{{< gallery dir=([a-zA-Z0-9]+) />}}/,
|
2020-10-02 15:25:35 +02:00
|
|
|
fromBlock: function(match) {
|
|
|
|
return {
|
|
|
|
username: dir[1],
|
|
|
|
};
|
|
|
|
},
|
|
|
|
toBlock: function(obj) {
|
|
|
|
return `{{< gallery ${obj.dir} >}}`;
|
|
|
|
},
|
|
|
|
toPreview: function(obj) {
|
|
|
|
return `{{< gallery ${obj.dir} >}}`;
|
|
|
|
},
|
|
|
|
});
|
2020-10-01 15:52:38 +02:00
|
|
|
</script>
|
2020-07-11 13:45:14 +02:00
|
|
|
</body>
|
|
|
|
</html>
|