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>{{.Title}}</title>
 9  {{if .Description}}<meta name="description" content="{{.Description}}">{{end}}
10  {{if .Title}}<meta property="og:title" content="{{.Title}}">{{end}}
11  {{if .Description}}<meta property="og:description" content="{{.Description}}">{{end}}
12  <meta property="og:type" content="website">
13  <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>">
14
15  <link rel="preload" href="/static/pico-2.1.1-pink.min.css" as="style">
16  <link rel="preload" href="/static/overrides.css?v=1" as="style">
17
18  <link rel="stylesheet" href="/static/pico-2.1.1-pink.min.css">
19  <link rel="stylesheet" href="/static/overrides.css?v=1">
20
21  {{block "page-styles" .}}{{end}}
22</head>
23<body class="container">
24  <a href="#main-content" class="skip-link">Skip to main content</a>
25
26  <header>
27    <nav aria-label="Site navigation">
28      <ul>
29        <li><strong>{{.ServerName}}</strong></li>
30      </ul>
31      <ul>
32        <li><a href="/"{{if eq .ActiveTab "repositories"}} aria-current="page"{{end}}>Repositories</a></li>
33        <li><a href="/about"{{if eq .ActiveTab "about"}} aria-current="page"{{end}}>About</a></li>
34      </ul>
35    </nav>
36    {{if .Repo}}
37    <nav aria-label="Repository navigation">
38      <ul>
39        <li>
40          {{if .Repo.Description}}
41          <hgroup>
42            <h1>{{if .Repo.ProjectName}}{{.Repo.ProjectName}}{{else}}{{.Repo.Name}}{{end}}</h1>
43            <p>{{.Repo.Description}}</p>
44          </hgroup>
45          {{else}}
46          <h1>{{if .Repo.ProjectName}}{{.Repo.ProjectName}}{{else}}{{.Repo.Name}}{{end}}</h1>
47          {{end}}
48        </li>
49      </ul>
50      <ul>
51        <li><a href="/{{.Repo.Name}}"{{if eq .ActiveTab "overview"}} aria-current="page"{{end}}>README</a></li>
52        {{if .HasGitBug}}
53        <li><a href="/{{.Repo.Name}}/bugs"{{if eq .ActiveTab "bugs"}} aria-current="page"{{end}}>Bugs</a></li>
54        {{end}}
55        <li><a href="/{{.Repo.Name}}/tree/{{.DefaultBranch}}"{{if eq .ActiveTab "tree"}} aria-current="page"{{end}}>Files</a></li>
56        <li><a href="/{{.Repo.Name}}/commits/{{.DefaultBranch}}"{{if eq .ActiveTab "commits"}} aria-current="page"{{end}}>Commits</a></li>
57        <li><a href="/{{.Repo.Name}}/branches"{{if eq .ActiveTab "branches"}} aria-current="page"{{end}}>Branches</a></li>
58        <li><a href="/{{.Repo.Name}}/tags"{{if eq .ActiveTab "tags"}} aria-current="page"{{end}}>Tags</a></li>
59      </ul>
60    </nav>
61    {{end}}
62  </header>
63
64  <main id="main-content">
65    {{template "content" .}}
66  </main>
67
68  <footer>
69    <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>
70  </footer>
71</body>
72</html>
73{{end}}