<footer class=“usa-footer usa-footer-medium” role=“contentinfo”>

{% if site.show_last_updated_at %}
  <div class="usa-grid">
    <div class="usa-width-one-whole">
      <p>Last updated: {{ page.last_modified_at | date: '%B %d, %Y at %I:%M %p' }}</p>
    </div>
  </div>
{% endif %}

{% unless site.show_return_to_top == false %}
  <div class="usa-grid usa-footer-return-to-top">
    <a href="#main-content">Return to top</a>
  </div>
{% endunless %}

{% if site.footer_nav %}
{% assign footer_links = site.footer_nav %}
{% assign _sizes = 'whole half third fourth sixth' | split: ' ' %}
{% assign _size = footer_links.size | minus: 1 %}
{% assign _size = _sizes[_size] | default: 'whole' %}
<div class="usa-footer-primary-section">
  <div class="usa-grid">
    <nav class="usa-footer-nav">
      <ul class="usa-unstyled-list">
        {% for _link in footer_links %}
        <li class="usa-width-one-{{ _size }} usa-footer-primary-content">
          <a class="usa-footer-primary-link" href="{% if _link.external == true %}{{ _link.href }}{% else %}{{ _link.href | relative_url }}{% endif %}">
            {{ _link.text }}
          </a>
        </li>
        {% endfor %}
      </ul>
    </nav>
  </div>
</div>
{% endif %}

<div class="usa-footer-secondary_section">
  <div class="usa-grid">
    <div class="usa-footer-logo usa-width-one-half">
      <div class="usa-footer-logo usa-width-one-half">
        <img class="usa-footer-logo-img" src="{{ site.contact.agency_logo | default: '/assets/uswds/img/logo-img.png' | relative_url }}" alt="{{ site.contact.agency_logo_alt | default: 'A U.S. Government seal.' }}">
        <h3 class="usa-footer-logo-heading">{{ site.contact.agency_name | default: 'Name of agency' }}</h3>
      </div>
    </div>

    <div class="usa-footer-contact-links usa-width-one-half">
      {% assign social_links = site.contact.social_links %}
      {% if site.contact.contact_links %}
        {% for _link in social_links %}
          <a class="usa-link-{{ _link.type | default: 'generic' }}" href="{% if _link.external == true %}{{ _link.href }}{% else %}{{ _link.href | relative_url }}{% endif %}">
            <span>{{ _link.text }}</span>
          </a>
        {% endfor %}
      {% endif %}
      <h3 class="usa-footer-contact-heading">{{ site.contact.heading | default: 'Agency contact center' }}</h3>
      {% if site.contact.contact_links %}
        <address>
          {% assign contact_links = site.contact.contact_links %}
          {% for _link in contact_links %}
            <div class="usa-footer-primary-content usa-footer-contact_info">
              <p>
                <a href="{% if _link.external == true %}{{ _link.href }}{% else %}{{ _link.href | relative_url }}{% endif %}">
                  {{ _link.text }}
                </a>
              </p>
            </div>
          {% endfor %}
        </address>
      {% endif %}
    {% unless site.show_suggest_an_edit == false %}
      <small><a href="https://github.com/{{ site.github.organization }}/{{ site.github.repository }}/edit/{{ site.github.default_branch }}/{{ page.path }}" class="usa-sidenav-edit" target="_blank">Edit this page</a></small>
    {% endunless %}
    </div>
  </div>
</div>

</footer>