diff options
author | Óscar Nájera <hello@oscarnajera.com> | 2018-07-09 00:00:12 +0200 |
---|---|---|
committer | Óscar Nájera <hello@oscarnajera.com> | 2018-07-09 00:00:12 +0200 |
commit | 15a77de868a966ac583cc3b6ace8bf5803e36185 (patch) | |
tree | 1e47d9a0da8a86b776d52246474a5dbe8b762282 | |
parent | 5346283419f792276c22dc4d4c4b1b2c6f357073 (diff) | |
download | hugo-minimalist-theme-15a77de868a966ac583cc3b6ace8bf5803e36185.tar.gz hugo-minimalist-theme-15a77de868a966ac583cc3b6ace8bf5803e36185.tar.bz2 hugo-minimalist-theme-15a77de868a966ac583cc3b6ace8bf5803e36185.zip |
Improve sidebar
-rw-r--r-- | layouts/partials/head.html | 21 | ||||
-rw-r--r-- | layouts/partials/header.html | 6 |
2 files changed, 17 insertions, 10 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 45eb8db..511a8c4 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -17,9 +17,16 @@ #sidebar { position:fixed; z-index: 1; + display: none; } + + #sidebar a { + text-shadow: 1px 3px 1px rgba(0,0,0,0.9); + } + .post-header { - text-shadow: 0 2px 1px rgba(0,0,0,0.9);} + text-shadow: 0 2px 1px rgba(0,0,0,0.9); + } pre { background: #3f3f3f; @@ -27,10 +34,10 @@ padding: 0.5em;} </style> <script> -function w3_open() { - document.getElementById("sidebar").style.display = "block"; -} -function w3_close() { - document.getElementById("sidebar").style.display = "none"; -} + function w3_open() { + document.getElementById("sidebar").style.display = "block"; + } + function w3_close() { + document.getElementById("sidebar").style.display = "none"; + } </script> diff --git a/layouts/partials/header.html b/layouts/partials/header.html index f989b8e..e9b4597 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -4,13 +4,13 @@ {{ .Scratch.Set "authorPicture" (absURL .Site.Author.picture) }} {{ end }} -<nav id="sidebar" class="w-25-ns bg-gray" style="display:none"> +<nav id="sidebar" class="w5-ns w-100 bg-gray vh-100" style="background-image:url('{{ .Site.Params.coverImage | absURL }}');"> <a class="bg-black white link dim db pa3 tc pointer" onclick="w3_close()"> Close × </a> <div class="tc pv4"> - <a href="/#about" class=""> + <a href="/#about" class="white link"> {{ with ($.Scratch.Get "authorPicture") }} <img class="br-100" src="{{ . }}{{ if in . "//www.gravatar.com/avatar/" }}?s=110{{ end }}"/> {{ end }} @@ -23,7 +23,7 @@ {{ $currentPage := . }} {{ range .Site.Menus.main }} <li class="pv2"> - <a class="link {{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}active{{end}}" href="{{ .URL | relLangURL }}" title="{{ .Title }}"> + <a class="link white db grow {{if or ($currentPage.IsMenuCurrent "main" .) ($currentPage.HasMenuCurrent "main" .) }}active{{end}}" href="{{ .URL | relLangURL }}" title="{{ .Title }}"> {{ .Pre }} {{ .Name }}</a> {{ end }} </li> |