Starter Projekt angefangen, etwas aufzubohren und ein paar grundlegend benötigte Collections, Teheming-Styles und Komponenten hinzugefügt. (WIP)

This commit is contained in:
Mario Linz 2022-05-24 16:44:55 +02:00
parent f4b6bb17ca
commit 47fdee2396
75 changed files with 2086 additions and 1234 deletions

Binary file not shown.

View File

@ -1,364 +0,0 @@
name: article
type: tabs
meta:
label:
de: Einstellungen zum Artikel
en: Article Setings
activeTab: 0
subFields:
- name: general
type: object
meta:
label:
de: Allgemein
en: General
css:
subFields:
- name: public
type: boolean
meta:
label:
de: Veröffentlicht
en: Public
helperText:
de: "Der Artikel wird auf der Seite angezeigt."
en: "This article is displayed on the page."
- name: publish_date
type: object
meta:
label:
de: Datum der Veröffentlichung
en: Release Date
css: "grid grid-50"
subFields:
- name: public_from
type: date
meta:
inputProps:
type: "datetime-local"
label:
de: Datum (ab)
en: Date (from)
- name: public_until
type: date
meta:
inputProps:
type: "datetime-local"
label:
de: Datum (bis)
en: Date (until)
- name: position
type: string
meta:
widget: select
label:
de: Position auf der Seite
en: Position on page
defaultValue: []
choices:
- { id: "content", name: "Inhaltsbereich" }
- { id: "sidebar", name: "Sidebar" }
- name: sort
type: number
meta:
inputProps:
type: number
placeholder: 0
label: { de: "Sortierung", en: "Sorting" }
helperText:
de: "1...5...10...100"
en: "1...5...10...100"
- name: content
type: object
meta:
label:
de: Inhalt
en: Content
css:
subFields:
- name: slug
type: string
meta:
label: { de: "Permalink", en: "Permalink" }
- name: title
type: string
meta:
label: { de: "Titel", en: "Title" }
- name: subtitle
type: string
meta:
label: { de: "Untertitel", en: "Subtitle" }
- name: types
type: tabs
meta:
label:
de: Inhalt dieses Artikel
en: Article Content
activeTab: 0
subFields:
- name: teaser
type: string
meta:
widget: richtext
label: { de: "Teaser-Text des Artikel", en: "Article Teaser Text" }
- name: details
type: string
meta:
widget: richtext
label: { de: "Detail-Text des Artikel", en: "Article Detail Text" }
- name: contentMedia
type: object
meta:
label:
de: Medien
en: Media
css:
subFields:
- name: mediaFiles
type: object[]
meta:
label: { de: "Bilder", en: "Images" }
subFields:
- name: title
type: string
meta:
label: { de: "Datei-Titel", en: "File Title" }
- name: alternateText
type: string
meta:
label: { de: "Alternativer Text", en: "Alternate Text" }
- name: id
type: string
meta:
label: { de: "Technischer Name / ID", en: "Technical name / ID" }
- name: file
type: file
meta:
label: { de: "Datei", en: "File" }
- name: caption
type: string
meta:
label: { de: "Bildunterschrift", en: "Caption" }
- name: contentAttachments
type: object
meta:
label:
de: Anhänge / Downloads
en: Attachments / Downloads
css:
subFields:
- name: attachments
type: object[]
meta:
label: { de: "Anhänge", en: "Attachments" }
subFields:
- name: title
type: string
meta:
label: { de: "Datei-Titel", en: "File Title" }
- name: id
type: string
meta:
label: { de: "Technischer Name / ID", en: "Technical name / ID" }
- name: file
type: file
meta:
label: { de: "", en: "" }
- name: layout
type: tabs
meta:
label:
de: Layout
en: Layout
css:
subFields:
- name: variant
type: string
meta:
widget: select
label:
de: Erscheinungsbild
en: Appearance
defaultValue: ["_self"]
choices:
- {
id: "top",
name: { de: "Artikelbild oben (volle Breite)", en: "Article picture top (full width)" },
}
- {
id: "right",
name: { de: "Artikelbild rechts (volle Höhe)", en: "Article picture right (full height)" },
}
- {
id: "bottom",
name: { de: "Artikelbild unten (volle Breite)", en: "Article picture left (full width)" },
}
- {
id: "left",
name: { de: "Artikelbild links (volle Höhe)", en: "Article picture left (full height)" },
}
- {
id: "after-teaser",
name:
{
de: "Artikelbild unter Teaser (volle Breite)",
en: "Article picture under teaser (full width)",
},
}
- { id: "top-left", name: { de: "Artikelbild oben links", en: "Article picture above left" } }
- { id: "top-right", name: { de: "Artikelbild oben rechts", en: "Article picture above right" } }
- { id: "bottom-left", name: { de: "Artikelbild unten links", en: "Article picture below left" } }
- {
id: "bottom-right",
name: { de: "Artikelbild unten rechts", en: "Article picture below right" },
}
- name: margin
type: object
meta:
label: { de: "Abstand nach außen (Margin)", en: "Distance to the outside (Margin)" }
subFields:
- name: top
type: string
meta:
widget: select
label:
de: Oben
en: Top
choices:
- { id: "", name: "Kein Abstand" }
- { id: "mt-xs", name: "Sehr kleiner Abstand" }
- { id: "mt-sm", name: "Kleiner Abstand" }
- { id: "mt-md", name: "Normal" }
- { id: "mt-lg", name: "Großer Abstand" }
- { id: "mt-xl", name: "Sehr großer Abstand" }
- name: right
type: string
meta:
widget: select
label:
de: Rechts
en: Right
choices:
- { id: "", name: "Kein Abstand" }
- { id: "mr-xs", name: "Sehr kleiner Abstand" }
- { id: "mr-sm", name: "Kleiner Abstand" }
- { id: "mr-md", name: "Normal" }
- { id: "mr-lg", name: "Großer Abstand" }
- { id: "mr-xl", name: "Sehr großer Abstand" }
- name: bottom
type: string
meta:
widget: select
label:
de: Unten
en: Bottom
choices:
- { id: "", name: "Kein Abstand" }
- { id: "mb-xs", name: "Sehr kleiner Abstand" }
- { id: "mb-sm", name: "Kleiner Abstand" }
- { id: "mb-md", name: "Normal" }
- { id: "mb-lg", name: "Großer Abstand" }
- { id: "mb-xl", name: "Sehr großer Abstand" }
- name: left
type: string
meta:
widget: select
label:
de: Links
en: Left
choices:
- { id: "", name: "Kein Abstand" }
- { id: "ml-xs", name: "Sehr kleiner Abstand" }
- { id: "ml-sm", name: "Kleiner Abstand" }
- { id: "ml-md", name: "Normal" }
- { id: "ml-lg", name: "Großer Abstand" }
- { id: "ml-xl", name: "Sehr großer Abstand" }
- name: padding
type: object
meta:
label: { de: "Abstand nach innen (Padding)", en: "Distance inside (Padding)" }
subFields:
- name: top
type: string
meta:
widget: select
label:
de: Oben
en: Top
choices:
- { id: "", name: "Kein Abstand" }
- { id: "pt-xs", name: "Sehr kleiner Abstand" }
- { id: "pt-sm", name: "Kleiner Abstand" }
- { id: "pt-md", name: "Normal" }
- { id: "pt-lg", name: "Großer Abstand" }
- { id: "pt-xl", name: "Sehr großer Abstand" }
- name: right
type: string
meta:
widget: select
label:
de: Rechts
en: Right
choices:
- { id: "", name: "Kein Abstand" }
- { id: "pr-xs", name: "Sehr kleiner Abstand" }
- { id: "pr-sm", name: "Kleiner Abstand" }
- { id: "pr-md", name: "Normal" }
- { id: "pr-lg", name: "Großer Abstand" }
- { id: "pr-xl", name: "Sehr großer Abstand" }
- name: bottom
type: string
meta:
widget: select
label:
de: Unten
en: Bottom
choices:
- { id: "", name: "Kein Abstand" }
- { id: "pb-xs", name: "Sehr kleiner Abstand" }
- { id: "pb-sm", name: "Kleiner Abstand" }
- { id: "pb-md", name: "Normal" }
- { id: "pb-lg", name: "Großer Abstand" }
- { id: "pb-xl", name: "Sehr großer Abstand" }
- name: left
type: string
meta:
widget: select
label:
de: Links
en: Left
choices:
- { id: "", name: "Kein Abstand" }
- { id: "pl-xs", name: "Sehr kleiner Abstand" }
- { id: "pl-sm", name: "Kleiner Abstand" }
- { id: "pl-md", name: "Normal" }
- { id: "pl-lg", name: "Großer Abstand" }
- { id: "pl-xl", name: "Sehr großer Abstand" }
- name: link
type: object
meta:
label:
de: Verlinkung
en: Link
css:
subFields:
- name: url
type: string
meta:
label: { de: "Ziel-URL", en: "Target URL" }
- name: text
type: string
meta:
label: { de: "Link-Beschriftung", en: "Link-Text" }
- name: target
type: string
meta:
widget: select
label:
de: Zielfenster
en: Target
defaultValue: ["_self"]
choices:
- { id: "_self", name: "(Standardwert) gleicher Tab oder Seite" }
- { id: "_blank", name: "Neuer Tab oder Fenster" }
- { id: "_parent", name: "Elternfenster" }

