{% extends "dsfr/follow.html" %}
{% load i18n %}

{% block follow_newsletter %}
  {% if settings.sites_conformes_content_manager.CmsDsfrConfig.show_newsletter_block %}
    <div class="fr-col-12{% if settings.sites_conformes_content_manager.CmsDsfrConfig.show_social_block %} fr-col-md-8{% endif %}">
      <div class="fr-follow__newsletter">
        <div>
          <h2 class="fr-h5">{% translate "Subscribe to our newsletter" context "Section title" %}</h2>
          <p class="fr-text--sm">{{ settings.sites_conformes_content_manager.CmsDsfrConfig.newsletter_description | safe }}</p>
        </div>
        <div class="fr-btns-group fr-btns-group--inline-md">
          {% translate "Subscribe to our newsletter" context "Button title" as subcribe_button_title %}
          <a class="fr-btn"
             href="{{ settings.sites_conformes_content_manager.CmsDsfrConfig.newsletter_url }}"
             target="_blank"
             rel="noopener external"
             title="{{ subcribe_button_title }} - {{ new_window_label }}">{% translate "Subscribe" %}</a>
        </div>
      </div>
    </div>
  {% endif %}
{% endblock follow_newsletter %}

{% block follow_social %}
  {% if settings.sites_conformes_content_manager.CmsDsfrConfig.show_social_block %}
    <div class="fr-col-12{% if settings.sites_conformes_content_manager.CmsDsfrConfig.show_newsletter_block %} fr-col-md-4{% endif %}">
      <div class="fr-follow__social">
        <h2 class="fr-h5">
          {% blocktranslate trimmed %}
            Follow us
            <br />
            on social media
          {% endblocktranslate %}
        </h2>
        <ul class="fr-btns-group">
          {% for link in settings.sites_conformes_content_manager.CmsDsfrConfig.social_media_items.all %}
            <li>
              <a class="{{ link.icon_class }} fr-btn"
                 href="{{ link.url }}"
                 target="_blank"
                 title="{{ link.title }} - {{ new_window_label }}"
                 rel="noopener external">{{ link.title }}</a>
            </li>
          {% endfor %}
        </ul>
      </div>
    </div>
  {% endif %}
{% endblock follow_social %}
