{# /** * @file * SVG Icon template * * Variables: * - icon: Name of the icon; SVG should exist as build/img/icons/{icon}.swg * - text: Fallback text for screen readers, and when icon is not present. * - text_class: Provides a class using boolean text_visible, to add a class * which determines whether fallback text should appear visually or not. * - location: Location of text in markup: left (default) or right of icon). */ #} {% set text_class, location = text_visible ? 'icon-text' : 'icon-text-fallback', location ? location : 'left' %} {% if icon %} {% if text and location == 'right' %} {{ text }} {% endif %} {% if text and location == 'left' %} {{ text }} {% endif %} {% endif %}