2018-11-08 06:10:37 +00:00
|
|
|
{{define "base"}}<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
{{ template "head" . }}
|
|
|
|
<link rel="stylesheet" type="text/css" href="{{.Host}}/css/{{.Theme}}.css" />
|
|
|
|
<link rel="shortcut icon" href="{{.Host}}/favicon.ico" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
|
|
|
|
<meta name="application-name" content="{{.SiteName}}">
|
|
|
|
<meta name="application-url" content="{{.Host}}">
|
|
|
|
<meta property="og:site_name" content="{{.SiteName}}" />
|
|
|
|
</head>
|
2018-12-10 21:02:42 +00:00
|
|
|
<body {{template "body-attrs" .}}>
|
2018-11-08 06:10:37 +00:00
|
|
|
<div id="overlay"></div>
|
|
|
|
<header>
|
2019-08-07 13:00:16 +00:00
|
|
|
{{ if .SimpleNav }}<nav id="full-nav">
|
|
|
|
<div class="left-side">
|
|
|
|
<h2><a href="/">{{.SiteName}}</a></h2>
|
|
|
|
</div>
|
|
|
|
{{ else }}
|
|
|
|
<h2><a href="/">{{.SiteName}}</a></h2>
|
|
|
|
{{ end }}
|
2018-11-10 03:10:46 +00:00
|
|
|
{{if not .SingleUser}}
|
2018-11-08 06:10:37 +00:00
|
|
|
<nav id="user-nav">
|
2019-08-07 13:00:16 +00:00
|
|
|
{{if and .Chorus .Username}}
|
|
|
|
<nav class="dropdown-nav">
|
|
|
|
<ul><li><a>{{.Username}}</a> <img class="ic-18dp" src="/img/ic_down_arrow_dark@2x.png" /><ul>
|
|
|
|
{{if .IsAdmin}}<li><a href="/admin">Admin dashboard</a></li>{{end}}
|
|
|
|
<li><a href="/me/settings">Account settings</a></li>
|
|
|
|
<li><a href="/me/export">Export</a></li>
|
|
|
|
{{if .CanInvite}}<li><a href="/me/invites">Invite people</a></li>{{end}}
|
|
|
|
<li class="separator"><hr /></li>
|
|
|
|
<li><a href="/me/logout">Log out</a></li>
|
|
|
|
</ul></li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
{{end}}
|
2018-11-08 06:10:37 +00:00
|
|
|
<nav class="tabs">
|
2019-08-09 17:45:19 +00:00
|
|
|
{{ if and .SimpleNav (not .SingleUser) }}
|
|
|
|
{{if and (and .LocalTimeline .CanViewReader) .Chorus}}<a href="/"{{if eq .Path "/"}} class="selected"{{end}}>Home</a>{{end}}
|
|
|
|
{{if gt .MaxBlogs 1}}<a href="/me/c/"{{if eq .Path "/me/c/"}} class="selected"{{end}}>Blogs</a>{{end}}
|
|
|
|
{{if and (and .Chorus (eq .MaxBlogs 1)) .Username}}<a href="/{{.Username}}/"{{if eq .Path (printf "/%s/" .Username)}} class="selected"{{end}}>Posts</a>{{end}}
|
|
|
|
{{ end }}
|
2018-11-08 06:10:37 +00:00
|
|
|
<a href="/about"{{if eq .Path "/about"}} class="selected"{{end}}>About</a>
|
2019-08-09 17:45:19 +00:00
|
|
|
{{ if not .SingleUser }}
|
|
|
|
{{if and (and .LocalTimeline .CanViewReader) (not .Chorus)}}<a href="/read"{{if eq .Path "/read"}} class="selected"{{end}}>Reader</a>{{end}}
|
|
|
|
{{if and (and .Chorus .OpenRegistration) (not .Username)}}<a href="/signup"{{if eq .Path "/signup"}} class="selected"{{end}}>Sign up</a>{{end}}
|
|
|
|
{{if not .Username}}<a href="/login"{{if eq .Path "/login"}} class="selected"{{end}}>Log in</a>{{else if .SimpleNav}}<a href="/me/logout">Log out</a>{{end}}
|
|
|
|
{{ end }}
|
2018-11-08 06:10:37 +00:00
|
|
|
</nav>
|
2019-08-07 13:00:16 +00:00
|
|
|
{{if .SimpleNav}}{{if .Username}}<div class="right-side" style="font-size: 0.86em;">
|
|
|
|
<a class="simple-btn" href="/new">New Post</a>
|
|
|
|
</div>{{end}}
|
|
|
|
</nav>
|
|
|
|
{{end}}
|
2018-11-08 06:10:37 +00:00
|
|
|
</nav>
|
|
|
|
{{end}}
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<div id="official-writing">
|
|
|
|
{{ template "content" . }}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{ template "footer" . }}
|
|
|
|
|
|
|
|
{{if not .JSDisabled}}
|
|
|
|
<script type="text/javascript">
|
|
|
|
{{if .WebFonts}}
|
|
|
|
try { // Google Fonts
|
|
|
|
WebFontConfig = {
|
|
|
|
custom: { families: [ 'Lora:400,700:latin', 'Open+Sans:400,700:latin' ], urls: [ '/css/fonts.css' ] }
|
|
|
|
};
|
|
|
|
(function() {
|
|
|
|
var wf = document.createElement('script');
|
|
|
|
wf.src = '/js/webfont.js';
|
|
|
|
wf.type = 'text/javascript';
|
|
|
|
wf.async = 'true';
|
|
|
|
var s = document.getElementsByTagName('script')[0];
|
|
|
|
s.parentNode.insertBefore(wf, s);
|
|
|
|
})();
|
|
|
|
} catch (e) { /* ¯\_(ツ)_/¯ */ }
|
|
|
|
{{end}}
|
|
|
|
</script>
|
|
|
|
{{else}}
|
|
|
|
{{if .WebFonts}}<link href="{{.Host}}/css/fonts.css" rel="stylesheet" type="text/css" />{{end}}
|
|
|
|
{{end}}
|
|
|
|
</body>
|
|
|
|
</html>{{end}}
|
2018-12-10 21:02:42 +00:00
|
|
|
{{define "body-attrs"}}{{end}}
|