aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/partials
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials')
-rw-r--r--layouts/partials/head.html2
-rw-r--r--layouts/partials/header.html20
2 files changed, 22 insertions, 0 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 011b43d..f061a00 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -1,5 +1,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://unpkg.com/tachyons@4.10.0/css/tachyons.min.css"/>
+<!-- FontAwesome -->
+<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.1.0/css/all.css" integrity="sha384-lKuwvrZot6UHsBSfcMvOkWwlCMgc0TaWr+30HWe3a4ltaBwTZhyTEggF5tJv8tbt" crossorigin="anonymous">
<!-- Highligth.js -->
<link rel="stylesheet"
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>