View File

@ -9,7 +9,7 @@ uploadPath: ../media/content
# Metaangaben zur Kollektion welche in der Admin-UI verwendet werden können
meta:
# Navigationseintrag in der Admin-UI
label: { de: "Seiteninhalt", en: "Page Content" }
label: { de: "Seiten", en: "Pages" }
# Icon (Material UI) für den Navigationseintrag
muiIcon: web
# Identifizierung eines Eintrags für z.B. Select-Boxen in der Admin-UI
@ -24,11 +24,13 @@ meta:
mediaQuery: "(max-width:599px)"
primaryText: path
columns:
- name
- path
# Desktop
- type: table
mediaQuery: "(min-width:600px)"
columns:
- name
- path
imageFilter:

75
api/collections/email.yml Normal file
View File

@ -0,0 +1,75 @@
########################################################################
# email
########################################################################
name: email
uploadPath: ../media/email
meta:
label: { de: "Kontaktformular", en: "Contact Form" }
muiIcon: email
rowIdentTpl: { twig: "{{ email }} - {{ subject }}" }
views:
- type: simpleList
mediaQuery: "(max-width: 600px)"
primaryText: email
secondaryText: subject
tertiaryText: insertTime
- type: table
columns:
- insertTime
- email
- subject
# Zugriff auf diese Kollektion
permissions:
# öffentlicher Zugriff
public:
methods:
# Liste und Einzeleinträge lesen
# checked via hook
get: false
# neuen Eintrag anlegen
post: true
# Eintrag editieren
put: false
# Eintrag löschen
delete: false
# zum Projekt zugeordneter Benutzer ohne Zusatzberechtigungen
user:
methods:
get: false
post: false
put: false
delete: false
# token als Zusatzsicherung gegen Spam, mehr siehe Hook
"token:${PUBLIC_TOKEN}":
methods:
get: false
post: true
put: false
delete: false
hooks:
post:
create:
type: javascript
file: hooks/email/post_create.js
fields:
- name: name
type: string
meta:
label: { de: "Name", en: "Name" }
- name: email
type: string
meta:
label: { de: "Email", en: "Email" }
- name: subject
type: string
meta:
label: { de: "Betreff", en: "Subject" }
- name: message
type: string
meta:
widget: richtext
label: { de: "Nachricht", en: "Message" }

