{{ $styles := resources.Get "css/partials/header.css" | toCSS | minify }}
{{ $scripts := resources.Get "js/partials/header.js" | js.Build | minify }}

<link rel="stylesheet" href="{{ $styles.Permalink }}">
<script defer src="{{ $scripts.Permalink }}"></script>

{{ $faceImage := resources.Get "images/small-face.png" }}
{{ $cv := resources.Get "cv.pdf" }}

<header>
  <div id="header-face">
    <img src="{{ $faceImage.Permalink }}" alt="Hazem Krimi" />
    <h3>Hazem Krimi</h3>
  </div>
  <div id="menus">
    {{ range site.Menus.main.Sort.ByWeight }}
      <a {{ printf "href=%q" .URL | safeHTMLAttr }}>{{ .Name }}</a>
    {{ end }}
  </div>
  <div id="links">
    <a href="https://www.linkedin.com/in/hazemkrimi" target="_blank"> {{ readFile "assets/icons/linkedin.svg" | safeHTML }} </a>
    <a href="https://twitter.com/HazemKrimi" target="_blank"> {{ readFile "assets/icons/twitter.svg" | safeHTML }} </a>
    <a href="https://github.com/hazemKrimi" target="_blank"> {{ readFile "assets/icons/github.svg" | safeHTML }} </a>
    <a href="/" target="_blank"> {{ readFile "assets/icons/rss.svg" | safeHTML }} </a>
    <a href="mailto:me@hazemkrimi.tech" target="_blank"> {{ readFile "assets/icons/mail.svg" | safeHTML }} </a>
    <a href="{{ $cv.Permalink }}" target="_blank"> {{ readFile "assets/icons/cv.svg" | safeHTML }} </a>
    <div class="vertical-separator"></div>
    <span
      class="theme-toggler"
    >
      {{ readFile "assets/icons/moon.svg" | safeHTML }}
      {{ readFile "assets/icons/sun.svg" | safeHTML }}
    </span>
  </div>
  <span
    id="nav-toggler"
  >
    {{ readFile "assets/icons/burger.svg" | safeHTML }}
    {{ readFile "assets/icons/close.svg" | safeHTML }}
  </span>
</header>

<nav>
  <div id="menus">
    {{ range site.Menus.main.Sort.ByWeight }}
      <a {{ printf "href=%q" .URL | safeHTMLAttr }}>{{ .Name }}</a>
    {{ end }}
  </div>
  <hr>
  <div id="links">
    <span
      class="theme-toggler"
    >
      {{ readFile "assets/icons/moon.svg" | safeHTML }}
      {{ readFile "assets/icons/sun.svg" | safeHTML }}
    </span>
    <a href="{{ $cv.Permalink }}" target="_blank"> {{ readFile "assets/icons/cv.svg" | safeHTML }} </a>
    <a href="mailto:me@hazemkrimi.tech" target="_blank"> {{ readFile "assets/icons/mail.svg" | safeHTML }} </a>
    <a href="/" target="_blank"> {{ readFile "assets/icons/rss.svg" | safeHTML }} </a>
    <a href="https://github.com/hazemKrimi" target="_blank"> {{ readFile "assets/icons/github.svg" | safeHTML }} </a>
    <a href="https://twitter.com/HazemKrimi" target="_blank"> {{ readFile "assets/icons/twitter.svg" | safeHTML }} </a>
    <a href="https://www.linkedin.com/in/hazemkrimi" target="_blank"> {{ readFile "assets/icons/linkedin.svg" | safeHTML }} </a>
  </div>
</nav>
