hugo-internet-weblog/layouts/partials/page_header.html
Dan Xin 558b8b4ae0
fix: migrate ".Site.Author" to ".Site.Params.Author" (#17)
* feat: migrate ".Site.Author" to ".Site.Params.Author"
* feat: update README
2024-11-08 14:16:58 -05:00

30 lines
862 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<header>
<nav>
<h1><a href="/">@{{ .Site.Params.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.Params.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.Params.Author.aboutpage }}<li><a href="{{ . }}">About</a></li>{{ end }}
</ul>
{{ end }}
</div>
</nav>
</header>