diff options
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 |
commit | 884c7caff7d50e3303e956f24d71345c9ed58025 (patch) | |
tree | 4a3835075299d92aa4fca91483eb95654c4e458f /layouts/partials | |
parent | 46469d1d5218b56e2b418a34e39cfe6457c6ef66 (diff) | |
download | hugo-minimalist-theme-884c7caff7d50e3303e956f24d71345c9ed58025.tar.gz hugo-minimalist-theme-884c7caff7d50e3303e956f24d71345c9ed58025.tar.bz2 hugo-minimalist-theme-884c7caff7d50e3303e956f24d71345c9ed58025.zip |
Top navigation
Diffstat (limited to 'layouts/partials')
-rw-r--r-- | layouts/partials/head.html | 2 | ||||
-rw-r--r-- | layouts/partials/header.html | 20 |
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> |