diff --git a/blueprints/modular/autoslideshow.yaml b/blueprints/modular/autoslideshow.yaml new file mode 100644 index 0000000..1f1899a --- /dev/null +++ b/blueprints/modular/autoslideshow.yaml @@ -0,0 +1,18 @@ +title: AutoSlideshow +extends@: + type: module + context: blueprints://pages +form: + validation: loose + fields: + header.duration: + type: text + label: Anzeigedauer (s) + help: Zeit in Sekunden bis zum Bildwechsel + default: 10 + validate: + required: true + type: int + header.media: + type: pagemedia + label: PLUGIN_ADMIN.PAGE_MEDIA \ No newline at end of file diff --git a/blueprints/modular/boxlist.yaml b/blueprints/modular/boxlist.yaml new file mode 100644 index 0000000..13ee00e --- /dev/null +++ b/blueprints/modular/boxlist.yaml @@ -0,0 +1,24 @@ +title: BoxList +extends@: + type: default + context: blueprints://pages +form: + validation: loose + fields: + header.boxes: + type: list + style: vertical + label: Einträge + fields: + .image: + type: pagemediaselect + label: Bild + .url: + type: text + label: Link + .title: + type: text + label: Titel + .description: + type: text + label: Beschreibung \ No newline at end of file diff --git a/blueprints/modular/slideshowext.yaml b/blueprints/modular/slideshowext.yaml new file mode 100644 index 0000000..473c726 --- /dev/null +++ b/blueprints/modular/slideshowext.yaml @@ -0,0 +1,27 @@ +title: SlideshowExt +extends@: + type: default + context: blueprints://pages +form: + validation: loose + fields: + header.slides: + type: list + style: vertical + label: Slides + fields: + .image: + type: pagemediaselect + label: Bild + .title: + type: text + label: Titel + .description: + type: markdown + label: Beschreibung + .btn: + type: text + label: Button-Text (optional) + .url: + type: text + label: Button-Link (optional) \ No newline at end of file diff --git a/blueprints/modular/textbg.yaml b/blueprints/modular/textbg.yaml new file mode 100644 index 0000000..63b021a --- /dev/null +++ b/blueprints/modular/textbg.yaml @@ -0,0 +1,46 @@ +title: TextBG +extends@: + type: default + context: blueprints://pages +form: + validation: loose + fields: + header.textstyle: + type: text + label: CSS für Textblock + help: 'Zusätzliche Inline-CSS-Regeln, die den ganzen Textblock betreffen' + default: '' + validate: + required: false + header.bgcolor: + type: text + label: Hintergrundfarbe + help: 'Als CSS-Parameter, z.B. Hex, rgb() oder rgba()' + default: '' + validate: + required: false + header.bgimage: + type: pagemediaselect + label: Hintergrundbild + default: '' + validate: + required: false + header.bgimgstyle: + type: text + label: CSS für Hintergrundbild + help: 'Zusätzliche Inline-CSS-Regeln, die für das Hintergrundbild gelten.' + default: '' + validate: + required: false + header.fullwidth: + type: toggle + label: Volle Breite + help: 'Aktiviert die Nutzung der vollen Bildschirmbreite für dieses Modul' + highlight: 1 + default: 0 + options: + 1: PLUGIN_ADMIN.ENABLED + 0: PLUGIN_ADMIN.DISABLED + validate: + required: true + type: bool \ No newline at end of file diff --git a/templates/modular.html.twig b/templates/modular.html.twig new file mode 100644 index 0000000..43c0059 --- /dev/null +++ b/templates/modular.html.twig @@ -0,0 +1,9 @@ +{% extends 'partials/base.html.twig' %} + +{% block content %} + {% for module in page.collection() %} + + {{ module.content|raw }} + + {% endfor %} +{% endblock %} \ No newline at end of file diff --git a/templates/modular/autoslideshow.html.twig b/templates/modular/autoslideshow.html.twig new file mode 100644 index 0000000..9b34f14 --- /dev/null +++ b/templates/modular/autoslideshow.html.twig @@ -0,0 +1,25 @@ +{% set slides = page.media.images %} + +{% block custom_stylesheets %} + {% do assets.addCss('theme://css/autoslideshow.css', 90) %} + {% set slideStyle %} + .auto-slideshow img { + animation-duration: {{ page.header.duration * 3 }}s; + } + {% for image in slides %} + .auto-slideshow img:nth-child({{ loop.index }}) { animation-delay: {{ loop.index0 * page.header.duration }}s } + {% endfor %} + {% endset %} + {% do assets.addInlineCss(slideStyle, 90) %} +{% endblock %} +