aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/partials/header.html
diff options
context:
space:
mode:
authorÓscar Nájera <hello@oscarnajera.com>2018-07-08 21:45:52 +0200
committerÓscar Nájera <hello@oscarnajera.com>2018-07-08 21:49:58 +0200
commit884c7caff7d50e3303e956f24d71345c9ed58025 (patch)
tree4a3835075299d92aa4fca91483eb95654c4e458f /layouts/partials/header.html
parent46469d1d5218b56e2b418a34e39cfe6457c6ef66 (diff)
downloadhugo-minimalist-theme-884c7caff7d50e3303e956f24d71345c9ed58025.tar.gz
hugo-minimalist-theme-884c7caff7d50e3303e956f24d71345c9ed58025.tar.bz2
hugo-minimalist-theme-884c7caff7d50e3303e956f24d71345c9ed58025.zip
Top navigation
Diffstat (limited to 'layouts/partials/header.html')
-rw-r--r--layouts/partials/header.html20
1 files changed, 20 insertions, 0 deletions
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
new file mode 100644
index 0000000..fbcce87
--- /dev/null
+++ b/layouts/partials/header.html
@@ -0,0 +1,20 @@
+{{ if .Site.Author.gravataremail }}
+ {{ .Scratch.Set "authorPicture" (printf "//www.gravatar.com/avatar/%s" (urlize (md5 (.Site.Author.gravataremail )))) }}
+{{ else if .Site.Author.picture }}
+ {{ .Scratch.Set "authorPicture" (absURL .Site.Author.picture) }}
+{{ end }}
+
+<nav class="dt w-100 border-box pa2">
+
+ <i class="dtc dib v-mid dim fa fa-lg fa-bars"></i>
+
+ <a href="{{ "/" | relLangURL }}" class="dtc v-mid link dim tc">
+ <div class="f4 dib black-50">{{ .Site.Title }}</div>
+ </a>
+
+ {{ with ($.Scratch.Get "authorPicture") }}
+ <a href="/#about" class="dtc dim tr">
+ <img class="dib v-mid dib w2 h2 br-100" src="{{ . }}{{ if in . "//www.gravatar.com/avatar/" }}?s=90{{ end }}"/>
+ </a>
+ {{ end }}
+</nav>