owl-blogs/render/templates/base.tmpl

82 lines
3.2 KiB
Cheetah

{{define "base"}}
<!doctype html>
<html lang='en' data-theme="light">
<head>
<meta charset='utf-8'>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>{{template "title" .Data}} - {{ .SiteConfig.Title }}</title>
<meta property="og:title" content="{{template "title" .Data}}" />
{{ template "head" .}}
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<link rel="webmention" href="/webmention/" />
<link rel="alternate" type="application/rss+xml" title="RSS" href="/index.xml">
<link rel='stylesheet' href='/static/owl.css'>
<link rel='stylesheet' href='/static/style.css'>
<style>
:root {
--primary: {{.SiteConfig.PrimaryColor}};
}
</style>
{{ .SiteConfig.HtmlHeadExtra }}
</head>
<body>
<header class="h-card">
{{ if .SiteConfig.AvatarUrl }}
<img class="u-photo u-logo avatar" src="{{ .SiteConfig.AvatarUrl }}" alt="{{ .SiteConfig.Title }}" />
{{ end }}
<hgroup>
<h1><a class="p-name u-url" href="/">{{ .SiteConfig.Title }}</a></h1>
<p class="p-note">{{ .SiteConfig.SubTitle }}</p>
</hgroup>
<nav>
<ul>
{{ range $link := .SiteConfig.HeaderMenu }}
{{ if $link.List }}
<li><a href="/lists/{{ $link.List }}">{{ $link.Title }}</a></li>
{{ else if $link.Post }}
<li><a href="/posts/{{ $link.Post }}">{{ $link.Title }}</a></li>
{{ else }}
<li><a href="{{ $link.Url }}">{{ $link.Title }}</a></li>
{{ end }}
{{ end }}
</ul>
</nav>
</header>
<main>
{{template "main" .Data}}
</main>
<footer>
<nav>
<ul>
<li><a target="_blank" href="/index.xml">RSS Feed</a></li>
{{ range $link := .SiteConfig.FooterMenu }}
{{ if $link.List }}
<li><a href="/lists/{{ $link.List }}">{{ $link.Title }}</a></li>
{{ else if $link.Post }}
<li><a href="/posts/{{ $link.Post }}">{{ $link.Title }}</a></li>
{{ else }}
<li><a href="{{ $link.Url }}">{{ $link.Title }}</a></li>
{{ end }}
{{ end }}
{{ range $me := .SiteConfig.Me }}
<li><a href="{{$me.Url}}" rel="me">{{$me.Name}}</a>
</li>
{{ end }}
<li><a href="/admin/">Editor</a></li>
</ul>
</nav>
<div>
{{ .SiteConfig.FooterExtra}}
</div>
<div style="margin-top:2rem;">
powered by <i><a href="https://github.com/H4kor/owl-blogs" target="_blank">owl-blogs</a></i>
</a>
</footer>
</body>
</html>
{{end}}