mirror of https://github.com/jlelse/GoBlog
46 lines
2.9 KiB
Plaintext
46 lines
2.9 KiB
Plaintext
{{ define "base" }}
|
|
<!doctype html>
|
|
<html lang="{{ .Blog.Lang }}">
|
|
<meta charset="utf-8">
|
|
<meta name=viewport content="width=device-width,initial-scale=1">
|
|
<link rel="stylesheet" href="{{ asset "css/styles.css" }}">
|
|
{{ with .Canonical }}<link rel="canonical" href="{{ . }}">{{ end }}
|
|
{{ block "title" . }}<title>{{ mdtitle .Blog.Title }}</title>{{ end }}
|
|
<link rel="alternate" type="application/rss+xml" title="RSS ({{ mdtitle .Blog.Title }})" href="{{ .Blog.Path }}.rss"/>
|
|
<link rel="alternate" type="application/atom+xml" title="Atom ({{ mdtitle .Blog.Title }})" href="{{ .Blog.Path }}.atom"/>
|
|
<link rel="alternate" type="application/feed+json" title="JSON Feed ({{ mdtitle .Blog.Title }})" href="{{ .Blog.Path }}.json"/>
|
|
<link rel="webmention" href="{{ absolute "/webmention" }}" />
|
|
<link rel="micropub" href="/micropub" />
|
|
<link rel="authorization_endpoint" href="/indieauth" />
|
|
<link rel="token_endpoint" href="/indieauth/token" />
|
|
{{ with .User }}{{ range .Identities }}<link rel="me" href="{{ . }}" />{{ end }}{{ end }}
|
|
{{ $os := opensearch .Blog }}
|
|
{{ if $os }}<link rel="search" type="application/opensearchdescription+xml" href="{{ $os }}" title="{{ mdtitle .Blog.Title }}" />{{ end }}
|
|
{{ with .Blog.Announcement }}{{ with .Text }}<div id="announcement" data-nosnippet>{{ md . }}</div>{{ end }}{{ end }}
|
|
<header>
|
|
<h1><a href="{{ .Blog.RelativePath "/" }}" rel="home" title="{{ mdtitle .Blog.Title }}" translate="no">{{ mdtitle .Blog.Title }}</a></h1>
|
|
{{ with .Blog.Description }}<p><i>{{ . }}</i></p>{{ end }}
|
|
{{ with index .Blog.Menus "main" }}
|
|
<nav>{{ range $i, $item := .Items }}{{ if ne $i 0 }} • {{ end }}<a href="{{ $item.Link }}">{{ mdtitle $item.Title }}</a>{{ end }}</nav>
|
|
{{ end }}
|
|
{{ 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>
|
|
{{ block "main" . }}{{ end }}
|
|
<footer>
|
|
{{ with index .Blog.Menus "footer" }}
|
|
<nav>{{ range $i, $item := .Items }}{{ if ne $i 0 }} • {{ end }}<a href="{{ $item.Link }}">{{ mdtitle $item.Title }}</a>{{ end }}</nav>
|
|
{{ end }}
|
|
<p translate="no">© {{ dateformat now "2006" }} {{ with .User.Name }}{{ . }}{{ else }}{{ mdtitle .Blog.Title }}{{ end }}</p>
|
|
{{ tor . }}
|
|
</footer>
|
|
{{ if .EasterEgg }}<script defer src="{{ asset "js/easteregg.js" }}"></script>{{ end }}
|
|
</html>
|
|
{{ end }} |