Wechsel zu MDI
This commit is contained in:
2023-02-08 15:49:01 +01:00
parent e09604278d
commit 9d624a904a
31 changed files with 130 additions and 150 deletions

View File

@ -52,7 +52,7 @@ collections:
- {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, hint: "Liste unter https://fontawesome.com/search"}
- {label: "Symbol", name: "icon", widget: "string", required: false, hint: "Liste unter https://pictogrammers.com/library/mdi/"}
- label: "Zeitschaltung"
name: temporarily
widget: "object"
@ -140,7 +140,7 @@ collections:
widget: "list"
fields:
- {label: "Bezeichnung", name: "name", widget: "string", required: false}
- {label: "Symbol", name: "icon", widget: "string", required: false, hint: "Liste unter https://fontawesome.com/search"}
- {label: "Symbol", name: "icon", widget: "string", required: false, hint: "Liste unter https://pictogrammers.com/library/mdi/"}
- {label: "Bild", name: "image", widget: "image", required: false, media_library: { config: { max_file_size: 2048000 } } }
- {label: "Inhalt", name: "content", widget: "markdown", required: false}
- label: "Ganztagsangebote"
@ -282,7 +282,7 @@ collections:
widget: "list"
fields:
- {label: "Bezeichnung", name: "title", widget: "string"}
- {label: "Symbol", name: "icon", widget: "string", hint: "Liste unter https://fontawesome.com/search"}
- {label: "Symbol", name: "icon", widget: "string", hint: "Liste unter https://pictogrammers.com/library/mdi/"}
- {label: "Link", name: "link", widget: "string"}
- label: "Menü"
name: "menu"
@ -529,7 +529,7 @@ collections:
- {label: "Gallerie-Komponente", name: "gallery", widget: "boolean", default: false, required: false, hint: "Benötigt für Gallerie bzw. Bildeinbettung"}
- {label: "Text", name: "body", widget: "markdown", required: false}
- name: "pages"
icon: "page"
icon: "page-add"
label: "Zusatzseiten"
label_singular: "Zusatzseite"
folder: "content/german/pages"
@ -582,18 +582,19 @@ collections:
name: "icon"
widget: "select"
options:
- { label: "YouTube", value: "fa-brands fa-youtube" }
- { label: "Twitter", value: "fa-brands fs-twitter" }
- { label: "Pinterest", value: "fa-brands fa-pinterest" }
- { label: "GitHub", value: "fa-brands fa-github" }
- { label: "Git", value: "fa-brands fa-git-alt" }
- { label: "Vimeo", value: "fa-brands fa-vimeo" }
- { label: "Instagram", value: "fa-brands fa-instagram" }
- { label: "Facebook", value: "fa-brands fa-facebook" }
- { label: "Linkedin", value: "fa-brands fa-linkedin" }
- { label: "E-Mail", value: "fa-solid fa-at" }
- { label: "TikTok", value: "fa-brands fa-tiktok" }
- { label: "Sonstige", value: "fa-solid fa-share-nodes" }
- { label: "YouTube", value: "si si-youtube" }
- { label: "Twitter", value: "si si-twitter" }
- { label: "Pinterest", value: "si si-pinterest" }
- { label: "GitHub", value: "si si-github" }
- { label: "Gitea", value: "si si-gitea" }
- { label: "Git", value: "si si-git" }
- { label: "Vimeo", value: "si si-vimeo" }
- { label: "Instagram", value: "si si-instagram" }
- { label: "Facebook", value: "si si-facebook" }
- { label: "Linkedin", value: "si si-linkedin" }
- { label: "E-Mail", value: "mdi mdi-at" }
- { label: "TikTok", value: "si si-tiktok" }
- { label: "Sonstige", value: "mdi mdi-share-variant-outline" }
- {label: "Link", name: "link", widget: "string"}
- {label: "Beschreibung", name: "body", widget: "markdown"}
- name: "blog"
@ -717,18 +718,19 @@ collections:
name: "icon"
widget: "select"
options:
- { label: "YouTube", value: "fa-brands fa-youtube" }
- { label: "Twitter", value: "fa-brands fs-twitter" }
- { label: "Pinterest", value: "fa-brands fa-pinterest" }
- { label: "GitHub", value: "fa-brands fa-github" }
- { label: "Git", value: "fa-brands fa-git-alt" }
- { label: "Vimeo", value: "fa-brands fa-vimeo" }
- { label: "Instagram", value: "fa-brands fa-instagram" }
- { label: "Facebook", value: "fa-brands fa-facebook" }
- { label: "Linkedin", value: "fa-brands fa-linkedin" }
- { label: "E-Mail", value: "fa-solid fa-at" }
- { label: "TikTok", value: "fa-brands fa-tiktok" }
- { label: "Sonstige", value: "fa-solid fa-share-nodes" }
- { label: "YouTube", value: "si si-youtube" }
- { label: "Twitter", value: "si si-twitter" }
- { label: "Pinterest", value: "si si-pinterest" }
- { label: "GitHub", value: "si si-github" }
- { label: "Gitea", value: "si si-gitea" }
- { label: "Git", value: "si si-git" }
- { label: "Vimeo", value: "si si-vimeo" }
- { label: "Instagram", value: "si si-instagram" }
- { label: "Facebook", value: "si si-facebook" }
- { label: "Linkedin", value: "si si-linkedin" }
- { label: "E-Mail", value: "mdi mdi-at" }
- { label: "TikTok", value: "si si-tiktok" }
- { label: "Sonstige", value: "mdi mdi-share-variant-outline" }
- {label: "Link", name: "link", widget: "string"}
- {label: "Type", name: "type", widget: "hidden", default: "cantorpreis"}
- {label: "Gallerie-Komponente", name: "gallery", widget: "boolean", default: false, required: false, hint: "Benötigt für Gallerie bzw. Bildeinbettung"}
@ -801,7 +803,7 @@ collections:
- {label: "Gallerie-Komponente", name: "gallery", widget: "boolean", default: false, required: false, hint: "Benötigt für Gallerie bzw. Bildeinbettung"}
- {label: "Text", name: "body", widget: "markdown"}
- name: "begabte"
icon: "book"
icon: "pi"
label: "Begabtenförderung"
label_singular: "Begabtenförderung"
folder: "content/german/begabte"
@ -833,7 +835,7 @@ collections:
- {label: "Gallerie-Komponente", name: "gallery", widget: "boolean", default: false, required: false, hint: "Benötigt für Gallerie bzw. Bildeinbettung"}
- {label: "Text", name: "body", widget: "markdown"}
- name: "schulchronik"
icon: "timeline"
icon: "pillar"
label: "Schulchronik"
label_singular: "Chronikjahr"
folder: "content/german/schulchronik"

