Section
Über das Pattern
Parameter und Anwendung in Nunjucks
# Parameter section(type, attributes)
type: "string" # zulässige Werte: highlight (mit Hintergrundfarbe), fixed (Maximalhöhe), reduced (margin-bottom: xsmall), intro (margin-bottom: small)
attributes: "object" # HTML-Attribute (z. B.: class,...), frei wählbar (optional)
semantic: "boolean" # sections werden als <section> ausgeliefert, außer man setzt den Wert auf false, dann als <div>.
# Anwendung section()
{% from "components/section/section.njk" import section with context %}
{% call section() %}
Inhalt frei wählbar
{% endcall %}
# Parameter row(richText)
richText: "boolean" # wm-rich-text Klasse zuweisen
# Anwendung row()
{% from "components/section/section.njk" import section, row with context %}
{% call section() %}
{% call row(true) %}
Inhalt frei wählbar
{% endcall %}
{% endcall %}
Variationen
Section Standard
Von einer Section zur nächsten:
- Mobil: 50px
- Desktop: 80px
Section mit Hintergrund
Mit Hintergrund gilt ein Innenabstand von:
- Mobil: 5px
- Desktop: 50px