2019-08-06 13:15:05 +00:00
|
|
|
{{define "user-navigation"}}
|
2019-08-07 13:00:16 +00:00
|
|
|
<header class="{{if .SingleUser}}singleuser{{else}}multiuser{{end}}">
|
2018-11-10 03:10:46 +00:00
|
|
|
{{if .SingleUser}}
|
|
|
|
<nav id="user-nav">
|
|
|
|
<nav class="dropdown-nav">
|
|
|
|
<ul><li><a href="/" title="View blog" class="title">{{.SiteName}}</a> <img class="ic-18dp" src="/img/ic_down_arrow_dark@2x.png" />
|
|
|
|
<ul>
|
|
|
|
<li><a href="/me/c/{{.Username}}">Customize</a></li>
|
|
|
|
<li><a href="/me/c/{{.Username}}/stats">Stats</a></li>
|
|
|
|
<li class="separator"><hr /></li>
|
2019-04-12 01:11:30 +00:00
|
|
|
{{if .IsAdmin}}<li><a href="/admin">Admin</a></li>{{end}}
|
2018-11-10 03:10:46 +00:00
|
|
|
<li><a href="/me/settings">Settings</a></li>
|
|
|
|
<li><a href="/me/export">Export</a></li>
|
|
|
|
<li class="separator"><hr /></li>
|
|
|
|
<li><a href="/me/logout">Log out</a></li>
|
|
|
|
</ul></li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
<nav class="tabs">
|
|
|
|
<a href="/me/posts/"{{if eq .Path "/me/posts/"}} class="selected"{{end}}>Drafts</a>
|
|
|
|
<a href="/me/new">New Post</a>
|
|
|
|
</nav>
|
|
|
|
</nav>
|
|
|
|
{{else}}
|
2019-08-09 17:59:55 +00:00
|
|
|
{{ if .Chorus }}<nav id="full-nav">
|
2019-08-05 13:34:47 +00:00
|
|
|
<div class="left-side">
|
|
|
|
<h1><a href="/" title="Return to editor">{{.SiteName}}</a></h1>
|
|
|
|
</div>
|
|
|
|
{{ else }}
|
|
|
|
<h1><a href="/" title="Return to editor">{{.SiteName}}</a></h1>
|
|
|
|
{{ end }}
|
2018-11-08 06:23:08 +00:00
|
|
|
<nav id="user-nav">
|
2019-08-07 13:00:16 +00:00
|
|
|
{{if .Username}}
|
2018-11-08 06:23:08 +00:00
|
|
|
<nav class="dropdown-nav">
|
|
|
|
<ul><li><a>{{.Username}}</a> <img class="ic-18dp" src="/img/ic_down_arrow_dark@2x.png" /><ul>
|
2019-04-12 01:11:30 +00:00
|
|
|
{{if .IsAdmin}}<li><a href="/admin">Admin dashboard</a></li>{{end}}
|
2018-11-08 06:23:08 +00:00
|
|
|
<li><a href="/me/settings">Account settings</a></li>
|
|
|
|
<li><a href="/me/export">Export</a></li>
|
2019-01-18 05:05:50 +00:00
|
|
|
{{if .CanInvite}}<li><a href="/me/invites">Invite people</a></li>{{end}}
|
2018-11-08 06:23:08 +00:00
|
|
|
<li class="separator"><hr /></li>
|
|
|
|
<li><a href="/me/logout">Log out</a></li>
|
|
|
|
</ul></li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
2019-08-07 13:00:16 +00:00
|
|
|
{{end}}
|
2018-11-08 06:23:08 +00:00
|
|
|
<nav class="tabs">
|
2019-08-05 13:34:47 +00:00
|
|
|
{{if .SimpleNav}}
|
2019-08-09 17:45:19 +00:00
|
|
|
{{ if not .SingleUser }}
|
|
|
|
{{if and (and .LocalTimeline .CanViewReader) .Chorus}}<a href="/"{{if eq .Path "/"}} class="selected"{{end}}>Home</a>{{end}}
|
|
|
|
{{ end }}
|
2019-08-05 13:34:47 +00:00
|
|
|
<a href="/about">About</a>
|
2019-08-09 17:45:19 +00:00
|
|
|
{{ if not .SingleUser }}
|
2019-08-09 18:58:17 +00:00
|
|
|
{{ if .Username }}
|
2019-08-09 17:52:07 +00:00
|
|
|
{{if gt .MaxBlogs 1}}<a href="/me/c/"{{if eq .Path "/me/c/"}} class="selected"{{end}}>Blogs</a>{{end}}
|
2019-08-09 18:58:17 +00:00
|
|
|
{{if and .Chorus (eq .MaxBlogs 1)}}<a href="/{{.Username}}/"{{if eq .Path (printf "/%s/" .Username)}} class="selected"{{end}}>My Posts</a>{{end}}
|
2019-08-09 17:53:41 +00:00
|
|
|
{{if not .DisableDrafts}}<a href="/me/posts/"{{if eq .Path "/me/posts/"}} class="selected"{{end}}>Drafts</a>{{end}}
|
2019-08-09 18:58:17 +00:00
|
|
|
{{ end }}
|
2019-08-09 17:45:19 +00:00
|
|
|
{{if and (and .LocalTimeline .CanViewReader) (not .Chorus)}}<a href="/read">Reader</a>{{end}}
|
2019-08-15 03:25:02 +00:00
|
|
|
{{if and (and (and .Chorus .OpenRegistration) (not .Username)) (or (not .Private) (ne .Landing ""))}}<a href="/signup"{{if eq .Path "/signup"}} class="selected"{{end}}>Sign up</a>{{end}}
|
2019-08-07 13:00:16 +00:00
|
|
|
{{if .Username}}<a href="/me/logout">Log out</a>{{else}}<a href="/login">Log in</a>{{end}}
|
2019-08-09 17:45:19 +00:00
|
|
|
{{ end }}
|
2019-08-05 13:34:47 +00:00
|
|
|
{{else}}
|
|
|
|
<a href="/me/c/"{{if eq .Path "/me/c/"}} class="selected"{{end}}>Blogs</a>
|
2019-08-09 17:53:41 +00:00
|
|
|
{{if not .DisableDrafts}}<a href="/me/posts/"{{if eq .Path "/me/posts/"}} class="selected"{{end}}>Drafts</a>{{end}}
|
2019-08-05 13:34:47 +00:00
|
|
|
{{end}}
|
2018-11-08 06:23:08 +00:00
|
|
|
</nav>
|
|
|
|
</nav>
|
2019-08-09 17:59:55 +00:00
|
|
|
{{if .Chorus}}{{if .Username}}<div class="right-side">
|
2019-08-05 13:34:47 +00:00
|
|
|
<a class="simple-btn" href="/new">New Post</a>
|
2019-08-07 13:00:16 +00:00
|
|
|
</div>{{end}}
|
2019-08-05 13:34:47 +00:00
|
|
|
</nav>
|
|
|
|
{{end}}
|
2018-11-10 03:10:46 +00:00
|
|
|
{{end}}
|
2018-11-08 06:23:08 +00:00
|
|
|
</header>
|
2019-08-06 13:15:05 +00:00
|
|
|
{{end}}
|
|
|
|
{{define "header"}}<!DOCTYPE HTML>
|
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<meta charset="utf-8">
|
|
|
|
|
|
|
|
<title>{{.PageTitle}} {{if .Separator}}{{.Separator}}{{else}}—{{end}} {{.SiteName}}</title>
|
|
|
|
|
|
|
|
<link rel="stylesheet" type="text/css" href="/css/write.css" />
|
|
|
|
<link rel="shortcut icon" href="/favicon.ico" />
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
|
|
<meta name="theme-color" content="#888888" />
|
|
|
|
<meta name="apple-mobile-web-app-title" content="{{.SiteName}}">
|
|
|
|
<link rel="apple-touch-icon" sizes="152x152" href="/img/touch-icon-152.png">
|
|
|
|
<link rel="apple-touch-icon" sizes="167x167" href="/img/touch-icon-167.png">
|
|
|
|
<link rel="apple-touch-icon" sizes="180x180" href="/img/touch-icon-180.png">
|
|
|
|
</head>
|
|
|
|
<body id="me">
|
|
|
|
{{template "user-navigation" .}}
|
2018-11-08 06:23:08 +00:00
|
|
|
<div id="official-writing">
|
|
|
|
{{end}}
|
2019-01-05 03:28:29 +00:00
|
|
|
|
|
|
|
{{define "admin-header"}}
|
|
|
|
<header class="admin">
|
|
|
|
<h1>Admin</h1>
|
2019-04-06 15:15:14 +00:00
|
|
|
<nav id="admin">
|
|
|
|
<a href="/admin" {{if eq .Path "/admin"}}class="selected"{{end}}>Dashboard</a>
|
2019-04-06 17:23:22 +00:00
|
|
|
{{if not .SingleUser}}
|
|
|
|
<a href="/admin/users" {{if eq .Path "/admin/users"}}class="selected"{{end}}>Users</a>
|
|
|
|
<a href="/admin/pages" {{if eq .Path "/admin/pages"}}class="selected"{{end}}>Pages</a>
|
|
|
|
{{end}}
|
2019-04-06 15:15:14 +00:00
|
|
|
</nav>
|
2019-01-05 03:28:29 +00:00
|
|
|
</header>
|
|
|
|
{{end}}
|