aboutsummaryrefslogtreecommitdiffstats
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
parent46469d1d5218b56e2b418a34e39cfe6457c6ef66 (diff)
downloadhugo-minimalist-theme-884c7caff7d50e3303e956f24d71345c9ed58025.tar.gz
hugo-minimalist-theme-884c7caff7d50e3303e956f24d71345c9ed58025.tar.bz2
hugo-minimalist-theme-884c7caff7d50e3303e956f24d71345c9ed58025.zip
Top navigation
-rw-r--r--layouts/_default/summary.html4
-rw-r--r--layouts/index.html3
-rw-r--r--layouts/partials/head.html2
-rw-r--r--layouts/partials/header.html20
4 files changed, 24 insertions, 5 deletions
diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html
index 9e90292..acfd2c4 100644
--- a/layouts/_default/summary.html
+++ b/layouts/_default/summary.html
@@ -12,8 +12,8 @@
<footer>
<nobr>Read more →</nobr>
- {{ if .Site.Params.thumbnailImage }}
- <img src="{{ .Params.thumbnailImage }}" class="mt2 br2">
+ {{ with .Params.thumbnailImage }}
+ <img src="{{ . }}" class="mt2 br2">
{{ end }}
</footer>
diff --git a/layouts/index.html b/layouts/index.html
index b4eaea0..172e87a 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,9 +1,6 @@
{{ define "main" }}
<div id="content" class="mw7 center">
- <h1 class="f1">{{.Title}}</h1>
-
- <h2 class="f2">Posts</h2>
<!-- Note that .Data.Pages is the equivalent of .Site.Pages on the homepage template. -->
{{ range where .Data.Pages "Section" "post" }}
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>