{{ $links := .Site.Params.links }}
<footer class="td-footer row d-print-none">
  <div class="container-fluid">
    <div class="row mx-md-2">
      {{ with $links }}
      <div class="td-footer__links-block col-12 col-sm-6 col-md-4 col-lg-2">
        <ul class="list-unstyled">
          {{ with index . "user"}}
            {{ template "footer-links-block"  . }}
          {{ end }}
        </ul>
      </div>
      <div class="td-footer__links-block col-12 col-sm-6 col-md-4 col-lg-2">
        <ul class="list-unstyled">
          {{ with index . "developer"}}
            {{ template "footer-links-block"  . }}
          {{ end }}
        </ul>
      </div>
      {{ end }}
      {{ with .Site.GetPage "privacy-policy" }}
      <div class="td-footer__links-block col-12 col-sm-6 col-md-4 col-lg-2">
        <ul class="list-unstyled">
          <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
        </ul>
      </div>
      {{ end }}
      {{ with .Site.GetPage "deprecation-policy" }}
      <div class="td-footer__links-block col-12 col-sm-6 col-md-4 col-lg-2">
        <ul class="list-unstyled">
          <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
        </ul>
      </div>
      {{ end }}
    </div>
    <div class="row mx-md-2">
      <div class="td-footer__copyright-etc col-12 text-center">
        {{ with .Site.Params.copyright.authors }}
          <small class="text-white">&copy; {{ with $.Site.Params.copyright.from_year }}{{ . }}-{{ end }}{{ now.Year }} {{ . }} | <a href="https://creativecommons.org/licenses/by/4.0" target="_blank">CC BY 4.0</a> | </small>
        {{ end }}
        {{ if .Site.Data.build_info }}
          <small class="text-white">Build: {{ .Site.Data.build_info.git_commit_short }} | </small>
        {{ end }}
        {{ if not .Site.Params.ui.footer_about_disable }}
          {{ with .Site.GetPage "/about" }}<p class="mt-2"><a href="{{ .RelPermalink }}">{{ .Title }}</a></p>{{ end }}
        {{ end }}
      </div>
    </div>
  </div>
</footer>

{{ define "footer-links-block" }}
{{ range . }}
<li><a {{ if .url }}href="{{ .url }}"{{ end }} {{ with .target }}target="{{ . }}"{{ end }}>{{ .name }}</a></li>
{{ end }}
{{ end }}
