~gitpocket/gitpocket

4
ebd7515eb398bd57df1a0069b69cb630f69a6f33
mainfeed-discovery
gitpocket/templates/layout.html -rw-r--r--2.4 KiB ViewLogBlameView rawPermalink 10cb94c534 feat(basin): sourcehut style layout and settings tabs 1 months ago
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{{.Title}}</title>
<link rel="stylesheet" href="/static/style.css">
<link rel="stylesheet" href="/static/highlight.css">
{{if .Math}}<link rel="stylesheet" href="/static/katex/katex.min.css">
<script defer src="/static/katex/katex.min.js"></script>
<script defer src="/static/katex/auto-render.min.js"></script>
<script>document.addEventListener("DOMContentLoaded",function(){renderMathInElement(document.body,{delimiters:[{left:"\\(",right:"\\)",display:false},{left:"\\[",right:"\\]",display:true}],throwOnError:false})})</script>{{end}}
</head>
<body>
<header>
<nav class="site">
<a class="brand" href="/">{{.Host}}</a>
<a href="/">git</a>
<span class="spacer"></span>
{{if .User}}<span>Logged in as <a href="/~{{.User.Name}}">~{{.User.Name}}</a> — <form method="post" action="/logout"><button>Log out</button></form></span>{{else}}<a href="/login">Log in</a> — <a href="/register">Register</a>{{end}}
</nav>
{{with .Data}}{{with index . "Settings"}}
<nav class="subtabs">
<a href="/settings"{{if eq . "profile"}} class="active"{{end}}>profile</a>
<a href="/settings/security"{{if eq . "security"}} class="active"{{end}}>security</a>
<a href="/settings/keys"{{if eq . "keys"}} class="active"{{end}}>keys</a>
<a href="/settings/tokens"{{if eq . "tokens"}} class="active"{{end}}>tokens</a>
</nav>
{{end}}{{end}}
</header>
{{with .Data}}{{with index . "Page"}}
<div class="repohead">
<div class="inner"><h2><a href="/~{{.Repo.Owner.Name}}">~{{.Repo.Owner.Name}}</a>/{{.Repo.Name}}{{if .Repo.Private}} <span class="tag">private</span>{{end}}</h2></div>
<div class="tabbar"><nav class="tabs inner">
<a href="/{{.Repo.Path}}"{{if eq .Tab "summary"}} class="active"{{end}}>summary</a>
{{if not .Empty}}<a href="/{{.Repo.Path}}/tree/{{.Ref}}/"{{if eq .Tab "tree"}} class="active"{{end}}>tree</a><a href="/{{.Repo.Path}}/log/{{.Ref}}"{{if eq .Tab "log"}} class="active"{{end}}>log</a><a href="/{{.Repo.Path}}/refs"{{if eq .Tab "refs"}} class="active"{{end}}>refs</a>{{end}}
{{if .Owner}}<a href="/{{.Repo.Path}}/settings"{{if eq .Tab "settings"}} class="active"{{end}}>settings</a>{{end}}
</nav></div>
</div>
{{if .Repo.Description}}<div class="descbar"><div class="inner">{{.Repo.Description}}</div></div>{{end}}
{{end}}{{end}}
<main>
{{if .Error}}<p class="error">{{.Error}}</p>{{end}}
{{template "content" .}}
</main>
</body>
</html>