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

github.com/jnjosh/internet-weblog.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Johnson <jnjosh@jnjosh.com>2019-08-18 07:33:39 +0300
committerJosh Johnson <jnjosh@jnjosh.com>2019-08-18 07:33:39 +0300
commita8a2b0546162527b7721d11efea1d3e3ec41a627 (patch)
tree4b75797e60ef7e177e168a4d03dbd33df4e831fa
parent2fa06ec88bb1e3512bcc85cd450ab7660f460270 (diff)
Updates page header to show menu items if there are no rss
-rw-r--r--layouts/partials/page_header.html39
1 files changed, 23 insertions, 16 deletions
diff --git a/layouts/partials/page_header.html b/layouts/partials/page_header.html
index 7f9a3bb..c381950 100644
--- a/layouts/partials/page_header.html
+++ b/layouts/partials/page_header.html
@@ -2,22 +2,29 @@
<nav>
<h1><a href="/">@{{ .Site.Author.handle }}</a>’s {{ .Site.Title }}.</h1>
<div class="menu">
- {{ if isset .Site.Params "rsssections" }}
-
- {{ $.Scratch.Add "sections" .Site.Params.rsssections }}
- <ul>
- {{ range .Site.Menus.main }}
- <li>
- <a href="{{.URL}}">{{ .Name }}</a>
- {{ if in ($.Scratch.Get "sections") .Name }}
- <a href="{{.URL}}index.xml"><img src="/img/rss.svg" class="rss-icon" /></a>
- {{ end }}
- </li>
- {{ end }}
- {{ with .Site.Author.aboutpage }}<li><a href="{{ . }}">About</a></li>{{ end }}
- </ul>
-
- {{ end }}
+ {{ if isset .Site.Params "rsssections" }}
+ {{ $.Scratch.Add "sections" .Site.Params.rsssections }}
+ <ul>
+ {{ range .Site.Menus.main }}
+ <li>
+ <a href="{{.URL}}">{{ .Name }}</a>
+ {{ if in ($.Scratch.Get "sections") .Name }}
+ <a href="{{.URL}}index.xml"><img src="/img/rss.svg" class="rss-icon" /></a>
+ {{ end }}
+ </li>
+ {{ end }}
+ {{ with .Site.Author.aboutpage }}<li><a href="{{ . }}">About</a></li>{{ end }}
+ </ul>
+ {{ else }}
+ <ul>
+ {{ range .Site.Menus.main }}
+ <li>
+ <a href="{{.URL}}">{{ .Name }}</a>
+ </li>
+ {{ end }}
+ {{ with .Site.Author.aboutpage }}<li><a href="{{ . }}">About</a></li>{{ end }}
+ </ul>
+ {{ end }}
</div>
</nav>
</header>