{{ define "main" }}

<section class="py-5 bg-light">
  <div class="container">
    <div class="row">
      <div class="col-md-8 mx-auto text-center">
        <h1 class="h2 mb-0">{{ .Title }}</h1>
      </div>
    </div>
  </div>
</section>

<section class="section">
  <div class="container">
    <div class="row g-3 justify-content-center text-center">
        {{ if eq .Permalink (`tags/` | absURL)}}
        {{ if gt (len site.Taxonomies.tags) 0}}
        {{ range site.Taxonomies.tags }}
        <div class="col-sm-3">
          <a class="text-dark fw-bold px-4 py-3 rounded bg-light d-block text-capitalize" href="{{ .Page.RelPermalink }}"><i class="fas fa-tags me-1"></i> {{ .Page.Title }} ({{ .Count }})</a>
        </div>
        {{ end }}
        {{ else }}
        <div class="col-12 text-center">
          <h2 class="h4">{{ site.Params.no_tags_found }}</h2>
        </div>
        {{ end }}
        {{ end }}

        {{ if eq .Permalink (`categories/` | absURL)}}
        {{ if gt (len site.Taxonomies.categories) 0}}
        {{ range site.Taxonomies.categories }}
        <div class="col-sm-3">
          <a class="text-dark fw-bold px-4 py-3 rounded bg-light d-block text-capitalize" href="{{ .Page.RelPermalink }}"><i class="fas fa-folder me-1"></i> {{ .Page.Title }} ({{ .Count }})</a>
        </div>
        {{ end }}
        {{ else }}
        <div class="col-12 text-center">
          <h2 class="h4">{{ site.Params.no_categories_found }}</h2>
        </div>
        {{ end }}
        {{ end }}
      </div>
    </div>
  </div>
</section>

{{ end }}