🔧 Automate admin config
This commit is contained in:
parent
27531c69f9
commit
d2c4fdf100
220
bin/admin.js
Normal file
220
bin/admin.js
Normal file
|
@ -0,0 +1,220 @@
|
|||
const fs = require('fs')
|
||||
const yaml = require('js-yaml')
|
||||
const {
|
||||
category,
|
||||
baseConfig,
|
||||
pageUrl,
|
||||
siteName,
|
||||
textField,
|
||||
stringField,
|
||||
markdownField,
|
||||
listField,
|
||||
objectField
|
||||
} = require('./config')
|
||||
|
||||
const writeFile = (path, data, opts = 'utf8') =>
|
||||
new Promise((resolve, reject) => {
|
||||
fs.writeFile(path, data, opts, (err) => {
|
||||
if (err) reject(err)
|
||||
else resolve()
|
||||
})
|
||||
})
|
||||
|
||||
const PATH_DESTINATION = './public/admin/config.yml'
|
||||
|
||||
const configTree = {
|
||||
...baseConfig(),
|
||||
collections: [
|
||||
category({
|
||||
meta: {
|
||||
name: 'euromat',
|
||||
label: 'Euromat',
|
||||
description: 'Theses, parties, ..., everything for the actual app.',
|
||||
folder: 'src/app/euromat/content'
|
||||
},
|
||||
fields: []
|
||||
}),
|
||||
category({
|
||||
meta: {
|
||||
name: 'introduction',
|
||||
label: '[Page] Introduction',
|
||||
description: 'The introduction page of Euromat.',
|
||||
folder: 'src/app/intro/content'
|
||||
},
|
||||
fields: [
|
||||
siteName(),
|
||||
stringField('headline', 'Headline'),
|
||||
markdownField('content', 'Content'),
|
||||
stringField('button', '[Label] Button')
|
||||
]
|
||||
}),
|
||||
category({
|
||||
meta: {
|
||||
name: 'party',
|
||||
label: '[Page] Party',
|
||||
description: 'This is an informational page comparing the voters results with a political parties position.',
|
||||
folder: 'src/app/party/content'
|
||||
},
|
||||
fields: [
|
||||
pageUrl(),
|
||||
siteName(),
|
||||
stringField('subtitle', 'Subtitle'),
|
||||
stringField('backButtonLabel', '[Label] Back button'),
|
||||
stringField('legendLabel', '[Label] Legend'),
|
||||
stringField('partyAnswer', 'Answer'),
|
||||
stringField('tableHeading', 'Table Heading'),
|
||||
stringField('tableUser', 'Table User Description')
|
||||
]
|
||||
}),
|
||||
category({
|
||||
meta: {
|
||||
name: 'about',
|
||||
label: '[Page] About us',
|
||||
description: 'The about us page.',
|
||||
folder: 'src/app/about/content'
|
||||
},
|
||||
fields: [
|
||||
pageUrl(),
|
||||
siteName(),
|
||||
stringField('headline', 'Headline'),
|
||||
stringField('content', 'Content'),
|
||||
stringField('devDesign', 'Headline for development and design')
|
||||
]
|
||||
}),
|
||||
category({
|
||||
meta: {
|
||||
name: 'faq',
|
||||
label: '[Page] FAQ',
|
||||
description: 'The FAQ page.',
|
||||
folder: 'src/app/faq/content'
|
||||
},
|
||||
fields: [
|
||||
pageUrl(),
|
||||
siteName(),
|
||||
stringField('headline', 'Headline'),
|
||||
listField('questions', 'Questions', {
|
||||
list: [
|
||||
stringField('title', 'Title'),
|
||||
markdownField('answer', 'Answer')
|
||||
]
|
||||
})
|
||||
]
|
||||
}),
|
||||
category({
|
||||
meta: {
|
||||
name: 'press',
|
||||
label: '[Page] Press',
|
||||
description: 'Press page.',
|
||||
folder: 'src/app/press/content'
|
||||
},
|
||||
fields: [
|
||||
pageUrl(),
|
||||
siteName(),
|
||||
stringField('headline', 'Headline'),
|
||||
markdownField('content', 'Content')
|
||||
]
|
||||
}),
|
||||
category({
|
||||
meta: {
|
||||
name: 'privacy',
|
||||
label: '[Page] Data Privacy',
|
||||
description: 'The data privacy page.',
|
||||
folder: 'src/app/privacy/content'
|
||||
},
|
||||
fields: [
|
||||
pageUrl(),
|
||||
siteName(),
|
||||
stringField('headline', 'Headline'),
|
||||
listField('topics', 'Topics', {
|
||||
list: [
|
||||
stringField('title', 'Title'),
|
||||
markdownField('content', 'Content')
|
||||
]
|
||||
})
|
||||
]
|
||||
}),
|
||||
category({
|
||||
meta: {
|
||||
name: 'imprint',
|
||||
label: '[Page] Imprint',
|
||||
description: 'Subpage for legal notice.',
|
||||
folder: 'src/app/imprint/content'
|
||||
},
|
||||
fields: [
|
||||
pageUrl(),
|
||||
siteName(),
|
||||
stringField('headline', 'Headline'),
|
||||
listField('content', 'Content', {
|
||||
list: [
|
||||
stringField('title', 'Title'),
|
||||
markdownField('content', 'Content')
|
||||
]
|
||||
})
|
||||
]
|
||||
}),
|
||||
category({
|
||||
meta: {
|
||||
name: 'fourzerofour',
|
||||
label: '[Page] 404',
|
||||
description: 'Error page when the user (accidentally) reaches a nonexistent page.',
|
||||
folder: 'src/app/404/content'
|
||||
},
|
||||
fields: [
|
||||
siteName(),
|
||||
stringField('headline', 'Headline'),
|
||||
markdownField('content', 'Content'),
|
||||
stringField('button', '[Label] Button')
|
||||
]
|
||||
}),
|
||||
category({
|
||||
meta: {
|
||||
name: 'settings',
|
||||
label: 'Settings',
|
||||
description: 'Overall settings for all pages (e.g. menu labels, social media, ...)',
|
||||
folder: 'src/data/meta'
|
||||
},
|
||||
fields: [
|
||||
objectField('topMenu', 'Top Navigation', {
|
||||
hint: 'The main navigation for the website.',
|
||||
list: [
|
||||
stringField('index', '[Label] Introduction'),
|
||||
stringField('faq', '[Label] FAQ'),
|
||||
stringField('about', '[Label] About us'),
|
||||
stringField('press', '[Label] Press')
|
||||
]
|
||||
}),
|
||||
objectField('footerMenu', 'Footer Navigation', {
|
||||
hint: 'The footer navigation for the website.',
|
||||
list: [
|
||||
stringField('imprint', '[Label] Imprint'),
|
||||
stringField('privacy', '[Label] Data privacy')
|
||||
]
|
||||
}),
|
||||
objectField('socialMedia', 'Social Media Share Text', {
|
||||
hint: 'These are the default texts which get used to share.',
|
||||
list: [
|
||||
stringField('twitter', 'Twitter'),
|
||||
stringField('facebook', 'Facebook'),
|
||||
stringField('clipboard', 'Clipboard')
|
||||
]
|
||||
}),
|
||||
objectField('cookieConsent', 'Cookie Consent Layer', {
|
||||
hint: 'The text which is shown in the cookie consent layer.',
|
||||
list: [
|
||||
textField('text', 'Text'),
|
||||
stringField('btnDecline', '[Button] Decline'),
|
||||
stringField('btnAccept', '[Button] Accept')
|
||||
]
|
||||
})
|
||||
]
|
||||
})
|
||||
]
|
||||
}
|
||||
|
||||
;(async () => {
|
||||
try {
|
||||
await writeFile(PATH_DESTINATION, yaml.safeDump(configTree))
|
||||
} catch (error) {
|
||||
throw new Error(error)
|
||||
}
|
||||
})()
|
80
bin/config.js
Normal file
80
bin/config.js
Normal file
|
@ -0,0 +1,80 @@
|
|||
const createField = (widget, name, label, opts) => ({ label, name, widget, ...opts })
|
||||
|
||||
const textField = (...args) =>
|
||||
createField('text', ...args)
|
||||
|
||||
const stringField = (...args) =>
|
||||
createField('string', ...args)
|
||||
|
||||
const markdownField = (...args) =>
|
||||
createField('markdown', ...args)
|
||||
|
||||
const listField = (name, label, { list, ...rest } = {}) =>
|
||||
createField('list', name, label, { ...rest, fields: list })
|
||||
|
||||
const objectField = (name, label, { list, ...rest } = {}) =>
|
||||
createField('object', name, label, { ...rest, fields: list })
|
||||
|
||||
const baseConfig = () => ({
|
||||
backend: {
|
||||
name: 'git-gateway',
|
||||
branch: 'next',
|
||||
squash_merges: true,
|
||||
accept_roles: ['admin', 'editor']
|
||||
},
|
||||
publish_mode: 'editorial_workflow',
|
||||
media_folder: 'static/img/uploads',
|
||||
public_folder: '/img/uploads'
|
||||
})
|
||||
|
||||
const languageConfig = () => ({
|
||||
label: '[Meta] Language',
|
||||
name: 'language',
|
||||
hint: 'Select the language for this page.',
|
||||
widget: 'select',
|
||||
options: [
|
||||
{ label: 'English', value: 'en' },
|
||||
{ label: 'Deutsch', value: 'de' },
|
||||
{ label: 'Français', value: 'fr' },
|
||||
{ label: 'Polski', value: 'pl' }
|
||||
]
|
||||
})
|
||||
|
||||
const pageUrl = () => ({
|
||||
label: '[Meta] Page URL',
|
||||
name: 'url',
|
||||
widget: 'string',
|
||||
hint: 'An optional, localised URL which will be used for this page (e.g. https://euromat.info/#/<PAGE_URL>',
|
||||
optional: true
|
||||
})
|
||||
|
||||
const siteName = () => ({
|
||||
label: '[Meta] Site Name',
|
||||
name: 'title',
|
||||
widget: 'string',
|
||||
hint: 'The name for the page that will appear in the browser tab.'
|
||||
})
|
||||
|
||||
const category = ({ meta, fields = [] }) => ({
|
||||
...meta,
|
||||
format: 'json',
|
||||
create: true,
|
||||
slug: '{{fields.language}}',
|
||||
fields: [
|
||||
languageConfig(),
|
||||
...fields
|
||||
]
|
||||
})
|
||||
|
||||
module.exports = {
|
||||
category,
|
||||
baseConfig,
|
||||
languageConfig,
|
||||
pageUrl,
|
||||
siteName,
|
||||
textField,
|
||||
stringField,
|
||||
markdownField,
|
||||
listField,
|
||||
objectField
|
||||
}
|
6
package-lock.json
generated
6
package-lock.json
generated
|
@ -9669,9 +9669,9 @@
|
|||
"integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
|
||||
},
|
||||
"js-yaml": {
|
||||
"version": "3.13.0",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.0.tgz",
|
||||
"integrity": "sha512-pZZoSxcCYco+DIKBTimr67J6Hy+EYGZDY/HCWC+iAEA9h1ByhMXAIVUXMcMFpOCxQ/xjXmPI2MkDL5HRm5eFrQ==",
|
||||
"version": "3.13.1",
|
||||
"resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz",
|
||||
"integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==",
|
||||
"requires": {
|
||||
"argparse": "^1.0.7",
|
||||
"esprima": "^4.0.0"
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
"build": "vue-cli-service build",
|
||||
"lint": "vue-cli-service lint",
|
||||
"test:unit": "vue-cli-service test:unit",
|
||||
"svg": "vsvg -s ./src/assets/svg -t ./src/assets/icons"
|
||||
"svg": "vsvg -s ./src/assets/svg -t ./src/assets/icons",
|
||||
"admin": "node bin/admin"
|
||||
},
|
||||
"dependencies": {
|
||||
"husky": "^1.3.1",
|
||||
|
@ -39,6 +40,7 @@
|
|||
"babel-jest": "^23.6.0",
|
||||
"eslint": "^5.8.0",
|
||||
"eslint-plugin-vue": "^5.0.0",
|
||||
"js-yaml": "^3.13.1",
|
||||
"node-sass": "^4.11.0",
|
||||
"normalize.css": "^8.0.1",
|
||||
"sass-loader": "^7.1.0",
|
||||
|
@ -53,6 +55,10 @@
|
|||
"src/**/*.vue": [
|
||||
"npm run css",
|
||||
"git add"
|
||||
],
|
||||
"*": [
|
||||
"npm run admin",
|
||||
"git add"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,271 +6,438 @@ backend:
|
|||
- admin
|
||||
- editor
|
||||
publish_mode: editorial_workflow
|
||||
media_folder: "static/img/uploads"
|
||||
public_folder: "/img/uploads"
|
||||
media_folder: static/img/uploads
|
||||
public_folder: /img/uploads
|
||||
collections:
|
||||
# EUROMAT
|
||||
- name: "euromat"
|
||||
label: "Euromat"
|
||||
description: "Theses, parties, ..., everything for the actual app."
|
||||
folder: "src/app/euromat/content"
|
||||
format: "json"
|
||||
- name: euromat
|
||||
label: Euromat
|
||||
description: 'Theses, parties, ..., everything for the actual app.'
|
||||
folder: src/app/euromat/content
|
||||
format: json
|
||||
create: true
|
||||
slug: "{{fields.language}}"
|
||||
slug: '{{fields.language}}'
|
||||
fields:
|
||||
- label: "[Meta] Language"
|
||||
name: "language"
|
||||
hint: "Select the language for this page."
|
||||
widget: "select"
|
||||
- label: '[Meta] Language'
|
||||
name: language
|
||||
hint: Select the language for this page.
|
||||
widget: select
|
||||
options:
|
||||
- {label: "English", value: "en"}
|
||||
- {label: "Deutsch", value: "de"}
|
||||
- {label: "Français", value: "fr"}
|
||||
- {label: "Polski", value: "pl"}
|
||||
# INTRODUCTION
|
||||
- name: "introduction"
|
||||
label: "[Page] Introduction"
|
||||
description: "The introduction page of Euromat."
|
||||
folder: "src/app/intro/content"
|
||||
format: "json"
|
||||
- label: English
|
||||
value: en
|
||||
- label: Deutsch
|
||||
value: de
|
||||
- label: Français
|
||||
value: fr
|
||||
- label: Polski
|
||||
value: pl
|
||||
- name: introduction
|
||||
label: '[Page] Introduction'
|
||||
description: The introduction page of Euromat.
|
||||
folder: src/app/intro/content
|
||||
format: json
|
||||
create: true
|
||||
slug: "{{fields.language}}"
|
||||
slug: '{{fields.language}}'
|
||||
fields:
|
||||
- label: "[Meta] Language"
|
||||
name: "language"
|
||||
hint: "Select the language for this page."
|
||||
widget: "select"
|
||||
- label: '[Meta] Language'
|
||||
name: language
|
||||
hint: Select the language for this page.
|
||||
widget: select
|
||||
options:
|
||||
- {label: "English", value: "en"}
|
||||
- {label: "Deutsch", value: "de"}
|
||||
- {label: "Français", value: "fr"}
|
||||
- {label: "Polski", value: "pl"}
|
||||
- {label: "[Meta] Site Name", name: "title", widget: "string", hint: "The name for the page that will appear in the browser tab."}
|
||||
- {label: "Headline", name: "headline", widget: "string"}
|
||||
- {label: "Content", name: "content", widget: "markdown"}
|
||||
- {label: "Button Label", name: "button", widget: "string"}
|
||||
# PARTY
|
||||
- name: "party"
|
||||
label: "[Page] Party"
|
||||
description: "This is an informational page comparing the voters results with a political parties position."
|
||||
folder: "src/app/party/content"
|
||||
format: "json"
|
||||
- label: English
|
||||
value: en
|
||||
- label: Deutsch
|
||||
value: de
|
||||
- label: Français
|
||||
value: fr
|
||||
- label: Polski
|
||||
value: pl
|
||||
- label: '[Meta] Site Name'
|
||||
name: title
|
||||
widget: string
|
||||
hint: The name for the page that will appear in the browser tab.
|
||||
- label: Headline
|
||||
name: headline
|
||||
widget: string
|
||||
- label: Content
|
||||
name: content
|
||||
widget: markdown
|
||||
- label: '[Label] Button'
|
||||
name: button
|
||||
widget: string
|
||||
- name: party
|
||||
label: '[Page] Party'
|
||||
description: >-
|
||||
This is an informational page comparing the voters results with a
|
||||
political parties position.
|
||||
folder: src/app/party/content
|
||||
format: json
|
||||
create: true
|
||||
slug: "{{fields.language}}"
|
||||
slug: '{{fields.language}}'
|
||||
fields:
|
||||
- label: "[Meta] Language"
|
||||
name: "language"
|
||||
hint: "Select the language for this page."
|
||||
widget: "select"
|
||||
- label: '[Meta] Language'
|
||||
name: language
|
||||
hint: Select the language for this page.
|
||||
widget: select
|
||||
options:
|
||||
- {label: "English", value: "en"}
|
||||
- {label: "Deutsch", value: "de"}
|
||||
- {label: "Français", value: "fr"}
|
||||
- {label: "Polski", value: "pl"}
|
||||
- {label: "[Meta] Page URL", name: "url", widget: "string", hint: "An optional, localised URL which will be used for this page (e.g. https://euromat.info/#/<PAGE_URL>", optional: true}
|
||||
- {label: "[Meta] Site Name", name: "title", widget: "string", hint: "The name for the page that will appear in the browser tab."}
|
||||
- {label: "Subtitle", name: "subtitle", widget: "string"}
|
||||
- {label: "Label: Back button", name: "backButtonLabel", widget: "string"}
|
||||
- {label: "Label: Legend", name: "legendLabel", widget: "string"}
|
||||
- {label: "Answer", name: "partyAnswer", widget: "string"}
|
||||
- {label: "Table Heading", name: "tableHeading", widget: "string"}
|
||||
- {label: "Table User Description", name: "tableUser", widget: "string"}
|
||||
# ABOUT US
|
||||
- name: "about"
|
||||
label: "[Page] About us"
|
||||
description: "The about us page."
|
||||
folder: "src/app/about/content"
|
||||
format: "json"
|
||||
- label: English
|
||||
value: en
|
||||
- label: Deutsch
|
||||
value: de
|
||||
- label: Français
|
||||
value: fr
|
||||
- label: Polski
|
||||
value: pl
|
||||
- label: '[Meta] Page URL'
|
||||
name: url
|
||||
widget: string
|
||||
hint: >-
|
||||
An optional, localised URL which will be used for this page (e.g.
|
||||
https://euromat.info/#/<PAGE_URL>
|
||||
optional: true
|
||||
- label: '[Meta] Site Name'
|
||||
name: title
|
||||
widget: string
|
||||
hint: The name for the page that will appear in the browser tab.
|
||||
- label: Subtitle
|
||||
name: subtitle
|
||||
widget: string
|
||||
- label: '[Label] Back button'
|
||||
name: backButtonLabel
|
||||
widget: string
|
||||
- label: '[Label] Legend'
|
||||
name: legendLabel
|
||||
widget: string
|
||||
- label: Answer
|
||||
name: partyAnswer
|
||||
widget: string
|
||||
- label: Table Heading
|
||||
name: tableHeading
|
||||
widget: string
|
||||
- label: Table User Description
|
||||
name: tableUser
|
||||
widget: string
|
||||
- name: about
|
||||
label: '[Page] About us'
|
||||
description: The about us page.
|
||||
folder: src/app/about/content
|
||||
format: json
|
||||
create: true
|
||||
slug: "{{fields.language}}"
|
||||
slug: '{{fields.language}}'
|
||||
fields:
|
||||
- label: "[Meta] Language"
|
||||
name: "language"
|
||||
hint: "Select the language for this page."
|
||||
widget: "select"
|
||||
- label: '[Meta] Language'
|
||||
name: language
|
||||
hint: Select the language for this page.
|
||||
widget: select
|
||||
options:
|
||||
- {label: "English", value: "en"}
|
||||
- {label: "Deutsch", value: "de"}
|
||||
- {label: "Français", value: "fr"}
|
||||
- {label: "Polski", value: "pl"}
|
||||
- {label: "[Meta] Page URL", name: "url", widget: "string", hint: "An optional, localised URL which will be used for this page (e.g. https://euromat.info/#/<PAGE_URL>", optional: true}
|
||||
- {label: "[Meta] Site Name", name: "title", widget: "string", hint: "The name for the page that will appear in the browser tab."}
|
||||
- {label: "Headline", name: "headline", widget: "string"}
|
||||
- {label: "Content", name: "content", widget: "markdown"}
|
||||
- {label: "Label for development and design", name: "devDesign", widget: "string"}
|
||||
# FAQ
|
||||
- name: "faq"
|
||||
label: "[Page] FAQ"
|
||||
description: "The FAQ page."
|
||||
folder: "src/app/faq/content"
|
||||
format: "json"
|
||||
- label: English
|
||||
value: en
|
||||
- label: Deutsch
|
||||
value: de
|
||||
- label: Français
|
||||
value: fr
|
||||
- label: Polski
|
||||
value: pl
|
||||
- label: '[Meta] Page URL'
|
||||
name: url
|
||||
widget: string
|
||||
hint: >-
|
||||
An optional, localised URL which will be used for this page (e.g.
|
||||
https://euromat.info/#/<PAGE_URL>
|
||||
optional: true
|
||||
- label: '[Meta] Site Name'
|
||||
name: title
|
||||
widget: string
|
||||
hint: The name for the page that will appear in the browser tab.
|
||||
- label: Headline
|
||||
name: headline
|
||||
widget: string
|
||||
- label: Content
|
||||
name: content
|
||||
widget: string
|
||||
- label: Headline for development and design
|
||||
name: devDesign
|
||||
widget: string
|
||||
- name: faq
|
||||
label: '[Page] FAQ'
|
||||
description: The FAQ page.
|
||||
folder: src/app/faq/content
|
||||
format: json
|
||||
create: true
|
||||
slug: "{{fields.language}}"
|
||||
slug: '{{fields.language}}'
|
||||
fields:
|
||||
- label: "[Meta] Language"
|
||||
name: "language"
|
||||
hint: "Select the language for this page."
|
||||
widget: "select"
|
||||
- label: '[Meta] Language'
|
||||
name: language
|
||||
hint: Select the language for this page.
|
||||
widget: select
|
||||
options:
|
||||
- {label: "English", value: "en"}
|
||||
- {label: "Deutsch", value: "de"}
|
||||
- {label: "Français", value: "fr"}
|
||||
- {label: "Polski", value: "pl"}
|
||||
- {label: "[Meta] Page URL", name: "url", widget: "string", hint: "An optional, localised URL which will be used for this page (e.g. https://euromat.info/#/<PAGE_URL>", optional: true}
|
||||
- {label: "[Meta] Site Name", name: "title", widget: "string", hint: "The name for the page that will appear in the browser tab."}
|
||||
- {label: "Headline", name: "headline", widget: "string"}
|
||||
- label: "Questions"
|
||||
name: "questions"
|
||||
widget: "list"
|
||||
- label: English
|
||||
value: en
|
||||
- label: Deutsch
|
||||
value: de
|
||||
- label: Français
|
||||
value: fr
|
||||
- label: Polski
|
||||
value: pl
|
||||
- label: '[Meta] Page URL'
|
||||
name: url
|
||||
widget: string
|
||||
hint: >-
|
||||
An optional, localised URL which will be used for this page (e.g.
|
||||
https://euromat.info/#/<PAGE_URL>
|
||||
optional: true
|
||||
- label: '[Meta] Site Name'
|
||||
name: title
|
||||
widget: string
|
||||
hint: The name for the page that will appear in the browser tab.
|
||||
- label: Headline
|
||||
name: headline
|
||||
widget: string
|
||||
- label: Questions
|
||||
name: questions
|
||||
widget: list
|
||||
fields:
|
||||
- {label: "Title", name: "title", widget: "string"}
|
||||
- {label: "Answer", name: "answer", widget: "markdown"}
|
||||
# PRESS
|
||||
- name: "press"
|
||||
label: "[Page] Press"
|
||||
description: "Press page."
|
||||
folder: "src/app/press/content"
|
||||
format: "json"
|
||||
- label: Title
|
||||
name: title
|
||||
widget: string
|
||||
- label: Answer
|
||||
name: answer
|
||||
widget: markdown
|
||||
- name: press
|
||||
label: '[Page] Press'
|
||||
description: Press page.
|
||||
folder: src/app/press/content
|
||||
format: json
|
||||
create: true
|
||||
slug: "{{fields.language}}"
|
||||
slug: '{{fields.language}}'
|
||||
fields:
|
||||
- label: "[Meta] Language"
|
||||
name: "language"
|
||||
hint: "Select the language for this page."
|
||||
widget: "select"
|
||||
- label: '[Meta] Language'
|
||||
name: language
|
||||
hint: Select the language for this page.
|
||||
widget: select
|
||||
options:
|
||||
- {label: "English", value: "en"}
|
||||
- {label: "Deutsch", value: "de"}
|
||||
- {label: "Français", value: "fr"}
|
||||
- {label: "Polski", value: "pl"}
|
||||
- {label: "[Meta] Page URL", name: "url", widget: "string", hint: "An optional, localised URL which will be used for this page (e.g. https://euromat.info/#/<PAGE_URL>", optional: true}
|
||||
- {label: "[Meta] Site Name", name: "title", widget: "string", hint: "The name for the page that will appear in the browser tab."}
|
||||
- {label: "Headline", name: "headline", widget: "string"}
|
||||
- {label: "Content", name: "content", widget: "markdown"}
|
||||
# DATA PRIVACY
|
||||
- name: "privacy"
|
||||
label: "[Page] Data Privacy"
|
||||
description: "The data privacy page."
|
||||
folder: "src/app/privacy/content"
|
||||
format: "json"
|
||||
- label: English
|
||||
value: en
|
||||
- label: Deutsch
|
||||
value: de
|
||||
- label: Français
|
||||
value: fr
|
||||
- label: Polski
|
||||
value: pl
|
||||
- label: '[Meta] Page URL'
|
||||
name: url
|
||||
widget: string
|
||||
hint: >-
|
||||
An optional, localised URL which will be used for this page (e.g.
|
||||
https://euromat.info/#/<PAGE_URL>
|
||||
optional: true
|
||||
- label: '[Meta] Site Name'
|
||||
name: title
|
||||
widget: string
|
||||
hint: The name for the page that will appear in the browser tab.
|
||||
- label: Headline
|
||||
name: headline
|
||||
widget: string
|
||||
- label: Content
|
||||
name: content
|
||||
widget: markdown
|
||||
- name: privacy
|
||||
label: '[Page] Data Privacy'
|
||||
description: The data privacy page.
|
||||
folder: src/app/privacy/content
|
||||
format: json
|
||||
create: true
|
||||
slug: "{{fields.language}}"
|
||||
slug: '{{fields.language}}'
|
||||
fields:
|
||||
- label: "[Meta] Language"
|
||||
name: "language"
|
||||
hint: "Select the language for this page."
|
||||
widget: "select"
|
||||
- label: '[Meta] Language'
|
||||
name: language
|
||||
hint: Select the language for this page.
|
||||
widget: select
|
||||
options:
|
||||
- {label: "English", value: "en"}
|
||||
- {label: "Deutsch", value: "de"}
|
||||
- {label: "Français", value: "fr"}
|
||||
- {label: "Polski", value: "pl"}
|
||||
- {label: "[Meta] Page URL", name: "url", widget: "string", hint: "An optional, localised URL which will be used for this page (e.g. https://euromat.info/#/<PAGE_URL>", optional: true}
|
||||
- {label: "[Meta] Site Name", name: "title", widget: "string", hint: "The name for the page that will appear in the browser tab."}
|
||||
- {label: "Headline", name: "headline", widget: "string"}
|
||||
- label: "Topics"
|
||||
name: "topics"
|
||||
widget: "list"
|
||||
- label: English
|
||||
value: en
|
||||
- label: Deutsch
|
||||
value: de
|
||||
- label: Français
|
||||
value: fr
|
||||
- label: Polski
|
||||
value: pl
|
||||
- label: '[Meta] Page URL'
|
||||
name: url
|
||||
widget: string
|
||||
hint: >-
|
||||
An optional, localised URL which will be used for this page (e.g.
|
||||
https://euromat.info/#/<PAGE_URL>
|
||||
optional: true
|
||||
- label: '[Meta] Site Name'
|
||||
name: title
|
||||
widget: string
|
||||
hint: The name for the page that will appear in the browser tab.
|
||||
- label: Headline
|
||||
name: headline
|
||||
widget: string
|
||||
- label: Topics
|
||||
name: topics
|
||||
widget: list
|
||||
fields:
|
||||
- {label: "Title", name: "title", widget: "string"}
|
||||
- {label: "Content", name: "content", widget: "markdown"}
|
||||
# IMPRINT
|
||||
- name: "imprint"
|
||||
label: "[Page] Imprint"
|
||||
description: "Imprint (required in Germany)."
|
||||
folder: "src/app/imprint/content"
|
||||
format: "json"
|
||||
- label: Title
|
||||
name: title
|
||||
widget: string
|
||||
- label: Content
|
||||
name: content
|
||||
widget: markdown
|
||||
- name: imprint
|
||||
label: '[Page] Imprint'
|
||||
description: Subpage for legal notice.
|
||||
folder: src/app/imprint/content
|
||||
format: json
|
||||
create: true
|
||||
slug: "{{fields.language}}"
|
||||
slug: '{{fields.language}}'
|
||||
fields:
|
||||
- label: "[Meta] Language"
|
||||
name: "language"
|
||||
hint: "Select the language for this page."
|
||||
widget: "select"
|
||||
- label: '[Meta] Language'
|
||||
name: language
|
||||
hint: Select the language for this page.
|
||||
widget: select
|
||||
options:
|
||||
- {label: "English", value: "en"}
|
||||
- {label: "Deutsch", value: "de"}
|
||||
- {label: "Français", value: "fr"}
|
||||
- {label: "Polski", value: "pl"}
|
||||
- {label: "[Meta] Page URL", name: "url", widget: "string", hint: "An optional, localised URL which will be used for this page (e.g. https://euromat.info/#/<PAGE_URL>", optional: true}
|
||||
- {label: "[Meta] Site Name", name: "title", widget: "string", hint: "The name for the page that will appear in the browser tab."}
|
||||
- {label: "Headline", name: "headline", widget: "string"}
|
||||
- label: "Content"
|
||||
name: "content"
|
||||
widget: "list"
|
||||
- label: English
|
||||
value: en
|
||||
- label: Deutsch
|
||||
value: de
|
||||
- label: Français
|
||||
value: fr
|
||||
- label: Polski
|
||||
value: pl
|
||||
- label: '[Meta] Page URL'
|
||||
name: url
|
||||
widget: string
|
||||
hint: >-
|
||||
An optional, localised URL which will be used for this page (e.g.
|
||||
https://euromat.info/#/<PAGE_URL>
|
||||
optional: true
|
||||
- label: '[Meta] Site Name'
|
||||
name: title
|
||||
widget: string
|
||||
hint: The name for the page that will appear in the browser tab.
|
||||
- label: Headline
|
||||
name: headline
|
||||
widget: string
|
||||
- label: Content
|
||||
name: content
|
||||
widget: list
|
||||
fields:
|
||||
- {label: "Title", name: "title", widget: "string"}
|
||||
- {label: "Content", name: "content", widget: "markdown"}
|
||||
# 404
|
||||
- name: "fourzerofour"
|
||||
label: "[Page] 404"
|
||||
description: "Error page when the user (accidentally) reaches a nonexistent page."
|
||||
folder: "src/app/404/content"
|
||||
format: "json"
|
||||
- label: Title
|
||||
name: title
|
||||
widget: string
|
||||
- label: Content
|
||||
name: content
|
||||
widget: markdown
|
||||
- name: fourzerofour
|
||||
label: '[Page] 404'
|
||||
description: Error page when the user (accidentally) reaches a nonexistent page.
|
||||
folder: src/app/404/content
|
||||
format: json
|
||||
create: true
|
||||
slug: "{{fields.language}}"
|
||||
slug: '{{fields.language}}'
|
||||
fields:
|
||||
- label: "[Meta] Language"
|
||||
name: "language"
|
||||
hint: "Select the language for this page."
|
||||
widget: "select"
|
||||
- label: '[Meta] Language'
|
||||
name: language
|
||||
hint: Select the language for this page.
|
||||
widget: select
|
||||
options:
|
||||
- {label: "English", value: "en"}
|
||||
- {label: "Deutsch", value: "de"}
|
||||
- {label: "Français", value: "fr"}
|
||||
- {label: "Polski", value: "pl"}
|
||||
- {label: "[Meta] Site Name", name: "title", widget: "string", hint: "The name for the page that will appear in the browser tab."}
|
||||
- {label: "Headline", name: "headline", widget: "string"}
|
||||
- {label: "Content", name: "content", widget: "markdown"}
|
||||
- {label: "Button Label", name: "button", widget: "string"}
|
||||
# APP SETUP
|
||||
- name: "settings"
|
||||
label: "Settings"
|
||||
description: "Overall settings for all pages (e.g. menu labels, social media, ...)"
|
||||
folder: "src/data/meta"
|
||||
format: "json"
|
||||
- label: English
|
||||
value: en
|
||||
- label: Deutsch
|
||||
value: de
|
||||
- label: Français
|
||||
value: fr
|
||||
- label: Polski
|
||||
value: pl
|
||||
- label: '[Meta] Site Name'
|
||||
name: title
|
||||
widget: string
|
||||
hint: The name for the page that will appear in the browser tab.
|
||||
- label: Headline
|
||||
name: headline
|
||||
widget: string
|
||||
- label: Content
|
||||
name: content
|
||||
widget: markdown
|
||||
- label: '[Label] Button'
|
||||
name: button
|
||||
widget: string
|
||||
- name: settings
|
||||
label: Settings
|
||||
description: 'Overall settings for all pages (e.g. menu labels, social media, ...)'
|
||||
folder: src/data/meta
|
||||
format: json
|
||||
create: true
|
||||
slug: "{{fields.language}}"
|
||||
slug: '{{fields.language}}'
|
||||
fields:
|
||||
- label: "[Meta] Language"
|
||||
name: "language"
|
||||
hint: "Select the language for this page."
|
||||
widget: "select"
|
||||
- label: '[Meta] Language'
|
||||
name: language
|
||||
hint: Select the language for this page.
|
||||
widget: select
|
||||
options:
|
||||
- {label: "English", value: "en"}
|
||||
- {label: "Deutsch", value: "de"}
|
||||
- {label: "Français", value: "fr"}
|
||||
- {label: "Polski", value: "pl"}
|
||||
- label: "Top Navigation"
|
||||
name: "topMenu"
|
||||
hint: "The main navigation for the website."
|
||||
widget: "object"
|
||||
- label: English
|
||||
value: en
|
||||
- label: Deutsch
|
||||
value: de
|
||||
- label: Français
|
||||
value: fr
|
||||
- label: Polski
|
||||
value: pl
|
||||
- label: Top Navigation
|
||||
name: topMenu
|
||||
widget: object
|
||||
hint: The main navigation for the website.
|
||||
fields:
|
||||
- {label: "Introduction", name: "index", widget: "string"}
|
||||
- {label: "FAQ", name: "faq", widget: "string"}
|
||||
- {label: "About us", name: "about", widget: "string"}
|
||||
- {label: "Press", name: "press", widget: "string"}
|
||||
- label: "Footer Navigation"
|
||||
name: "footerMenu"
|
||||
hint: "The footer navigation for the website."
|
||||
widget: "object"
|
||||
- label: '[Label] Introduction'
|
||||
name: index
|
||||
widget: string
|
||||
- label: '[Label] FAQ'
|
||||
name: faq
|
||||
widget: string
|
||||
- label: '[Label] About us'
|
||||
name: about
|
||||
widget: string
|
||||
- label: '[Label] Press'
|
||||
name: press
|
||||
widget: string
|
||||
- label: Footer Navigation
|
||||
name: footerMenu
|
||||
widget: object
|
||||
hint: The footer navigation for the website.
|
||||
fields:
|
||||
- {label: "[Label] Imprint", name: "imprint", widget: "string"}
|
||||
- {label: "[Label] Data privacy", name: "privacy", widget: "string"}
|
||||
- label: "Social Media Share Text"
|
||||
name: "socialMedia"
|
||||
hint: "These are the default texts which get used to share."
|
||||
widget: "object"
|
||||
- label: '[Label] Imprint'
|
||||
name: imprint
|
||||
widget: string
|
||||
- label: '[Label] Data privacy'
|
||||
name: privacy
|
||||
widget: string
|
||||
- label: Social Media Share Text
|
||||
name: socialMedia
|
||||
widget: object
|
||||
hint: These are the default texts which get used to share.
|
||||
fields:
|
||||
- {label: "Twitter", name: "twitter", widget: "string"}
|
||||
- {label: "Facebook", name: "facebook", widget: "string"}
|
||||
- {label: "Clipboard", name: "clipboard", widget: "string"}
|
||||
- label: "Cookie Consent Layer"
|
||||
name: "cookieConsent"
|
||||
hint: "The text which is shown in the cookie consent layer."
|
||||
widget: "object"
|
||||
- label: Twitter
|
||||
name: twitter
|
||||
widget: string
|
||||
- label: Facebook
|
||||
name: facebook
|
||||
widget: string
|
||||
- label: Clipboard
|
||||
name: clipboard
|
||||
widget: string
|
||||
- label: Cookie Consent Layer
|
||||
name: cookieConsent
|
||||
widget: object
|
||||
hint: The text which is shown in the cookie consent layer.
|
||||
fields:
|
||||
- {label: "Text", name: "text", widget: "text"}
|
||||
- {label: "[Button] Decline", name: "btnDecline", widget: "string"}
|
||||
- {label: "[Button] Accept", name: "btnAccept", widget: "string"}
|
||||
|
||||
- label: Text
|
||||
name: text
|
||||
widget: text
|
||||
- label: '[Button] Decline'
|
||||
name: btnDecline
|
||||
widget: string
|
||||
- label: '[Button] Accept'
|
||||
name: btnAccept
|
||||
widget: string
|
||||
|
|
Loading…
Reference in a new issue