1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-29 17:20:31 -04:00
Jake Jarvis 3a3849e8ec
add a partial template that returns an asset's URL and hash from webpack's manifest
still a mess but slightly more modular. also added a real 404 page.
2021-09-03 11:16:27 -04:00

18 lines
884 B
HTML

<header>
<nav>
<a class="no-underline" href="{{ .Site.BaseURL }}" id="logo" rel="me author" aria-label="{{ .Site.Title }}">
{{ with partial "functions/webpack" (dict "context" . "src" "images/tiny-selfie.jpg") }}
<img id="selfie" src="{{ .src }}" width="54" height="54" alt="Photo of Jake Jarvis">
{{ end }}
<span id="name">{{ .Site.Title }}</span>
</a>
<ul>
{{- range .Site.Menus.main }}
<li><a class="no-underline" {{ printf "href=%q" .URL | safeHTMLAttr }} aria-label="{{ .Name }}"{{ if strings.HasPrefix .URL "http" }} target="_blank" rel="me noopener"{{ end }}><span class="icon">{{ .Pre }}</span><span class="text">{{ .Name }}</span></a></li>
{{- end }}
<li><button class="dark-mode-toggle" title="Toggle Dark Mode" aria-label="Toggle Dark Mode" style="display: none;"></button></li>
</ul>
</nav>
</header>