base.html

 1{{define "layout"}}
 2<!DOCTYPE html>
 3<html lang="en">
 4<head>
 5  <meta charset="UTF-8">
 6  <meta name="viewport" content="width=device-width, initial-scale=1.0">
 7  <meta name="color-scheme" content="light dark">
 8  <title>{{if .Repo}}{{if .Repo.ProjectName}}{{.Repo.ProjectName}}{{else}}{{.Repo.Name}}{{end}}{{else}}{{.ServerName}}{{end}}</title>
 9  {{if .Repo}}{{if .Repo.Description}}<meta name="description" content="{{.Repo.Description}}">{{end}}{{end}}
10  <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🍦</text></svg>">
11  <link rel="stylesheet" href="/static/pico-2.1.1-pink.min.css">
12  <link rel="stylesheet" href="/static/overrides.css?v=1">
13  <link rel="stylesheet" href="/static/syntax.css?v=1">
14</head>
15<body class="container">
16  <a href="#main-content" class="skip-link">Skip to main content</a>
17
18  <header>
19    <nav aria-label="Site navigation">
20      <ul>
21        <li><strong>{{.ServerName}}</strong></li>
22      </ul>
23      <ul>
24        <li><a href="/"{{if eq .ActiveTab "repositories"}} aria-current="page"{{end}}>Repositories</a></li>
25        <li><a href="/about"{{if eq .ActiveTab "about"}} aria-current="page"{{end}}>About</a></li>
26      </ul>
27    </nav>
28    {{if .Repo}}
29    <nav aria-label="Repository navigation">
30      <ul>
31        <li>
32          {{if .Repo.Description}}
33          <hgroup>
34            <h1>{{if .Repo.ProjectName}}{{.Repo.ProjectName}}{{else}}{{.Repo.Name}}{{end}}</h1>
35            <p>{{.Repo.Description}}</p>
36          </hgroup>
37          {{else}}
38          <h1>{{if .Repo.ProjectName}}{{.Repo.ProjectName}}{{else}}{{.Repo.Name}}{{end}}</h1>
39          {{end}}
40        </li>
41      </ul>
42      <ul>
43        <li><a href="/{{.Repo.Name}}"{{if eq .ActiveTab "overview"}} aria-current="page"{{end}}>README</a></li>
44        <li><a href="/{{.Repo.Name}}/tree/{{.DefaultBranch}}"{{if eq .ActiveTab "tree"}} aria-current="page"{{end}}>Files</a></li>
45        <li><a href="/{{.Repo.Name}}/commits/{{.DefaultBranch}}"{{if eq .ActiveTab "commits"}} aria-current="page"{{end}}>Commits</a></li>
46        <li><a href="/{{.Repo.Name}}/branches"{{if eq .ActiveTab "branches"}} aria-current="page"{{end}}>Branches</a></li>
47        <li><a href="/{{.Repo.Name}}/tags"{{if eq .ActiveTab "tags"}} aria-current="page"{{end}}>Tags</a></li>
48      </ul>
49    </nav>
50    {{end}}
51  </header>
52
53  <main id="main-content">
54    {{template "content" .}}
55  </main>
56
57  <footer>
58    <p>Powered by (the <code>web-frontend</code> branch of <a href="https://git.secluded.site/soft-serve">my personal fork of</a>) <a href="https://github.com/charmbracelet/soft-serve">Soft Serve</a></p>
59  </footer>
60</body>
61</html>
62{{end}}