You are here

social-media-links-platforms.html.twig in Social Media Links Block and Field 8.2

{#
/**
 * @ingroup themeable
 */
#}

{%
  set classes = [
    'social-media-links--platforms',
    'platforms',
    appearance.orientation == 'h' ? 'inline horizontal' : 'vertical',
  ]
%}

<ul{{ attributes.addClass(classes) }}>
  {% for platform in platforms %}
    <li>
      <a class="social-media-link-icon--{{ platform.id }}" href="{{ platform.url }}" {{ platform.attributes }} >
        {{ platform.element }}
      </a>

      {% if appearance.show_name %}
        {% if appearance.orientation == 'h' %}
          <br />
        {% endif %}

        <span><a class="social-media-link--{{ platform.id }}" href="{{ platform.url }}" {{ platform.attributes }}>{{ platform.name }}</a></span>
      {% endif %}
    </li>
  {% endfor %}
</ul>

File

templates/social-media-links-platforms.html.twig
View source
  1. {#
  2. /**
  3. * @ingroup themeable
  4. */
  5. #}
  6. {%
  7. set classes = [
  8. 'social-media-links--platforms',
  9. 'platforms',
  10. appearance.orientation == 'h' ? 'inline horizontal' : 'vertical',
  11. ]
  12. %}
  13. <ul{{ attributes.addClass(classes) }}>
  14. {% for platform in platforms %}
  15. <li>
  16. <a class="social-media-link-icon--{{ platform.id }}" href="{{ platform.url }}" {{ platform.attributes }} >
  17. {{ platform.element }}
  18. </a>
  19. {% if appearance.show_name %}
  20. {% if appearance.orientation == 'h' %}
  21. <br />
  22. {% endif %}
  23. <span><a class="social-media-link--{{ platform.id }}" href="{{ platform.url }}" {{ platform.attributes }}>{{ platform.name }}</a></span>
  24. {% endif %}
  25. </li>
  26. {% endfor %}
  27. </ul>