2018-11-08 07:10:37 +01: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 22:02:42 +01:00
|
|
|
<body {{template "body-attrs" .}}>
|
2018-11-08 07:10:37 +01:00
|
|
|
<div id="overlay"></div>
|
|
|
|
<header>
|
2019-08-09 19:59:55 +02:00
|
|
|
{{ if .Chorus }}<nav id="full-nav">
|
2019-08-07 15:00:16 +02:00
|
|
|
<div class="left-side">
|
|
|
|
<h2><a href="/">{{.SiteName}}</a></h2>
|
|
|
|
</div>
|
|
|
|
{{ else }}
|
|
|
|
<h2><a href="/">{{.SiteName}}</a></h2>
|
|
|
|
{{ end }}
|
2018-11-10 04:10:46 +01:00
|
|
|
{{if not .SingleUser}}
|
2018-11-08 07:10:37 +01:00
|
|
|
<nav id="user-nav">
|
2019-11-12 08:49:38 +01:00
|
|
|
{{if .Username}}
|
2019-08-07 15:00:16 +02:00
|
|
|
<nav class="dropdown-nav">
|
2020-07-30 17:26:29 +02:00
|
|
|
<ul><li class="has-submenu"><a>{{.Username}}</a> <img class="ic-18dp" src="/img/ic_down_arrow_dark@2x.png" /><ul>
|
2019-08-07 15:00:16 +02:00
|
|
|
{{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 07:10:37 +01:00
|
|
|
<nav class="tabs">
|
2019-08-09 19:45:19 +02:00
|
|
|
{{ if and .SimpleNav (not .SingleUser) }}
|
|
|
|
{{if and (and .LocalTimeline .CanViewReader) .Chorus}}<a href="/"{{if eq .Path "/"}} class="selected"{{end}}>Home</a>{{end}}
|
|
|
|
{{ end }}
|
2019-11-12 08:49:38 +01:00
|
|
|
{{if or .Chorus (not .Username)}}<a href="/about"{{if eq .Path "/about"}} class="selected"{{end}}>About</a>{{end}}
|
2019-08-09 19:45:19 +02:00
|
|
|
{{ if not .SingleUser }}
|
2019-08-09 20:58:17 +02:00
|
|
|
{{ if .Username }}
|
2019-11-12 08:49:38 +01:00
|
|
|
{{if or (not .Chorus) (gt .MaxBlogs 1)}}<a href="/me/c/"{{if eq .Path "/me/c/"}} class="selected"{{end}}>Blogs</a>{{end}}
|
2019-08-09 19:52:07 +02:00
|
|
|
{{if and (and .Chorus (eq .MaxBlogs 1)) .Username}}<a href="/{{.Username}}/"{{if eq .Path (printf "/%s/" .Username)}} class="selected"{{end}}>My Posts</a>{{end}}
|
2019-08-09 19:53:41 +02:00
|
|
|
{{if not .DisableDrafts}}<a href="/me/posts/"{{if eq .Path "/me/posts/"}} class="selected"{{end}}>Drafts</a>{{end}}
|
2019-08-09 20:58:17 +02:00
|
|
|
{{ end }}
|
2019-08-09 19:45:19 +02:00
|
|
|
{{if and (and .LocalTimeline .CanViewReader) (not .Chorus)}}<a href="/read"{{if eq .Path "/read"}} class="selected"{{end}}>Reader</a>{{end}}
|
2020-03-02 23:34:44 +01:00
|
|
|
{{if eq .SignupPath "/signup"}}<a href="/signup"{{if eq .Path "/signup"}} class="selected"{{end}}>Sign up</a>{{end}}
|
2020-03-02 23:32:04 +01:00
|
|
|
{{if and (not .Username) (not .Private)}}<a href="/login"{{if eq .Path "/login"}} class="selected"{{end}}>Log in</a>{{else if .SimpleNav}}<a href="/me/logout">Log out</a>{{end}}
|
2019-08-09 19:45:19 +02:00
|
|
|
{{ end }}
|
2018-11-08 07:10:37 +01:00
|
|
|
</nav>
|
2019-08-09 19:59:55 +02:00
|
|
|
{{if .Chorus}}{{if .Username}}<div class="right-side" style="font-size: 0.86em;">
|
2019-08-07 15:00:16 +02:00
|
|
|
<a class="simple-btn" href="/new">New Post</a>
|
|
|
|
</div>{{end}}
|
|
|
|
</nav>
|
|
|
|
{{end}}
|
2018-11-08 07:10:37 +01:00
|
|
|
</nav>
|
|
|
|
{{end}}
|
|
|
|
</header>
|
|
|
|
|
|
|
|
<div id="official-writing">
|
|
|
|
{{ template "content" . }}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{ template "footer" . }}
|
|
|
|
|
|
|
|
{{if not .JSDisabled}}
|
2020-07-30 17:26:29 +02:00
|
|
|
<script type="text/javascript" src="/js/menu.js"></script>
|
2018-11-08 07:10:37 +01:00
|
|
|
<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 22:02:42 +01:00
|
|
|
{{define "body-attrs"}}{{end}}
|