You are here

download-count-file-field-formatter.html.twig in Open Social 8.7

{{ attach_library('socialbase/file') }}
{% spaceless %}
  <li class="card-file">
    <a class="card-file__link" href="{{ link_url }}" title="{{ 'Open or download file'|t }}" target="_blank">
      <span class="card-file__title">{{ 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 class="card-file__count">{{ count }}</span>
      </span>
    </a>
  </li>
{% endspaceless %}

File

themes/socialbase/templates/file/download-count-file-field-formatter.html.twig
View source
  1. {{ attach_library('socialbase/file') }}
  2. {% spaceless %}
  3. <li class="card-file">
  4. <a class="card-file__link" href="{{ link_url }}" title="{{ 'Open or download file'|t }}" target="_blank">
  5. <span class="card-file__title">{{ link_text|replace({'_': ' '}) }}</span>
  6. <span class="card-file__type">
  7. <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 }}" />
  8. <span class="card-file__size">{{ file_size }}</span>
  9. <span class="card-file__count">{{ count }}</span>
  10. </span>
  11. </a>
  12. </li>
  13. {% endspaceless %}