GoBlog/templates/header.gohtml

20 lines
960 B
Plaintext

{{ define "header" }}
<header>
<h1><a href="{{ blogrelative .Blog "/" }}" rel="home" title="{{ .Blog.Title }}" translate="no">{{ .Blog.Title }}</a></h1>
{{ with .Blog.Description }}<p><i>{{ . }}</i></p>{{ end }}
<nav>
{{ with menu .Blog "main" }}
{{ range $i, $item := .Items }}{{ if ne $i 0 }} &bull; {{ end }}<a href="{{ $item.Link }}">{{ $item.Title }}</a>{{ end }}
{{ end }}
</nav>
{{ if .LoggedIn }}
<nav>
<a href="{{ blogrelative .Blog "/editor" }}">{{ string .Blog.Lang "editor" }}</a>
&bull; <a href="/notifications">{{ string .Blog.Lang "notifications" }}</a>
&bull; <a href="/webmention">{{ string .Blog.Lang "webmentions" }}</a>
&bull; <a href="{{ blogrelative .Blog "/comment" }}">{{ string .Blog.Lang "comments" }}</a>
&bull; <a href="/logout">{{ string .Blog.Lang "logout" }}</a>
</nav>
{{ end }}
</header>
{{ end }}