internal/web/templates/layout.html
37 lines · 1838 bytes
1{{define "layout"}}<!DOCTYPE html>
2<html lang="en">
3<head>
4<meta charset="utf-8">
5<meta name="viewport" content="width=device-width, initial-scale=1">
6<title>{{template "title" .}}</title>
7<link rel="stylesheet" href="/static/style.css">
8<link rel="icon" href="/favicon.svg" type="image/svg+xml">
9</head>
10<body>
11<header>
12 <nav><a class="site" href="/"><svg class="mark" width="20" height="20" viewBox="0 0 24 24" aria-hidden="true"><rect x="1" y="1" width="22" height="22" rx="6" fill="var(--accent)"/><path d="M5 9.5c2-2.5 4-2.5 6 0s4 2.5 6 0" stroke="var(--accent-fg)" stroke-width="2.2" fill="none" stroke-linecap="round"/><path d="M5 15c2-2.5 4-2.5 6 0s4 2.5 6 0" stroke="var(--accent-fg)" stroke-width="2.2" fill="none" stroke-linecap="round"/></svg>{{.Site}}</a></nav>
13</header>
14<main>
15{{template "content" .}}
16</main>
17<footer>
18 <p>powered by <a href="https://gitbay.org/krz/gitbay">gitbay</a>{{with gitbayVersion}} · <code>{{.}}</code>{{end}}</p>
19</footer>
20</body>
21</html>{{end}}
22
23{{define "repoheader"}}
24<h1><a href="/{{.Repo.OwnerName}}">{{.Repo.OwnerName}}</a>/<a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}">{{.Repo.Name}}</a></h1>
25{{if .Desc}}<p class="desc">{{.Desc}}</p>{{end}}
26<nav class="tabs">
27 <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}">files</a>
28 <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/log">log</a>
29 <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/refs">refs</a>
30 <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/issues">issues</a>
31 <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/mrs">merge requests</a>
32 <a href="/{{.Repo.OwnerName}}/{{.Repo.Name}}/archive/{{.Ref}}.tar.gz">archive</a>
33</nav>
34<p class="clone">clone: <code>git clone {{.CloneURL}}</code></p>
35{{end}}
36
37{{define "sigbadge"}}<span class="badge badge-{{.State}}" title="{{.Fingerprint}}">{{.State}}{{if .Signer}} · {{.Signer}}{{end}}</span>{{end}}