BlueGit

timfa bluegit

Files

bluegit / internal / server / templates / layout.html

layout.html

feat: nieuw-formulier, groepsoverzicht, logo's en talen
timfa project_87923614_bot_3aff574f6f98414b945a8799374f9092 · pushed by timfa · 3 weeks ago
Failed d1203d3b History
layout.html 2.0 KiB Download Raw
1{{define "layout-start"}}
2<!DOCTYPE html>
3<html lang="{{.HTMLLang}}"{{if .Cunei}} class="cunei"{{end}}>
4<head>
5 <meta charset="utf-8">
6 <meta name="viewport" content="width=device-width, initial-scale=1">
7 <title>{{if .Title}}{{.Title}} · {{end}}BlueGit</title>
8 <link rel="icon" href="/assets/logo.svg" type="image/svg+xml">
9 <link rel="stylesheet" href="/assets/style.css">
10</head>
11<body data-copied="{{t "action.copied"}}">
12<header class="top">
13 <a class="brand" href="/"><img src="/assets/logo.svg" alt=""> BlueGit</a>
14 <nav>
15 {{if .User}}
16 <a href="/">{{t "nav.dashboard"}}</a>
17 <a href="/new">{{t "nav.new"}}</a>
18 {{if .User.InstanceAdmin}}<a href="/setup">{{t "nav.storage"}}</a>{{end}}
19 <a href="/settings">{{.User.Username}}</a>
20 <form method="post" action="/logout"><input type="hidden" name="csrf" value="{{.CSRF}}"><button type="submit">{{t "nav.signout"}}</button></form>
21 {{else}}
22 <a class="btn" href="/login">{{t "nav.signin"}}</a>
23 {{end}}
24 </nav>
25</header>
26<main{{if .Wide}} class="wide"{{end}}>
27{{if .Notice}}<p class="flash">{{.Notice}}</p>{{end}}
28{{if .Err}}<p class="flash bad">{{.Err}}</p>{{end}}
29{{end}}
30
31{{define "layout-end"}}
32</main>
33</body>
34</html>
35{{end}}
36
37{{define "repotabs"}}
38<p class="sub">
39 <a href="/{{.Repo.FullPath}}{{if .Rev}}?rev={{.Rev}}{{end}}"{{if eq .Page "overview"}} class="on"{{end}}>{{t "tab.overview"}}</a>
40 <a href="/{{.Repo.FullPath}}/-/tree{{if .Rev}}?rev={{.Rev}}{{end}}"{{if eq .Page "files"}} class="on"{{end}}>{{t "tab.files"}}</a>
41 <a href="/{{.Repo.FullPath}}/-/commits{{if .Rev}}?rev={{.Rev}}{{end}}"{{if eq .Page "commits"}} class="on"{{end}}>{{t "tab.commits"}}</a>
42 <a href="/{{.Repo.FullPath}}/-/branches">{{t "tab.branches"}}</a>
43 <a href="/{{.Repo.FullPath}}/-/merge-requests">{{t "tab.mrs"}}</a>
44 <a href="/{{.Repo.FullPath}}/-/pipelines">{{t "tab.pipelines"}}</a>
45 <a href="/{{.Repo.FullPath}}/-/releases">{{t "tab.releases"}}</a>
46 {{if .CanAdmin}}<a href="/{{.Repo.FullPath}}/-/settings">{{t "tab.settings"}}</a>{{end}}
47</p>
48{{end}}