Updates page header to show menu items if there are no rss
This commit is contained in:
parent
2fa06ec88b
commit
a8a2b05461
1 changed files with 23 additions and 16 deletions
|
@ -2,22 +2,29 @@
|
||||||
<nav>
|
<nav>
|
||||||
<h1><a href="/">@{{ .Site.Author.handle }}</a>’s {{ .Site.Title }}.</h1>
|
<h1><a href="/">@{{ .Site.Author.handle }}</a>’s {{ .Site.Title }}.</h1>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
{{ if isset .Site.Params "rsssections" }}
|
{{ if isset .Site.Params "rsssections" }}
|
||||||
|
{{ $.Scratch.Add "sections" .Site.Params.rsssections }}
|
||||||
{{ $.Scratch.Add "sections" .Site.Params.rsssections }}
|
<ul>
|
||||||
<ul>
|
{{ range .Site.Menus.main }}
|
||||||
{{ range .Site.Menus.main }}
|
<li>
|
||||||
<li>
|
<a href="{{.URL}}">{{ .Name }}</a>
|
||||||
<a href="{{.URL}}">{{ .Name }}</a>
|
{{ if in ($.Scratch.Get "sections") .Name }}
|
||||||
{{ if in ($.Scratch.Get "sections") .Name }}
|
<a href="{{.URL}}index.xml"><img src="/img/rss.svg" class="rss-icon" /></a>
|
||||||
<a href="{{.URL}}index.xml"><img src="/img/rss.svg" class="rss-icon" /></a>
|
{{ end }}
|
||||||
{{ end }}
|
</li>
|
||||||
</li>
|
{{ end }}
|
||||||
{{ end }}
|
{{ with .Site.Author.aboutpage }}<li><a href="{{ . }}">About</a></li>{{ end }}
|
||||||
{{ with .Site.Author.aboutpage }}<li><a href="{{ . }}">About</a></li>{{ end }}
|
</ul>
|
||||||
</ul>
|
{{ else }}
|
||||||
|
<ul>
|
||||||
{{ end }}
|
{{ 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>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
</header>
|
</header>
|
||||||
|
|
Loading…
Add table
Reference in a new issue