<div class="my-5">
  <div class="d-flex mb-4">
    <h2 id="icons" class="mb-0">Icons</h2>
    <form class="subnav-search d-flex flex-nowrap ml-auto">
      <label for="search" class="sr-only">Search for icons</label>
      <input class="form-control search mb-0" id="search" placeholder="Start typing to filter..." autocomplete="off">
    </form>
  </div>
  <ul class="row row-cols-3 row-cols-sm-4 row-cols-lg-6 row-cols-xl-8 list-unstyled list">
    {{- $dirName := "icons" -}}

    {{- range (readDir $dirName) -}}
      {{- $filenameWithExt := split .Name "." -}}
      {{- $filename := index $filenameWithExt 0 -}}
      {{- $name := humanize $filename -}}
      <li class="col mb-4" data-tags="{{ with $.Site.GetPage "icons" $filename }}{{ with .Params.tags }}{{ delimit . " " }}{{ end }}{{ end }}">
        <a class="d-block text-dark text-decoration-none" href="/icons/{{ $filename }}/">
          <div class="p-3 py-4 mb-2 bg-light text-center rounded">
            <svg class="bi" width="1em" height="1em" fill="currentColor">
              <use xlink:href="bootstrap-icons.svg#{{ $filename }}"/>
            </svg>
          </div>
          <div class="name text-muted text-decoration-none text-center pt-1">
            {{ $name }}
          </div>
        </a>
      </li>
    {{ end -}}
  </ul>
</div>
