{{- $logo          := "img/logos/footer-logo.png" | relURL }}
{{- $docs          := where .Site.Pages "Section" "docs" }}
{{- $year          := now.Year }}
{{- $twitterHandle := .Site.Params.twitterHandle }}
{{- $twitterUrl    := printf "https://twitter.com/@%s" $twitterHandle }}
{{- $githubRepo    := .Site.Params.githubRepo }}
{{- $githubUrl     := printf "https://github.com/%s" $githubRepo }}
{{- $slackChannel  := .Site.Params.slackChannel }}
{{- $projectPages  := where .Site.RegularPages "Section" "" }}
<div class="footer">
  <div class="container">
    <div class="columns">
      <div class="column">
        <img src="{{ $logo }}" class="is-footer-logo" alt="containerd footer logo">
      </div>
      
       <div class="column">
        <span class="is-size-4 is-size-5-mobile">
          Docs
        </span>

        <hr class="hr has-background-grey">

        <ul>
          {{- range $docs }}
          <li>
            <a href="{{ .RelPermalink }}">
              {{ .Title }}
            </a>
          </li>
          {{- end }}
        </ul>
      </div>

      <div class="column">
        <span class="is-size-4 is-size-5-mobile">
          Project
        </span>

        <hr class="hr has-background-grey">

        <ul>
          <li>
            <a href="https://github.com/cncf/foundation/blob/master/code-of-conduct.md">
              Code of conduct
            </a>
          </li>

          {{- range $projectPages }}
          <li>
            <a href="{{ .RelPermalink }}">
              {{ .Title }}
            </a>
          </li>
          {{- end }}
        </ul>
      </div>

      <div class="column">
        <span class="is-size-4 is-size-5-mobile">
          Community
        </span>

        <hr class="hr has-background-grey">

        <div class="buttons">
          <a class="button has-background-twitter-blue is-borderless has-text-white" href="{{ $twitterUrl }}">
            <span class="icon">
              <i class="fab fa-twitter" aria-hidden="true"></i>
            </span>
            <span>
              Twitter
            </span>
          </a>

          <a class="button is-borderless has-background-black has-text-white" href="{{ $githubUrl }}">
            <span class="icon">
              <i class="fab fa-github" aria-hidden="true"></i>
            </span>
            <span>
              GitHub
            </span>
          </a>

          <a class="button is-borderless has-background-slack-green has-text-white" href="{{ $slackChannel }}">
            <span class="icon">
              <i class="fab fa-slack" aria-hidden="true"></i>
            </span>
            <span>
              Slack
            </span>
          </a>
        </div>
          
      </div> <!-- .column -->
    </div> <!-- .column -->

    <hr class="hr has-background-grey-lighter">
  </div> <!-- .columns -->

  <div class="container has-text-centered">
    <div class="has-text-weight-light">
      <p class="is-size-5 is-size-6-mobile">
        &copy; containerd Authors {{ $year }} | Documentation Distributed under <a href="https://creativecommons.org/licenses/by/4.0/">CC-BY-4.0</a>
      </p>

      <br />

      <p>
        &copy; {{ $year }} The Linux Foundation. All rights reserved. The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our <a href="https://www.linuxfoundation.org/trademark-usage">Trademark Usage</a> page.
      </p>
    </div>
  </div> <!-- .container -->
</div> <!-- .footer -->
