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