cms statistik

This commit is contained in:
2023-02-28 21:45:01 +01:00
parent ad55e152d1
commit 0cd2c2dee0
5 changed files with 144 additions and 10 deletions

View File

@ -87,6 +87,24 @@ collections:
name: "alias"
widget: "string"
- {label: "Text", name: "body", widget: "markdown", required: false}
- name: "statistik"
icon: "stats"
label: "Statistik"
editor:
preview: false
files:
- name: "abiturdurchschnitte"
label: "Abiturdurchschnitte"
file: "static/data/abiturdurchschnitte.json"
fields:
- label: "Abiturdurchschnitte"
label_singular: "Abiturdurchschnitt"
name: "abiturdurchschnitte"
widget: "list"
required: false
fields:
- {label: "Jahr", name: "jahr", widget: "number", required: true}
- {label: "Schnitt", name: "schnitt", widget: "number", value_type: "float", step: 0.01, required: true}
- name: "cantorpreis"
icon: "award"
label: "Cantor-Preisträger"

View File

@ -21,7 +21,7 @@
CMS.init();
</script>
<script id="icons">
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'], ['superhaufen', 'mdi mdi-view-dashboard']];
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'], ['superhaufen', 'mdi mdi-view-dashboard'], ['stats', 'mdi mdi-chart-bar']];
icons.forEach(icon => {
CMS.registerIcon(icon[0], ({}) => { return(h('i', {className: icon[1] + " icon-md"})); });
});