Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/geschke/hugo-tikva.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Geschke <ralf@kuerbis.org>2018-11-07 01:46:46 +0300
committerRalf Geschke <ralf@kuerbis.org>2018-11-07 01:46:46 +0300
commit1049a48ebd1061cc8398d1ccab1b397ccc0c1e64 (patch)
tree4060265a4a6e71e2aa50eff6b47e2d51783c485c
parent0dd4ccea052e217853999a9cf1f606507304bcc6 (diff)
Add adjustHeader calculation when variable is set and navigation is fixed on top
-rw-r--r--layouts/partials/head.html9
1 files changed, 7 insertions, 2 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index d32a1cb..d9c7453 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -20,10 +20,15 @@
<style>
/* Move down content because we have a fixed navbar that is 50px tall */
-
+{{ if .Site.Params.Navbar.fixedTop }}
+ {{ $paddingTop := 60 }}
+ {{ if .Site.Params.Navbar.AdjustHeader }}
+ {{ $paddingTop = add 60 .Site.Params.Navbar.AdjustHeader }}
+ {{ end }}
body {
- padding-top: 60px;
+ padding-top: {{ $paddingTop }}px;
}
+{{ end }}
</style>
</head> \ No newline at end of file