Static CMS v4 (#246)
- Static CMS v4 - switch from jsdelivr to unpkg due to performance issues - custom themes - preset view_group Reviewed-on: #246
This commit is contained in:
parent
97af31bd7e
commit
13335bfabb
@ -19,38 +19,49 @@ const AuthorCollection = {
|
||||
field: "type",
|
||||
value: "author",
|
||||
},
|
||||
view_filters: [
|
||||
{
|
||||
label: "aktiv",
|
||||
field: "active",
|
||||
pattern: true,
|
||||
},
|
||||
{
|
||||
label: "inaktiv",
|
||||
field: "active",
|
||||
pattern: false,
|
||||
},
|
||||
{
|
||||
label: "einfach",
|
||||
field: "simplified",
|
||||
pattern: true,
|
||||
},
|
||||
{
|
||||
label: "erweitert",
|
||||
field: "simplified",
|
||||
pattern: false,
|
||||
},
|
||||
],
|
||||
view_groups: [
|
||||
{
|
||||
label: "vereinfacht",
|
||||
field: "simplified",
|
||||
},
|
||||
{
|
||||
label: "aktiv",
|
||||
field: "active",
|
||||
},
|
||||
],
|
||||
view_filters: {
|
||||
filters: [
|
||||
{
|
||||
name: "active",
|
||||
label: "aktiv",
|
||||
field: "active",
|
||||
pattern: true,
|
||||
},
|
||||
{
|
||||
name: "inactive",
|
||||
label: "inaktiv",
|
||||
field: "active",
|
||||
pattern: false,
|
||||
},
|
||||
{
|
||||
name: "simplified",
|
||||
label: "einfach",
|
||||
field: "simplified",
|
||||
pattern: true,
|
||||
},
|
||||
{
|
||||
name: "extended",
|
||||
label: "erweitert",
|
||||
field: "simplified",
|
||||
pattern: false,
|
||||
},
|
||||
],
|
||||
},
|
||||
view_groups: {
|
||||
default: "active",
|
||||
groups: [
|
||||
{
|
||||
name: "simplified",
|
||||
label: "vereinfacht",
|
||||
field: "simplified",
|
||||
},
|
||||
{
|
||||
name: "active",
|
||||
label: "aktiv",
|
||||
field: "active",
|
||||
},
|
||||
],
|
||||
},
|
||||
summary_fields: ["title", "active", "simplified", "body"],
|
||||
fields: [
|
||||
{
|
||||
|
@ -24,12 +24,16 @@ const BlogCollection = {
|
||||
field: "type",
|
||||
value: "post",
|
||||
},
|
||||
view_groups: [
|
||||
{
|
||||
label: "Entwurf",
|
||||
field: "draft",
|
||||
},
|
||||
],
|
||||
view_groups: {
|
||||
default: "draft",
|
||||
groups: [
|
||||
{
|
||||
name: "draft",
|
||||
label: "Entwurf",
|
||||
field: "draft",
|
||||
},
|
||||
],
|
||||
},
|
||||
sortable_fields: {
|
||||
fields: ["date", "title"],
|
||||
default: {
|
||||
|
@ -19,12 +19,6 @@ const CantorforaCollection = {
|
||||
frame: true,
|
||||
size: "half",
|
||||
},
|
||||
view_groups: [
|
||||
{
|
||||
label: "Entwürfe",
|
||||
field: "draft",
|
||||
},
|
||||
],
|
||||
summary_fields: ["title", "draft", "description"],
|
||||
sortable_fields: {
|
||||
fields: ["index", "title"],
|
||||
|
@ -17,6 +17,7 @@ import {
|
||||
SuperhaufenCollection,
|
||||
WettbewerbeCollection,
|
||||
} from "./collections/index.js";
|
||||
import { GCGThemeDark, GCGThemeLight } from "./themes.js";
|
||||
|
||||
const config = {
|
||||
backend: {
|
||||
@ -48,6 +49,13 @@ const config = {
|
||||
clean_accents: true,
|
||||
sanitize_replacement: "-",
|
||||
},
|
||||
theme: {
|
||||
include_built_in_themes: false,
|
||||
themes: [
|
||||
GCGThemeDark,
|
||||
GCGThemeLight
|
||||
]
|
||||
},
|
||||
collections: [
|
||||
SettingsCollection,
|
||||
IndexPagesCollection,
|
||||
|
@ -7,6 +7,7 @@ import {
|
||||
StatsCollection,
|
||||
SuperhaufenCollection,
|
||||
} from "./collections/index.js";
|
||||
import { GCGThemeDark, GCGThemeLight } from "./themes.js";
|
||||
|
||||
const config = {
|
||||
backend: {
|
||||
@ -38,6 +39,13 @@ const config = {
|
||||
clean_accents: true,
|
||||
sanitize_replacement: "-",
|
||||
},
|
||||
theme: {
|
||||
include_built_in_themes: false,
|
||||
themes: [
|
||||
GCGThemeDark,
|
||||
GCGThemeLight
|
||||
]
|
||||
},
|
||||
collections: [
|
||||
ChronikjahreCollection,
|
||||
SuperhaufenCollection,
|
||||
|
25
static/admin/config/themes.js
Normal file
25
static/admin/config/themes.js
Normal file
@ -0,0 +1,25 @@
|
||||
const GCGThemeDark = {
|
||||
name: "GCG.Dark",
|
||||
extends: "dark",
|
||||
primary: {
|
||||
main: "#ffbc3b",
|
||||
contrastColor: "#4b4b4b",
|
||||
},
|
||||
background: {
|
||||
main: "#1a1a37",
|
||||
dark: "#13132d",
|
||||
},
|
||||
};
|
||||
|
||||
const GCGThemeLight = {
|
||||
name: "GCG.Light",
|
||||
extends: "light",
|
||||
primary: {
|
||||
main: "#1a1a37",
|
||||
},
|
||||
background: {
|
||||
dark: "#f1f3f5",
|
||||
},
|
||||
};
|
||||
|
||||
export { GCGThemeDark, GCGThemeLight };
|
@ -9,12 +9,12 @@
|
||||
/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdn.jsdelivr.net/npm/@staticcms/app@^3.0.0/dist/main.css"
|
||||
href="https://unpkg.com/@staticcms/app@next/dist/main.css"
|
||||
/>
|
||||
<title>Static CMS</title>
|
||||
</head>
|
||||
<body>
|
||||
<script src="https://cdn.jsdelivr.net/npm/@staticcms/app@^3.0.0/dist/static-cms-app.js"></script>
|
||||
<script src="https://unpkg.com/@staticcms/app@next/dist/static-cms-app.js"></script>
|
||||
<script type="module">
|
||||
import config from "./config/index.js";
|
||||
// imports
|
||||
|
@ -9,12 +9,12 @@
|
||||
/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
href="https://cdn.jsdelivr.net/npm/@staticcms/app@^3.0.0/dist/main.css"
|
||||
href="https://unpkg.com/@staticcms/app@next/dist/main.css"
|
||||
/>
|
||||
<title>Chronikverwaltung</title>
|
||||
</head>
|
||||
<body>
|
||||
<script src="https://cdn.jsdelivr.net/npm/@staticcms/app@^3.0.0/dist/static-cms-app.js"></script>
|
||||
<script src="https://unpkg.com/@staticcms/app@next/dist/static-cms-app.js"></script>
|
||||
<script type="module">
|
||||
import config from "../../admin/config/schulchronik.js";
|
||||
// imports
|
||||
|
Loading…
x
Reference in New Issue
Block a user