View File

@ -9,7 +9,7 @@ meta:
en: "Defines in which language the menu is available. The default language is 'de-DE'.",
}
filter: true
defaultValue: "de-DE"
defaultValue: "de"
choices:
- { id: af, name: { key: "labels.locales.af" } }
- { id: af-ZA, name: { key: "labels.locales.af-ZA" } }

View File

@ -37,25 +37,219 @@ meta:
entryViewFields:
tabsSection:
meta:
expand: general
expand: meta
tabs:
- name: general
meta:
label: { de: "Allgemein", en: "General" }
source: generalInformation
- name: general2
meta:
label: { de: "Allgemein2", en: "General2 " }
fields:
- name: public
type: boolean
meta:
defaultValue: true
label:
de: Veröffentlicht
en: Public
helperText:
de: "Alle allgemeinen Informationen werden auf der Seite angezeigt."
en: "All general information are displayed on the page."
- name: meta
meta:
label: { de: "Meta", en: "Meta" }
fields:
- name: meta
type: object
subFields:
- name: metaTitle
type: string
meta:
label: { de: "Titel der Webseite", en: "Page Title" }
- name: metaDescription
type: string
meta:
label: { de: "Beschreibung der Webseite", en: "Page Description" }
- name: metaTagRobots
type: string[]
meta:
widget: chipArray
label:
de: Robots
en: Robots
defaultValue: []
autocomplete: true
choices:
- { id: "noindex", name: "noindex" }
- { id: "index", name: "index" }
- { id: "follow", name: "follow" }
- { id: "nofollow", name: "nofollow" }
- { id: "noimageindex", name: "noimageindex" }
- { id: "none", name: "none" }
- { id: "noarchive", name: "noarchive" }
- { id: "nocache", name: "nocache" }
- { id: "nosnippet", name: "nosnippet" }
- { id: "nnavailable_after", name: "nnavailable_after" }
helperText:
de: "<strong>Noindex</strong>: Weist eine Suchmaschine an, eine Seite nicht zu indizieren.<br/><strong>index</strong>: Weist eine Suchmaschine an, eine Seite zu indizieren. Beachten Sie, dass Sie dieses Meta-Tag nicht hinzufügen müssen; es ist die Voreinstellung.<br/><strong>follow</strong>: Auch wenn die Seite nicht indexiert ist, sollte der Crawler allen Links auf einer Seite folgen und Eigenkapital an die verlinkten Seiten weitergeben.<br/><strong>nofollow</strong>: Weist einen Crawler an, keinen Links auf einer Seite zu folgen oder Link-Equity weiterzugeben.<br/><strong>noimageindex</strong>: Weist einen Crawler an, keine Bilder auf einer Seite zu indizieren.<br/><strong>none</strong>: Entspricht der gleichzeitigen Verwendung der noindex- und nofollow-Tags.<br/><strong>noarchive</strong>: Suchmaschinen sollten keinen zwischengespeicherten Link zu dieser Seite auf einem SERP anzeigen.<br/><strong>nocache</strong>: Wie noarchive, aber nur von Internet Explorer und Firefox verwendet.<br/><strong>nosnippet</strong>: Weist eine Suchmaschine an, kein Snippet dieser Seite (d. h. Meta-Beschreibung) dieser Seite auf einem SERP anzuzeigen.<br/><strong>nnavailable_after</strong>: Suchmaschinen sollen diese Seite nach einem bestimmten Datum nicht mehr indexieren.<br/>"
en: "<strong>Noindex</strong>: Tells a search engine not to index a page.<br/><strong>index</strong>: Tells a search engine to index a page. Note that you dont need to add this meta tag; its the default.<br/><strong>follow</strong>: Even if the page isnt indexed, the crawler should follow all the links on a page and pass equity to the linked pages.<br/><strong>nofollow</strong>: Tells a crawler not to follow any links on a page or pass along any link equity.<br/><strong>noimageindex</strong>: Tells a crawler not to index any images on a page.<br/><strong>none</strong>: Equivalent to using both the noindex and nofollow tags simultaneously.<br/><strong>noarchive</strong>: Search engines should not show a cached link to this page on a SERP.<br/><strong>nocache</strong>: Same as noarchive, but only used by Internet Explorer and Firefox.<br/><strong>nosnippet</strong>: Tells a search engine not to show a snippet of this page (i.e. meta description) of this page on a SERP.<br/><strong>nnavailable_after</strong>: Search engines should no longer index this page after a particular date.<br/>"
- name: metaKeywords
type: string
meta:
label: { de: "SEO / Schlüsselwörter", en: "SEO / Keywords" }
helperText:
de: "Beispiel: Stichwort1, Stichwort2, Stichwort3"
en: "Example: keyword1, keyword2, keyword3"
- name: person
meta:
label: { de: "Person", en: "Person" }
fields:
- name: person
type: object
subFields:
- name: salutation
type: string
meta:
label: { de: "Anrede", en: "Salutation" }
- name: firstname
type: string
meta:
label: { de: "Vorname", en: "Firstname" }
- name: lastname
type: string
meta:
label: { de: "Nachname", en: "Lastname" }
- name: additional
type: string
meta:
label: { de: "Zusatz", en: "Additional" }
- name: street
type: string
meta:
label: { de: "Straße", en: "Street" }
- name: postcode
type: string
meta:
label: { de: "Postleitzahl", en: "Postcode" }
- name: city
type: string
meta:
label: { de: "Ort", en: "City" }
- name: tel
type: string
meta:
label: { de: "Telefonnummer", en: "Phone number" }
- name: fax
type: string
meta:
label: { de: "Faxnummer", en: "Fax number" }
- name: mobile
type: string
meta:
label: { de: "Handynummer", en: "Mobile number" }
- name: email
type: string
meta:
label: { de: "E-Mail", en: "E-Mail" }
- name: company
meta:
label: { de: "Unternehmen", en: "Company" }
fields:
- name: person
type: object
subFields:
- name: companyName
type: string
meta:
label: { de: "Name des Unternehmens", en: "Company Name" }
- name: companyWebUrl
type: string
meta:
label: { de: "URL zur Webseite", en: "Website URL" }
- name: companyAddresses
type: object[]
meta:
label:
de: Adresse
en: Adresse
css:
subFields:
- name: street
type: string
meta:
label: { de: "Straße", en: "Street" }
- name: houseNr
type: string
meta:
label: { de: "Hausnummer", en: "House number" }
- name: postcode
type: string
meta:
label: { de: "PLZ", en: "ZIP" }
- name: city
type: string
meta:
label: { de: "Ort", en: "City" }
- name: tel
type: string
meta:
label: { de: "Telefon", en: "Phone number" }
- name: fax
type: string
meta:
label: { de: "Fax", en: "Fax" }
- name: email
type: string
meta:
label: { de: "E-Mail", en: "E-Mail" }
- name: media
meta:
label: { de: "Medien", en: "Media" }
fields:
- name: media
type: object
subFields:
- name: favicon
type: file
meta:
label: { de: "Favicon", en: "Favicon" }
helperText:
de: "Ein Favicon ist ein kleines Icon, Symbol oder Logo, das von Webbrowsern verwendet wird, um eine Website auf wiedererkennbare Weise zu kennzeichnen."
en: "A favicon is a small icon, symbol, or logo used by web browsers to identify a website in a recognizable way."
- name: brand
type: file
meta:
label: { de: "Logo / Brand", en: "Logo / Brand" }
helperText:
de: "Logo der Seite"
en: "Page Logo"
- name: mediaFiles
type: object[]
meta:
label: { de: "Dateien", en: "Files" }
subFields:
- name: title
type: string
meta:
label: { de: "Datei-Titel", en: "File Title" }
- name: alternateText
type: string
meta:
label: { de: "Alternativer Text", en: "Alternate Text" }
- name: id
type: string
meta:
label: { de: "Technischer Name / ID", en: "Technical name / ID" }
- name: file
type: file
meta:
label: { de: "", en: "" }
- name: copyright
meta:
label: { de: "Copyright", en: "Copyright" }
fields:
- name: copyrightText
type: string
meta:
label: { de: "Copyright Text", en: "Copyright Text" }
imageFilter:
xs:
@ -110,231 +304,4 @@ permissions:
put: false
delete: false
fields:
- name: public
type: boolean
meta:
label:
de: Veröffentlicht
en: Public
helperText:
de: "Alle allgemeinen Informationen werden auf der Seite angezeigt."
en: "All general information are displayed on the page."
- name: generalInformation
type: tabs
meta:
label:
de: Allgemeine Information
en: General Information
activeTab: 0
subFields:
- name: types
type: object
meta:
label:
de: Allgemein
en: General
css:
subFields:
- name: public
type: boolean
meta:
label:
de: Veröffentlicht
en: Public
helperText:
de: "Alle allgemeinen Informationen werden auf der Seite angezeigt."
en: "All general information are displayed on the page."
- name: meta
type: object
meta:
label:
de: Meta
en: Meta
css:
subFields:
- name: metaTitle
type: string
meta:
label: { de: "Titel der Webseite", en: "Page Title" }
- name: metaDescription
type: string
meta:
label: { de: "Beschreibung der Webseite", en: "Page Description" }
- name: metaTagRobots
type: string[]
meta:
widget: chipArray
label:
de: Robots
en: Robots
defaultValue: []
autocomplete: true
choices:
- { id: "noindex", name: "noindex" }
- { id: "index", name: "index" }
- { id: "follow", name: "follow" }
- { id: "nofollow", name: "nofollow" }
- { id: "noimageindex", name: "noimageindex" }
- { id: "none", name: "none" }
- { id: "noarchive", name: "noarchive" }
- { id: "nocache", name: "nocache" }
- { id: "nosnippet", name: "nosnippet" }
- { id: "nnavailable_after", name: "nnavailable_after" }
helperText:
de: "<strong>Noindex</strong>: Weist eine Suchmaschine an, eine Seite nicht zu indizieren.<br/><strong>index</strong>: Weist eine Suchmaschine an, eine Seite zu indizieren. Beachten Sie, dass Sie dieses Meta-Tag nicht hinzufügen müssen; es ist die Voreinstellung.<br/><strong>follow</strong>: Auch wenn die Seite nicht indexiert ist, sollte der Crawler allen Links auf einer Seite folgen und Eigenkapital an die verlinkten Seiten weitergeben.<br/><strong>nofollow</strong>: Weist einen Crawler an, keinen Links auf einer Seite zu folgen oder Link-Equity weiterzugeben.<br/><strong>noimageindex</strong>: Weist einen Crawler an, keine Bilder auf einer Seite zu indizieren.<br/><strong>none</strong>: Entspricht der gleichzeitigen Verwendung der noindex- und nofollow-Tags.<br/><strong>noarchive</strong>: Suchmaschinen sollten keinen zwischengespeicherten Link zu dieser Seite auf einem SERP anzeigen.<br/><strong>nocache</strong>: Wie noarchive, aber nur von Internet Explorer und Firefox verwendet.<br/><strong>nosnippet</strong>: Weist eine Suchmaschine an, kein Snippet dieser Seite (d. h. Meta-Beschreibung) dieser Seite auf einem SERP anzuzeigen.<br/><strong>nnavailable_after</strong>: Suchmaschinen sollen diese Seite nach einem bestimmten Datum nicht mehr indexieren.<br/>"
en: "<strong>Noindex</strong>: Tells a search engine not to index a page.<br/><strong>index</strong>: Tells a search engine to index a page. Note that you dont need to add this meta tag; its the default.<br/><strong>follow</strong>: Even if the page isnt indexed, the crawler should follow all the links on a page and pass equity to the linked pages.<br/><strong>nofollow</strong>: Tells a crawler not to follow any links on a page or pass along any link equity.<br/><strong>noimageindex</strong>: Tells a crawler not to index any images on a page.<br/><strong>none</strong>: Equivalent to using both the noindex and nofollow tags simultaneously.<br/><strong>noarchive</strong>: Search engines should not show a cached link to this page on a SERP.<br/><strong>nocache</strong>: Same as noarchive, but only used by Internet Explorer and Firefox.<br/><strong>nosnippet</strong>: Tells a search engine not to show a snippet of this page (i.e. meta description) of this page on a SERP.<br/><strong>nnavailable_after</strong>: Search engines should no longer index this page after a particular date.<br/>"
- name: metaKeywords
type: string
meta:
label: { de: "SEO / Schlüsselwörter", en: "SEO / Keywords" }
helperText:
de: "Beispiel: Stichwort1, Stichwort2, Stichwort3"
en: "Example: keyword1, keyword2, keyword3"
- name: person
type: object
meta:
label:
de: Personendaten
en: Personal Data
css:
subFields:
- name: firstname
type: string
meta:
label: { de: "Vorname", en: "Firstname" }
- name: lastname
type: string
meta:
label: { de: "Nachname", en: "Lastname" }
- name: street
type: string
meta:
label: { de: "Straße", en: "Street" }
- name: postcode
type: string
meta:
label: { de: "Postleitzahl", en: "Postcode" }
- name: city
type: string
meta:
label: { de: "Ort", en: "City" }
- name: tel
type: string
meta:
label: { de: "Telefonnummer", en: "Phone number" }
- name: mobile
type: string
meta:
label: { de: "Handynummer", en: "Mobile number" }
- name: email
type: string
meta:
label: { de: "E-Mail", en: "E-Mail" }
- name: company
type: object
meta:
label:
de: Unternehmensdaten
en: Company Data
css:
subFields:
- name: companyName
type: string
meta:
label: { de: "Name des Unternehmens", en: "Company Name" }
- name: companyWebUrl
type: string
meta:
label: { de: "URL zur Webseite", en: "Website URL" }
- name: companyAddresses
type: object[]
meta:
label:
de: Adresse
en: Adresse
css:
subFields:
- name: street
type: string
meta:
label: { de: "Straße", en: "Street" }
- name: houseNr
type: string
meta:
label: { de: "Hausnummer", en: "House number" }
- name: postcode
type: string
meta:
label: { de: "PLZ", en: "ZIP" }
- name: city
type: string
meta:
label: { de: "Ort", en: "City" }
- name: tel
type: string
meta:
label: { de: "Telefon", en: "Phone number" }
- name: fax
type: string
meta:
label: { de: "Fax", en: "Fax" }
- name: email
type: string
meta:
label: { de: "E-Mail", en: "E-Mail" }
- name: media
type: object
meta:
label:
de: Media
en: Media
css:
subFields:
- name: favicon
type: file
meta:
label: { de: "Favicon", en: "Favicon" }
helperText:
de: "Ein Favicon ist ein kleines Icon, Symbol oder Logo, das von Webbrowsern verwendet wird, um eine Website auf wiedererkennbare Weise zu kennzeichnen."
en: "A favicon is a small icon, symbol, or logo used by web browsers to identify a website in a recognizable way."
- name: brand
type: file
meta:
label: { de: "Logo / Brand", en: "Logo / Brand" }
helperText:
de: "Logo der Seite"
en: "Page Logo"
- name: mediaFiles
type: object[]
meta:
label: { de: "Dateien", en: "Files" }
subFields:
- name: title
type: string
meta:
label: { de: "Datei-Titel", en: "File Title" }
- name: alternateText
type: string
meta:
label: { de: "Alternativer Text", en: "Alternate Text" }
- name: id
type: string
meta:
label: { de: "Technischer Name / ID", en: "Technical name / ID" }
- name: file
type: file
meta:
label: { de: "", en: "" }
- name: copyright
type: object
meta:
label:
de: Copyright
en: Copyright
css:
subFields:
- name: copyrightText
type: string
meta:
label: { de: "Copyright Text", en: "Copyright Text" }
fields: []

