mirror of
https://github.com/jlelse/GoBlog
synced 2024-06-14 12:47:10 +00:00
20 lines
1.0 KiB
Plaintext
20 lines
1.0 KiB
Plaintext
{{ define "header" }}
|
|
<header>
|
|
<h1><a href="{{ .Blog.RelativePath "/" }}" rel="home" title="{{ .Blog.Title }}" translate="no">{{ .Blog.Title }}</a></h1>
|
|
{{ with .Blog.Description }}<p><i>{{ . }}</i></p>{{ end }}
|
|
<nav>
|
|
{{ with index .Blog.Menus "main" }}
|
|
{{ range $i, $item := .Items }}{{ if ne $i 0 }} • {{ end }}<a href="{{ $item.Link }}">{{ $item.Title }}</a>{{ end }}
|
|
{{ end }}
|
|
</nav>
|
|
{{ if .LoggedIn }}
|
|
<nav>
|
|
<a href="{{ .Blog.RelativePath "/editor" }}">{{ string .Blog.Lang "editor" }}</a>
|
|
• <a href="/notifications">{{ string .Blog.Lang "notifications" }}</a>
|
|
{{ if .WebmentionReceivingEnabled }}• <a href="/webmention">{{ string .Blog.Lang "webmentions" }}</a>{{ end }}
|
|
{{ if .CommentsEnabled }}• <a href="{{ .Blog.RelativePath "/comment" }}">{{ string .Blog.Lang "comments" }}</a>{{ end }}
|
|
• <a href="/logout">{{ string .Blog.Lang "logout" }}</a>
|
|
</nav>
|
|
{{ end }}
|
|
</header>
|
|
{{ end }} |