<nav>
  <div class="hidden md:flex">
    {{ range .Site.Menus.main }}
      <a
        class="px-2 mx-2 text-lg text-primary-500 font-semibold hover:underline"
        href="{{ .URL }}"
        >{{ .Name }}</a
      >
    {{ end }}
  </div>

  <div class="md:hidden mr-4 pt-4">
    <button class="navbar-burger">
      <svg viewBox="0 0 10 8" width="" class="w-6">
        <path
          d="M1 1h8M1 4h 8M1 7h8"
          stroke="#FFFFFF"
          stroke-width="1"
          stroke-linecap="round"
        />
      </svg>
    </button>
  </div>
</nav>

<nav class="navbar-menu absolute hidden">
  <div class="navbar-backdrop fixed inset-0 bg-gray-800 opacity-25"></div>
  <div
    class="fixed top-0 left-0 bottom-0 flex flex-col w-2/3 max-w-sm bg-primary-400 border-r-2 border-neutral-300 overflow-y-auto"
  >
    <div
      class="grid grid-rows-1 grid-cols-2 justify-between items-center mb-8 bg-white shadow-md"
    >
      <a href="/"> <img class="w-14 py-2 ml-6" src="/img/logo.svg" /></a>
      <button class="navbar-close ml-auto mr-6">
        <svg
          class="h-10 w-10 text-primary-400 cursor-pointer hover:text-primary-500"
          xmlns="http://www.w3.org/2000/svg"
          fill="none"
          viewBox="0 0 24 24"
          stroke="currentColor"
        >
          <path
            stroke-linecap="round"
            stroke-linejoin="round"
            stroke-width="2"
            d="M6 18L18 6M6 6l12 12"
          ></path>
        </svg>
      </button>
    </div>
    <div class="mt-8 grid grid-cols-1 gap-y-4">
      <a
        class="text-l mx-4 p-4 font-semibold text-white text-center no-underline hover:bg-primary-500 rounded"
        href="/"
        >Home</a
      >
      {{ range .Site.Menus.main }}

        <a
          class="text-l mx-4 p-4 font-semibold text-white text-center no-underline hover:bg-primary-500 rounded"
          href="{{ .URL }}"
          >{{ .Name }}</a
        >
      {{ end }}
    </div>
  </div>
</nav>
<script src="/js/mobile-menu.js"></script>