View File

@ -104,15 +104,15 @@ x-settings: &settings
x-page: &page
name: page
type: string
type: object
meta:
widget: select
label: { de: Seite, en: "Page" }
choices:
endpoint: "content"
mapping:
id: "id"
name: "path"
id: "path"
name: "name"
params:
count: 1
sort: "ASC"
@ -170,10 +170,10 @@ fields:
name:
de: Hauptnavigation
en: Main Navigation
- id: service
- id: footer
name:
de: Servicenavigation
en: Servicen Navigation
de: Fußzeile
en: Footer Navigation
- !include fields/_locale.yml

View File

@ -49,9 +49,11 @@
"typescript": "^4.6.3"
},
"dependencies": {
"@mdi/js": "^6.7.96",
"@sentry/browser": "^6.19.6",
"@sentry/tracing": "^6.19.6",
"core-js": "3.22.2"
"core-js": "3.22.2",
"mdi-svelte": "^1.1.2"
},
"optionalDependencies": {
"@cypress/code-coverage": "^3.9.12",

View File

@ -49,6 +49,17 @@
<div id="appContainer"><!--HTML--></div>
<script type="module" src="/_dist_/index.mjs?t=__TIMESTAMP__"></script>
<script nomodule src="/_dist_/index.es5.js?t=__TIMESTAMP__"></script>
<!-- Webmakers - Cookie Bar -->
<script
src="//cc.webmakers.de/cc.js"
defer
id="ccScript"
data-cc-tags="googleMaps"
data-cc-privacy-policy-url="/datenschutz"
data-cc-secondary-color="#c4253e"
data-cc-necessary-cookies="likecmsSession"
></script>
</body>
<!--SSR.ERROR-->

View File

@ -1,6 +1,7 @@
import { apiBaseURL } from "./config"
import * as sentry from "./sentry"
import * as SSR from "../api/hooks/lib/ssr.js"
import config from "../api/hooks/config"
// [MIT License](LICENSE.md) © [Jason Miller](https://jasonformat.com/)
const _f = function (url, options): Promise<Response> {
@ -74,9 +75,12 @@ export const api = async <T>(
headers?: {
[key: string]: string
}
params?: {
[key: string]: string
}
params?: APIParams
body?: any
noToken?: boolean
signal?: AbortSignal
_groupBy?: string
showErrors?: boolean
}
): Promise<{ data: T; count: number }> => {
if (typeof window === "undefined") {
@ -98,6 +102,7 @@ export const api = async <T>(
}
let method = "GET"
if (options?.method) method = options.method.toUpperCase()
let query = "&count=1"
if (options?.filter) query += "&filter=" + encodeURIComponent(JSON.stringify(options.filter))
@ -105,6 +110,7 @@ export const api = async <T>(
if (options?.limit) query += "&limit=" + options.limit
if (options?.offset) query += "&offset=" + options.offset
if (options?.projection) query += "&projection=" + options.projection
if (options?._groupBy) query += "&_groupBy=" + options._groupBy
if (options?.params) {
Object.keys(options.params).forEach((p) => {
@ -116,9 +122,17 @@ export const api = async <T>(
"Content-Type": "application/json",
}
// send jwt
if (!options?.noToken) {
// try {
// headers["Authorization"] =
// "Bearer " + (await getLogin()).tokenString
// } catch (e) { }
}
if (options?.headers) headers = { ...headers, ...options.headers }
let url = apiBaseURL + endpoint + (query ? "?" + query : "")
let url = apiBaseURL + endpoint + (query ? (endpoint.includes("?") ? query : "?" + query) : "")
const span = sentry.currentTransaction()?.startChild({
op: "fetch",
@ -130,21 +144,46 @@ export const api = async <T>(
headers["sentry-trace"] = trace_id
}
const response = await _fetch(url, {
method,
mode: "cors",
headers,
try {
const response = await _fetch(url, {
method,
mode: "cors",
headers,
body: options?.body ? JSON.stringify(options.body) : null,
signal: options?.signal,
})
span?.finish()
// @ts-ignore
let data = (await response?.json()) || null
if (response?.status < 200 || response?.status >= 400) throw { response, data }
// @ts-ignore
return { data, count: response?.headers?.get("x-results-count") || 0 }
} catch (e) {
if (options?.showErrors && !(e instanceof DOMException)) {
// newNotification({
// class: "error",
// html: "Es ist ein Fehler aufgetreten! Bitte laden Sie die Seite neu und versuchen es später nocheinmal.",
// timeout: 6000,
// })
}
throw e
}
}
export const sendEmail = async (type: string = "contactForm", data: any, noToken?: boolean) => {
await api("email?type=" + type, {
method: "post",
body: data,
noToken,
showErrors: true,
headers: {
token: config.publicToken,
},
})
span?.finish()
// @ts-ignore
let data = (await response?.json()) || null
if (response?.status < 200 || response?.status >= 400) throw { response, data }
// @ts-ignore
return { data, count: response?.headers?.get("x-results-count") || 0 }
}
export const getContent = async (path: string): Promise<Content> => {
@ -155,14 +194,14 @@ export const getContent = async (path: string): Promise<Content> => {
return null
}
export const getGeneralInformation = async (): Promise<GeneralInformation[]> => {
export const getGeneralInformation = async (): Promise<GeneralInfo[]> => {
try {
let response = await api<GeneralInformation[]>("general", {
let response = await api<GeneralInfo[]>("general", {
method: "get",
offset: 0,
limit: 1,
filter: {
active: true,
public: true,
},
})
return response.data
@ -185,3 +224,38 @@ export const getArticles = async (): Promise<TibiArticle[]> => {
return null
}
}
export const getNavigations = async (l: Locale): Promise<Navigation[]> => {
try {
let response = await api<Navigation[]>("navigation", {
method: "get",
offset: 0,
filter: {
locale: l.key,
},
})
return response.data
} catch (e) {
return null
}
}
export const getGalleries = async (galIds: number[], params?: APIParams): Promise<Gallery[]> => {
try {
let response = await api<Gallery[]>("galleries", {
method: "get",
offset: 0,
params: {
sort: "title",
...params,
},
filter: {
_id: { $in: galIds },
},
})
return response.data
} catch (e) {
return null
}
}

View File

@ -1,9 +1,14 @@
<script lang="ts">
import { Router, Route, links } from "svelte-routing"
import { Router, Route } from "svelte-routing"
import { scrollToTop } from "svelte-scrollto"
import { location } from "../store"
import Home from "./routes/Home.svelte"
import Content from "./routes/Content.svelte"
import Header from "./widgets/Header.svelte"
import Footer from "./widgets/Footer.svelte"
export let url = ""
if (url) {
// ssr
@ -24,23 +29,21 @@
if (typeof window !== "undefined") console.log("App initialized")
</script>
<style lang="less" global>
@import "./../css/main.less";
h1 {
color: red;
}
</style>
<Header />
<h1>__PROJECT_TITLE__</h1>
<div use:links>
<a href="/test1">1</a>
<a href="/test2">2</a>
<a href="/test3">3</a>
<a href="/test4">4</a>
<div>
<Router url="{url}">
<Route path="/" let:params>
<Home />
</Route>
<Route path="/*path" let:params>
<Content path="/{params.path}" />
</Route>
</Router>
</div>
<Footer />
<style lang="less" global>
@import "./../css/main.less";
</style>

View File

@ -1,109 +0,0 @@
<script lang="ts">
export let blocks: ContentBlock[]
export let imageBase: string
export let accordeon = false
let activeAccordeons: {
[key: number]: boolean
} = {}
</script>
<style lang="less">
.acc_trigger {
display: flex;
display: -webkit-flex;
align-items: center;
justify-content: space-between;
cursor: pointer;
border-bottom: solid 1px #ccc;
padding-bottom: 10px;
.icon {
display: flex;
display: -webkit-flex;
align-items: center;
justify-content: center;
font-size: 30px;
transform: rotate(0deg);
transition: all 0.3s;
}
&.active {
.icon {
transform: rotate(180deg);
}
}
}
.hideText {
display: none;
}
</style>
{#if blocks?.length}
<section class="section_padding">
<div class="container">
{#each blocks as box, idx}
<!-- Teaserbox -->
<div class="row center_row">
{#if box.images?.length && (box.layout == 1 || box.layout == 3)}
<div class="col-md-{box.layout < 3 ? 6 : 12}">
<img
loading="lazy"
src="{imageBase + box.images[0].file.src}"
alt="{box.images[0].label || ''}"
/>
</div>
{/if}
{#if box.text || box.title || (box.button_text && box.button_url)}
<div class="col-md-{box.layout < 3 ? 6 : 12}">
{#if box.subtitle}
<div class="subline">{box.subtitle}</div>
{/if}
{#if box.title}
{#if accordeon == true}
<h2
class="h2_nooffset acc_trigger"
class:active="{activeAccordeons[idx]}"
on:click="{() => {
activeAccordeons[idx] =
!activeAccordeons[idx]
}}"
>
{box.title}
<span class="icon">\/</span>
</h2>
{:else}
<h2 class="h2_nooffset">{box.title}</h2>
{/if}
{/if}
<div
class="boxText"
class:hideText="{accordeon &&
box.title &&
!activeAccordeons[idx]}"
>
{@html box.text}
{#if box.button_text && box.button_url}
<a
href="{box.button_url}"
class="btn btn_blue"
>{box.button_text}</a
>
{/if}
</div>
</div>
{/if}
{#if box.images?.length && (box.layout == 2 || box.layout == 4)}
<div class="col-md-{box.layout < 3 ? 6 : 12}">
<img
loading="lazy"
src="{imageBase + box.images[0].file.src}"
alt="{box.images[0].label || ''}"
/>
</div>
{/if}
</div>
{/each}
</div>
</section>
{/if}

View File

@ -1,95 +0,0 @@
<script lang="ts">
import { generalInformation } from "../store"
import { apiBaseURL } from "../config"
export let article: PrototypeArticle
export let details: boolean = false
const a = article.article
let cssClasses: string = "p_article"
cssClasses += a.layout.variant ? " p_article-" + a.layout.variant : ""
cssClasses += " " + Object.values(a.layout.margin).join(" ")
cssClasses += " " + Object.values(a.layout.padding).join(" ")
const getImageAlt = (image): string => {
if (image.alternateText) {
return image.alternateText
}
if (image.title) {
return image.title
}
return a.content.title
}
const getImageSrc = (file) => {
const url = `${apiBaseURL}prototype_articles/${file.id}/${file.file.path}?filter=l`
console.log(url, file)
return url
}
</script>
{#if a.general.public}
<article class="{cssClasses}">
{#if !a.layout.variant || a.layout.variant === "top-left"}
{#if a.general.categories}
<div class="p_article-categories">
{#each a.general.categories || [] as c}
<</