{# /** * @file * Theme override for a link to a file. * * Available variables: * - attributes: The HTML attributes for the containing element. * - link: A link to the file. * - icon: An icon. * - icon_only: Flag to display only the icon and not the label. * - icon_position: Where an icon should be displayed. * * @ingroup templates * * @see \Drupal\bootstrap\Plugin\Preprocess\FileLink::preprocessVariables */ #} {% apply spaceless %} {% set classes = [ icon_only ? 'icon-only', not icon_only ? 'icon-' ~ icon_position|clean_class ] %} {% if icon_only %} {{ icon }} {{ link }} {{ file_size }} {% else %} {% if icon_position == 'after' %} {{ link }}{{ file_size }}{{ icon }} {% else %} {{ icon }}{{ link }}{{ file_size }} {% endif %} {% endif %} {% endapply %}