{# Ein Menüeintrag als Button (ADR 110): dieselben Klassen wie der Button-Baustein, also dieselben Website-Standards, Varianten, Symbole und Bewegungen. Eigene Farben stehen als Regel für .menu-button- im Stylesheet der Seite. Die Beschriftung bleibt auch bei "nur Symbol" im Link - als zugänglicher Name. #} {% set b = link.button %} {% set iconFirst = link.iconPosition|default('before') == 'before' %} {% set hasIcon = link.icon|default('') != '' %} {# forceIconOnly: neben dem Menü-Knopf auf dem Telefon, wenn dort nur das Symbol stehen soll. #} {% set iconOnly = hasIcon and (b.iconOnly|default(false) or forceIconOnly|default(false)) %} {% set classes = 'button cms-button menu-button menu-button-' ~ b.id %} {% for key in ['shape', 'appearance', 'size'] %}{% if b[key] is defined %}{% set classes = classes ~ ' b-desktop-' ~ key ~ '-' ~ b[key] %}{% endif %}{% endfor %} {% if hasIcon %}{% set classes = classes ~ (iconFirst ? ' icon-start' : '') ~ (b.iconMotion|default('none') != 'none' ? ' icon-motion-' ~ b.iconMotion : '') ~ (iconOnly ? ' icon-only' : '') %}{% endif %} {% set iconMarkup = '' %} {% if hasIcon %}{% set iconMarkup %}{% endset %}{% endif %} {% if iconMarkup and iconFirst %}{{ iconMarkup }} {% endif %}{{ link.label }}{% if iconMarkup and not iconFirst %} {{ iconMarkup }}{% endif %}