{#
/**
* @file
* Theme override for a link to a file for nodes.
*
* Available variables:
* - attributes: The HTML attributes for the containing element.
* - link: A link to the file.
* - node_icon: An icon.
*
* @ingroup templates
*
* @see \Drupal\bootstrap\Plugin\Preprocess\FileLink::preprocessVariables
*/
#}
{{ attach_library('socialbase/file') }}
{% apply spaceless %}

  <li class="card-file">
    <a class="card-file__link notranslate" href="{{ link.url.uri }}" title="{{ link.text|replace({'_': ' '}) }}" target="_blank">
      <span class="card-file__title notranslate">{{ link.text|replace({'_': ' '}) }}</span>
      <span class="card-file__type">
        <img class="card-file__icon" src="/{{ path_to_socialbase }}/assets/images/mime-icons/icon_1_{{ node_icon }}_x16.png" srcset="/{{ path_to_socialbase }}/assets/images/mime-icons/icon_1_{{ node_icon }}_x32.png 2x" alt="{{ node_icon }}" />
        <span class="card-file__size">{{ file_size }}</span>
      </span>
    </a>
  </li>

{% endapply %}