View File

@ -3,7 +3,7 @@
<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">
<link rel="stylesheet" href="/plugins/mdi/css/materialdesignicons.min.css">
<title>Static CMS</title>
</head>
<body>
@ -11,13 +11,16 @@
body {
font-family: sans-serif;
}
.icon-md {
font-size: 25px;
}
</style>
<script src="https://cdn.jsdelivr.net/npm/@staticcms/app@^1.2.7/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'], ['desktop', 'fa-solid fa-desktop'], ['bookmark', 'fa-solid fa-bookmark'], ['presentation', 'fa-solid fa-person-chalkboard']];
var icons = [['settings', 'mdi mdi-cog-outline'], ['user', 'mdi mdi-fountain-pen-tip'], ['page', 'mdi mdi-file-document-outline'], ['page-add', 'mdi mdi-file-document-plus-outline'], ['document', 'mdi mdi-file-document-multiple-outline'], ['news', 'mdi mdi-newspaper'], ['award', 'mdi mdi-seal-variant'], ['group', 'mdi mdi-crowd'], ['trophy', 'mdi mdi-trophy-outline'], ['pi', 'mdi mdi-pi-box'], ['pillar', 'mdi mdi-pillar'], ['graduation-cap', 'mdi mdi-school-outline'], ['help', 'mdi mdi-lifebuoy'], ['dash', 'mdi mdi-monitor-dashboard'], ['presentation', 'mdi mdi-presentation']];
icons.forEach(icon => {
CMS.registerIcon(icon[0], ({}) => { return(h('i', {"className": icon[1]})); });
CMS.registerIcon(icon[0], ({}) => { return(h('i', {"className": icon[1] + " icon-md"})); });
});
const StatusPage = () => {
return h('div', {className: "row"},
@ -49,7 +52,7 @@
title: 'Status',
data: StatusPage,
options: {
icon: 'desktop',
icon: 'dash',
},
});
CMS.registerAdditionalLink({
@ -57,7 +60,7 @@
title: 'GCG.Wiki',
data: 'https://wiki.cantorgymnasium.de',
options: {
icon: 'bookmark',
icon: 'help',
},
});
CMS.registerShortcode('gallery', {
@ -335,8 +338,8 @@
</script>
<script>
CMS.registerPreviewStyle("https://cantorgymnasium.de/plugins/bootstrap/bootstrap.min.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/plugins/mdi/css/materialdesignicons.min.css");
CMS.registerPreviewStyle("https://cantorgymnasium.de/scss/style.css");
</script>
<script>
@ -348,11 +351,11 @@
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('ul', {"className": "list-inline"},
h('li', {"className": "list-inline-item h2"},
h('a', {"className": "text-primary font-secondary", href: ""}, "Schulchronik")),
h('li', {"className": "list-inline-item h2"},
h("i", {"className": "fa-solid fa-angle-right text-white"})),
h("i", {"className": "mdi mdi-chevron-double-right text-white"})),
h('li', {"className": "list-inline-item text-white h2 font-secondary"}, entry.data.title)
)
)
@ -444,11 +447,11 @@
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('ul', {"className": "list-inline"},
h('li', {"className": "list-inline-item h2"},
h('a', {"className": "text-primary font-secondary", href: ""}, "Startseite")),
h('li', {"className": "list-inline-item h2"},
h("i", {"className": "fa-solid fa-angle-right text-white"})),
h("i", {"className": "mdi mdi-chevron-double-right text-white"})),
h('li', {"className": "list-inline-item text-white h2 font-secondary"}, entry.data.title)
),
h('p', {"className": "text-lighten"}, entry.data.description
@ -483,11 +486,11 @@
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('ul', {"className": "list-inline"},
h('li', {"className": "list-inline-item h2"},
h('a', {"className": "text-primary font-secondary", href: ""}, "Startseite")),
h('li', {"className": "list-inline-item h2"},
h("i", {"className": "fa-solid fa-angle-right text-white"})),
h("i", {"className": "mdi mdi-chevron-double-right text-white"})),
h('li', {"className": "list-inline-item text-white h2 font-secondary"}, entry.data.title)
),
h('p', {"className": "text-lighten"}, entry.data.description
@ -534,12 +537,12 @@
h('div', {"className": "row"},
h('div', {"className": "container"},
h('div', {"className": "col-md-8"},
h('ul', {"className": "list-inline custom-breadcrumb"},
h('ul', {"className": "list-inline"},
h('li', {"className": "list-inline-item h2"},
h('a', {"className": "text-primary font-secondary", href: ""}, "Startseite")
),
h('li', {"className": "list-inline-item h2"},
h("i", {"className": "fa-solid fa-angle-right text-white"})
h("i", {"className": "mdi mdi-chevron-double-right text-white"})
),
h('li', {"className": "list-inline-item text-white h2 font-secondary"}, entry.data.title
)
@ -566,7 +569,7 @@
),
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"}),
h('i', {"className": "mdi mdi-map-marker-radius-outline icon-s text-primary mr-2"}),
event.data.location
)
)
@ -591,12 +594,12 @@
h('div', {"className": "row"},
h('div', {"className": "container"},
h('div', {"className": "col-md-8"},
h('ul', {"className": "list-inline custom-breadcrumb"},
h('ul', {"className": "list-inline"},
h('li', {"className": "list-inline-item h2"},
h('a', {"className": "text-primary font-secondary", href: ""}, "Startseite")
),
h('li', {"className": "list-inline-item h2"},
h("i", {"className": "fa-solid fa-angle-right text-white"})
h("i", {"className": "mdi mdi-chevron-double-right text-white"})
),
h('li', {"className": "list-inline-item text-white h2 font-secondary"}, entry.data.title
)
@ -645,12 +648,12 @@
h('div', {"className": "row"},
h('div', {"className": "container"},
h('div', {"className": "col-md-8"},
h('ul', {"className": "list-inline custom-breadcrumb"},
h('ul', {"className": "list-inline"},
h('li', {"className": "list-inline-item h2"},
h('a', {"className": "text-primary font-secondary", href: ""}, "Startseite")
),
h('li', {"className": "list-inline-item h2"},
h("i", {"className": "fa-solid fa-angle-right text-white"})
h("i", {"className": "mdi mdi-chevron-double-right text-white"})
),
h('li', {"className": "list-inline-item text-white h2 font-secondary"}, entry.data.title
)
@ -705,12 +708,12 @@
h('div', {"className": "row"},
h('div', {"className": "container"},
h('div', {"className": "col-md-8"},
h('ul', {"className": "list-inline custom-breadcrumb"},
h('ul', {"className": "list-inline"},
h('li', {"className": "list-inline-item h2"},
h('a', {"className": "text-primary font-secondary", href: ""}, "Startseite")
),
h('li', {"className": "list-inline-item h2"},
h("i", {"className": "fa-solid fa-angle-right text-white"})
h("i", {"className": "mdi mdi-chevron-double-right text-white"})
),
h('li', {"className": "list-inline-item text-white h2 font-secondary"}, entry.data.title
)