test
This commit is contained in:
parent
c781ae653d
commit
3c982aaae7
@ -1,10 +1,19 @@
|
|||||||
|
# backend:
|
||||||
|
# name: github
|
||||||
|
# repo: eesev9ie/gcg-website
|
||||||
|
# branch: master
|
||||||
|
# site_domain: eesev9ie.netlify.app
|
||||||
|
|
||||||
backend:
|
backend:
|
||||||
name: github
|
name: gitlab
|
||||||
repo: eesev9ie/gcg-website
|
repo: cantortechnik/gcg-website
|
||||||
branch: master
|
branch: master
|
||||||
site_domain: eesev9ie.netlify.app
|
auth_type: pkce
|
||||||
|
app_id: f9d3e269912cc9560d183167726afc7ccb517862904d0a6c0b10105719964bab
|
||||||
|
api_root: https://gitlab.cantorgymnasium.de/api/v4
|
||||||
|
base_url: https://gitlab.cantorgymnasium.de
|
||||||
|
auth_endpoint: oauth/authorize
|
||||||
|
##base_url: http://localhost:8000
|
||||||
|
|
||||||
media_folder: "static/media"
|
media_folder: "static/media"
|
||||||
public_folder: "/media"
|
public_folder: "/media"
|
||||||
@ -13,12 +22,13 @@ display_url: https://eesev9ie.github.io
|
|||||||
logo_url: /media/logo_y.svg
|
logo_url: /media/logo_y.svg
|
||||||
locale: "de"
|
locale: "de"
|
||||||
publish_mode: editorial_workflow
|
publish_mode: editorial_workflow
|
||||||
|
show_preview_links: false
|
||||||
|
|
||||||
collections:
|
collections:
|
||||||
- name: "pages-de"
|
- name: "pages-de"
|
||||||
label: "Statische Seiten"
|
label: "Statische Seiten"
|
||||||
editor:
|
editor:
|
||||||
preview: false
|
preview: true
|
||||||
files:
|
files:
|
||||||
- name: "blog-index"
|
- name: "blog-index"
|
||||||
label: "Blog"
|
label: "Blog"
|
||||||
@ -79,6 +89,7 @@ collections:
|
|||||||
fields:
|
fields:
|
||||||
- {label: "Titel", name: "title", widget: "string", required: true}
|
- {label: "Titel", name: "title", widget: "string", required: true}
|
||||||
- {label: "Datum", name: "date", widget: "datetime", required: true, date_format: "DD.MM.YYYY", time_format: "HH:mm"}
|
- {label: "Datum", name: "date", widget: "datetime", required: true, date_format: "DD.MM.YYYY", time_format: "HH:mm"}
|
||||||
|
- {label: "Ort", name: "location", widget: "string", required: true}
|
||||||
- {label: "Beschreibung", name: "summary", widget: "string", required: false}
|
- {label: "Beschreibung", name: "summary", widget: "string", required: false}
|
||||||
required: false
|
required: false
|
||||||
|
|
||||||
@ -136,6 +147,7 @@ collections:
|
|||||||
- {label: "Text", name: "body", widget: "markdown", required: false}
|
- {label: "Text", name: "body", widget: "markdown", required: false}
|
||||||
- name: "author-de" # Used in routes, e.g., /admin/collections/blog
|
- name: "author-de" # Used in routes, e.g., /admin/collections/blog
|
||||||
label: "Autor*innen" # Used in the UI
|
label: "Autor*innen" # Used in the UI
|
||||||
|
label_singular: "Autor*in"
|
||||||
folder: "content/german/author" # The path to the folder where the documents are stored
|
folder: "content/german/author" # The path to the folder where the documents are stored
|
||||||
create: true # Allow users to create new documents in this collection
|
create: true # Allow users to create new documents in this collection
|
||||||
slug: "{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
|
slug: "{{slug}}" # Filename template, e.g., YYYY-MM-DD-title.md
|
||||||
@ -179,7 +191,8 @@ collections:
|
|||||||
required: false
|
required: false
|
||||||
- {label: "Beschreibung", name: "body", widget: "markdown"}
|
- {label: "Beschreibung", name: "body", widget: "markdown"}
|
||||||
- name: "blog-de"
|
- name: "blog-de"
|
||||||
label: "Blogbeitrag"
|
label: "Blogbeiträge"
|
||||||
|
label_singular: "Blogbeitrag"
|
||||||
folder: "content/german/blog"
|
folder: "content/german/blog"
|
||||||
filter: {field: "type", value: "post"}
|
filter: {field: "type", value: "post"}
|
||||||
create: true
|
create: true
|
||||||
@ -216,6 +229,8 @@ collections:
|
|||||||
- {label: "Text", name: "body", widget: "markdown"}
|
- {label: "Text", name: "body", widget: "markdown"}
|
||||||
- name: "forms-de"
|
- name: "forms-de"
|
||||||
label: "Formulare und Vorlagen"
|
label: "Formulare und Vorlagen"
|
||||||
|
label_singular: "Formular"
|
||||||
|
description: "Hier sind Formulare, Vorlagen und andere Dokumente zu hinterlegen."
|
||||||
folder: "content/german/forms"
|
folder: "content/german/forms"
|
||||||
filter: {field: "type", value: "forms"}
|
filter: {field: "type", value: "forms"}
|
||||||
create: true
|
create: true
|
||||||
@ -235,6 +250,7 @@ collections:
|
|||||||
- {label: "Text", name: "body", widget: "markdown"}
|
- {label: "Text", name: "body", widget: "markdown"}
|
||||||
- name: "anmeldung-de"
|
- name: "anmeldung-de"
|
||||||
label: "Anmeldung"
|
label: "Anmeldung"
|
||||||
|
label_singular: "Anmeldeinformation"
|
||||||
folder: "content/german/anmeldung"
|
folder: "content/german/anmeldung"
|
||||||
filter: {field: "type", value: "anmeldung"}
|
filter: {field: "type", value: "anmeldung"}
|
||||||
create: true
|
create: true
|
||||||
@ -246,7 +262,7 @@ collections:
|
|||||||
- {label: "Type", name: "type", widget: "hidden", default: "anmeldung"}
|
- {label: "Type", name: "type", widget: "hidden", default: "anmeldung"}
|
||||||
- {label: "Text", name: "body", widget: "markdown"}
|
- {label: "Text", name: "body", widget: "markdown"}
|
||||||
- name: "cantorpreis-de"
|
- name: "cantorpreis-de"
|
||||||
label: "Cantor-Preisträger"
|
label: "Cantor-Preisträger*in"
|
||||||
folder: "content/german/cantorpreis"
|
folder: "content/german/cantorpreis"
|
||||||
filter: {field: "type", value: "cantorpreis"}
|
filter: {field: "type", value: "cantorpreis"}
|
||||||
create: true
|
create: true
|
||||||
@ -272,6 +288,7 @@ collections:
|
|||||||
- {label: "Text", name: "body", widget: "markdown"}
|
- {label: "Text", name: "body", widget: "markdown"}
|
||||||
- name: "ganztagsangebote-de"
|
- name: "ganztagsangebote-de"
|
||||||
label: "Ganztagsangebote"
|
label: "Ganztagsangebote"
|
||||||
|
label_singular: "Ganztagsangebot"
|
||||||
folder: "content/german/ganztagsangebote"
|
folder: "content/german/ganztagsangebote"
|
||||||
filter: {field: "type", value: "ganztagsangebote"}
|
filter: {field: "type", value: "ganztagsangebote"}
|
||||||
create: true
|
create: true
|
||||||
@ -296,6 +313,7 @@ collections:
|
|||||||
- {label: "Text", name: "body", widget: "markdown"}
|
- {label: "Text", name: "body", widget: "markdown"}
|
||||||
- name: "wettbewerbe-de"
|
- name: "wettbewerbe-de"
|
||||||
label: "Wettbewerbe"
|
label: "Wettbewerbe"
|
||||||
|
label_singular: "Wettbewerb"
|
||||||
folder: "content/german/wettbewerbe"
|
folder: "content/german/wettbewerbe"
|
||||||
filter: {field: "type", value: "wettbewerbe"}
|
filter: {field: "type", value: "wettbewerbe"}
|
||||||
create: true
|
create: true
|
||||||
@ -316,6 +334,7 @@ collections:
|
|||||||
- {label: "Text", name: "body", widget: "markdown"}
|
- {label: "Text", name: "body", widget: "markdown"}
|
||||||
- name: "schulchronik"
|
- name: "schulchronik"
|
||||||
label: "Schulchronik"
|
label: "Schulchronik"
|
||||||
|
label_singular: "Chronikjahr"
|
||||||
folder: "content/german/schulchronik"
|
folder: "content/german/schulchronik"
|
||||||
filter: {field: "type", value: "schulchronik"}
|
filter: {field: "type", value: "schulchronik"}
|
||||||
create: true
|
create: true
|
||||||
@ -332,6 +351,7 @@ collections:
|
|||||||
- {label: "Text", name: "body", widget: "markdown"}
|
- {label: "Text", name: "body", widget: "markdown"}
|
||||||
- name: "abiturienten"
|
- name: "abiturienten"
|
||||||
label: "Abiturienten"
|
label: "Abiturienten"
|
||||||
|
label_singular: "Abiturjahrgang"
|
||||||
folder: "content/german/abiturienten"
|
folder: "content/german/abiturienten"
|
||||||
filter: {field: "type", value: "abiturienten"}
|
filter: {field: "type", value: "abiturienten"}
|
||||||
create: true
|
create: true
|
||||||
|
@ -23,12 +23,9 @@
|
|||||||
<script src="https://sharadcodes.github.io/hugo-shortcodes-netlify-cms/dist/hugo_shortcodes_netlify_cms.js"></script>
|
<script src="https://sharadcodes.github.io/hugo-shortcodes-netlify-cms/dist/hugo_shortcodes_netlify_cms.js"></script>
|
||||||
<script>
|
<script>
|
||||||
CMS.registerEditorComponent({
|
CMS.registerEditorComponent({
|
||||||
// Internal id of the component
|
|
||||||
id: "collapsible-note",
|
id: "collapsible-note",
|
||||||
// Visible label
|
|
||||||
label: "Zugeklappter Abschnitt",
|
label: "Zugeklappter Abschnitt",
|
||||||
collapsed: true,
|
collapsed: true,
|
||||||
// Fields the user need to fill out when adding an instance of the component
|
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
name: 'summary',
|
name: 'summary',
|
||||||
@ -41,15 +38,7 @@ CMS.registerEditorComponent({
|
|||||||
widget: 'markdown'
|
widget: 'markdown'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
// Regex pattern used to search for instances of this block in the markdown document.
|
|
||||||
// Patterns are run in a multline environment (against the entire markdown document),
|
|
||||||
// and so generally should make use of the multiline flag (`m`). If you need to capture
|
|
||||||
// newlines in your capturing groups, you can either use something like
|
|
||||||
// `([\S\s]*)`, or you can additionally enable the "dot all" flag (`s`),
|
|
||||||
// which will cause `(.*)` to match newlines as well.
|
|
||||||
//
|
|
||||||
// Additionally, it's recommended that you use non-greedy capturing groups (e.g.
|
|
||||||
// `(.*?)` vs `(.*)`), especially if matching against newline characters.
|
|
||||||
pattern: /^{{% open-element title=\"(.*?)\" %}}$\s*?(.*?)\n^{{% \/open-element %}}$/ms,
|
pattern: /^{{% open-element title=\"(.*?)\" %}}$\s*?(.*?)\n^{{% \/open-element %}}$/ms,
|
||||||
// Given a RegExp Match object
|
// Given a RegExp Match object
|
||||||
// (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match#return_value),
|
// (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/match#return_value),
|
||||||
@ -207,6 +196,70 @@ var PostPreview = createClass({
|
|||||||
});
|
});
|
||||||
|
|
||||||
CMS.registerPreviewTemplate("schulchronik", PostPreview);
|
CMS.registerPreviewTemplate("schulchronik", PostPreview);
|
||||||
|
</script>
|
||||||
|
<script>
|
||||||
|
var EventPreview = createClass({
|
||||||
|
render: function() {
|
||||||
|
var entry = this.props.entry;
|
||||||
|
var image = entry.getIn(['data', 'image']);
|
||||||
|
var bg = this.props.getAsset(image);
|
||||||
|
const divStyle = {
|
||||||
|
backgroundImage: 'url("/media/backgrounds/page-title.png"),url("/media/backgrounds/page-title.png")',
|
||||||
|
};
|
||||||
|
return h('div', {},
|
||||||
|
h('section', {"className": "page-title-section overlay", "style": divStyle},
|
||||||
|
h('div', {"className": "row"},
|
||||||
|
h('div', {"className": "container"},
|
||||||
|
h('div', {"className": "col-md-8"},
|
||||||
|
h('ul', {"className": "list-inline custom-breadcrumb"},
|
||||||
|
h('li', {"className": "list-inline-item h1"},
|
||||||
|
h('a', {"className": "text-primary font-secondary", href: ""}, "Startseite")
|
||||||
|
),
|
||||||
|
h('li', {"className": "list-inline-item ha"},
|
||||||
|
h("i", {"className": "ti-angle-right text-white"})
|
||||||
|
),
|
||||||
|
h('li', {"className": "list-inline-item text-white h1 font-secondary"}, entry.getIn(['data', 'title'])
|
||||||
|
)
|
||||||
|
),
|
||||||
|
h('p', {"className": "text-lighten"}, entry.getIn(['data', 'description']))
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
h('section', {"className": "section"},
|
||||||
|
h('div', {"className": "container"},
|
||||||
|
h('div', {"className": "row"},
|
||||||
|
h('div', {"className": "col-12 "},
|
||||||
|
h('ul', {"className": "list-unstyled"},
|
||||||
|
this.props.widgetsFor('events').map(function(event, index) {
|
||||||
|
return h('li', {"className": "d-md-table mb-4 w-100 border-bottom hover-shadow"},
|
||||||
|
h('div', {"className": "d-md-table-cell text-center p-4 bg-primary text-white mb-4 mb-md-0"},
|
||||||
|
h('span', {"className": "h2 d-block"}, new Intl.DateTimeFormat('de-De', { day: 'numeric'}).format(event.getIn(['data', 'date']))),
|
||||||
|
new Intl.DateTimeFormat('de-De', { month: 'short', year: 'numeric' }).format(event.getIn(['data', 'date']))
|
||||||
|
),
|
||||||
|
h('div', {"className": "d-md-table-cell px-4 vertical-alighn-middle mb-4 mb-md-0"},
|
||||||
|
h('p', {"className": "h4 mb-3 d-block"}, event.getIn(['data', 'title'])),
|
||||||
|
h('p', {"className": "mb-0"}, event.getIn(['data', 'summary']))
|
||||||
|
),
|
||||||
|
h('div', {"className": "d-md-table-cell text-right pr-0 pr-md-4"},
|
||||||
|
h('p', {},
|
||||||
|
h('i', {"className": "ti-location-pin text-primary mr-2"}),
|
||||||
|
event.getIn(['data', 'location'])
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
})
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
CMS.registerPreviewTemplate("event-index", EventPreview);
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user