upstream
  1{{- /*gotype: github.com/antonmedv/gitmal/pkg/templates.LayoutParams*/ -}}
  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">
  7    <title>{{ .Title }}</title>
  8    <style>
  9        {{ if .Dark }}
 10        :root {
 11          --c-indigo-1: #a8b1ff;
 12          --c-indigo-2: #5c73e7;
 13          --c-indigo-3: #3e63dd;
 14          --c-green: #57ab5a;
 15          --c-red: #e5534b;
 16          --c-yellow: #c69026;
 17          --c-dir: #9198a1;
 18          --c-gray-soft: rgba(101, 117, 133, .16);
 19          --c-bg: #1b1b1f;
 20          --c-bg-alt: #161618;
 21          --c-bg-elv: #202127;
 22          --c-text-1: rgba(255, 255, 245, .86);
 23          --c-text-2: rgba(235, 235, 245, .6);
 24          --c-text-3: rgba(235, 235, 245, .38);
 25          --c-border: #3c3f44;
 26          --c-divider: #2e2e32;
 27        }
 28
 29        {{ else }}
 30        :root {
 31          --c-indigo-1: #3451b2;
 32          --c-indigo-2: #3a5ccc;
 33          --c-indigo-3: #5672cd;
 34          --c-green: #1a7f37;
 35          --c-red: #c53030;
 36          --c-yellow: #9a6700;
 37          --c-dir: #54aeff;
 38          --c-gray-soft: rgba(142, 150, 170, .14);
 39          --c-bg: #ffffff;
 40          --c-bg-alt: #f6f6f7;
 41          --c-bg-elv: #ffffff;
 42          --c-text-1: rgba(60, 60, 67);
 43          --c-text-2: rgba(60, 60, 67, .78);
 44          --c-text-3: rgba(60, 60, 67, .56);
 45          --c-border: #c2c2c4;
 46          --c-divider: #e2e2e3;
 47        }
 48
 49        {{ end }}
 50
 51        :root {
 52          --c-brand-1: var(--c-indigo-1);
 53          --c-brand-2: var(--c-indigo-2);
 54          --c-brand-3: var(--c-indigo-3);
 55          --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
 56          --font-family-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
 57          --code-line-height: 20px;
 58          --code-font-size: 12px;
 59          --code-color: var(--c-brand-1);
 60          --code-bg: var(--c-gray-soft);
 61          --code-block-bg: var(--c-bg-alt);
 62          --code-block-color: var(--c-text-1);
 63          --header-height: 46px;
 64          --border-radius: 6px;
 65          --max-content-width: 1470px;
 66        }
 67
 68        * {
 69          box-sizing: border-box;
 70        }
 71
 72        body {
 73          margin: 0;
 74          padding: 0;
 75          font-family: var(--font-family), sans-serif;
 76          font-size: 14px;
 77          line-height: 1;
 78          color: var(--c-text-1);
 79          background-color: var(--c-bg);
 80          text-rendering: optimizeLegibility;
 81          -webkit-font-smoothing: antialiased;
 82          -moz-osx-font-smoothing: grayscale;
 83          -moz-text-size-adjust: none;
 84          -webkit-text-size-adjust: none;
 85          text-size-adjust: none;
 86          min-height: 100vh;
 87          display: flex;
 88          flex-direction: column;
 89        }
 90
 91        .nowrap {
 92          white-space: nowrap;
 93        }
 94
 95        h1 {
 96          margin-inline: 0;
 97          margin-block: 16px;
 98          font-size: 20px;
 99          font-weight: 600;
100        }
101
102        a {
103          color: var(--c-brand-1);
104          font-weight: 500;
105          text-decoration: underline;
106          text-underline-offset: 2px;
107          text-decoration: inherit;
108          touch-action: manipulation;
109        }
110
111        a:hover {
112          color: var(--c-brand-2);
113          text-decoration: underline;
114        }
115
116        .menu {
117          background-color: var(--c-bg-alt);
118          border-bottom: 1px solid var(--c-divider);
119          overflow-x: auto;
120        }
121
122        .menu-content {
123          display: flex;
124          flex-direction: row;
125          align-items: center;
126          gap: 16px;
127          padding-inline: 16px;
128          max-width: var(--max-content-width);
129          margin-inline: auto;
130        }
131
132        .menu-item {
133          display: flex;
134          align-items: center;
135          border-bottom: 2px solid transparent;
136          height: 56px;
137          padding-inline: 8px;
138        }
139
140        .menu-item a {
141          display: flex;
142          flex-direction: row;
143          gap: 8px;
144          align-items: center;
145          color: var(--c-text-1);
146          padding: 8px 10px;
147          border-radius: 4px;
148        }
149
150        .menu-item a:hover {
151          background-color: var(--c-bg-elv);
152          text-decoration: none;
153        }
154
155        .menu-item.selected {
156          border-bottom-color: var(--c-brand-1);
157        }
158
159        .project-name {
160          font-weight: 600;
161          font-size: 16px;
162          margin-inline: 16px;
163          color: var(--c-text-1);
164          text-decoration: none;
165        }
166
167        main {
168          flex-grow: 1;
169          width: 100%;
170          max-width: var(--max-content-width);
171          margin: 16px auto;
172        }
173
174        .main-content {
175          padding-inline: 16px;
176        }
177
178        footer {
179          padding: 12px 16px;
180          background-color: var(--c-bg-alt);
181          border-top: 1px solid var(--c-divider);
182          color: var(--c-text-3);
183          font-size: 12px;
184          text-align: center;
185        }
186
187        .header-container {
188          container-type: scroll-state;
189          position: sticky;
190          top: 0;
191        }
192
193        .header-container {
194          @container scroll-state(stuck: top) {
195            header {
196              border-top: none;
197              border-top-left-radius: 0;
198              border-top-right-radius: 0;
199            }
200
201            .goto-top {
202              display: flex;
203            }
204          }
205        }
206
207        header {
208          display: flex;
209          flex-direction: row;
210          align-items: center;
211          min-height: var(--header-height);
212          padding-inline: 16px;
213          background: var(--c-bg-alt);
214          border: 1px solid var(--c-border);
215          border-top-left-radius: var(--border-radius);
216          border-top-right-radius: var(--border-radius);
217        }
218
219        header h1 {
220          word-break: break-all;
221          font-weight: 600;
222          font-size: 16px;
223          margin: 0;
224          padding: 0;
225        }
226
227        .header-ref {
228          color: var(--c-text-2);
229          border: 1px solid var(--c-border);
230          border-radius: 6px;
231          padding: 6px 10px;
232          margin-right: 10px;
233          margin-left: -6px;
234        }
235
236        header .path {
237          font-size: 16px;
238        }
239
240        .breadcrumbs {
241          display: flex;
242          flex-direction: row;
243          flex-wrap: wrap;
244          gap: 6px;
245          font-size: 16px;
246        }
247
248        .breadcrumbs a {
249          word-break: break-all;
250        }
251
252        .goto-top {
253          display: none;
254          margin-left: auto;
255          padding: 6px 10px;
256          background: none;
257          border: none;
258          border-radius: 6px;
259          gap: 4px;
260          align-items: center;
261          color: var(--c-text-1);
262          cursor: pointer;
263        }
264
265        .goto-top:hover {
266          background: var(--c-bg-elv);
267        }
268    </style>
269    {{ template "head" . }}
270</head>
271<body>
272{{ template "svg" . }}
273<div class="menu">
274    <div class="menu-content">
275        <a href="{{ .RootHref }}index.html" class="project-name">{{ .Name }}</a>
276        <div class="menu-item {{ if eq .Selected "code" }}selected{{ end }}">
277            <a href="{{ .RootHref }}blob/{{ .CurrentRefDir }}/index.html">
278                <svg aria-hidden="true" width="16" height="16">
279                    <use xlink:href="#code"></use>
280                </svg>
281                Code
282            </a>
283        </div>
284        <div class="menu-item {{ if eq .Selected "branches" }}selected{{ end }}">
285            <a href="{{ .RootHref }}branches.html">
286                <svg aria-hidden="true" focusable="false" width="16" height="16">
287                    <use xlink:href="#branch"></use>
288                </svg>
289                Branches
290            </a>
291        </div>
292        <div class="menu-item {{ if eq .Selected "tags" }}selected{{ end }}">
293            <a href="{{ .RootHref }}tags.html">
294                <svg aria-hidden="true" focusable="false" width="16" height="16">
295                    <use xlink:href="#tag"></use>
296                </svg>
297                Tags
298            </a>
299        </div>
300        <div class="menu-item {{ if eq .Selected "commits" }}selected{{ end }}">
301            <a href="{{ .RootHref }}commits/{{ .CurrentRefDir }}/index.html">
302                <svg aria-hidden="true" focusable="false" width="16" height="16">
303                    <use xlink:href="#commit"></use>
304                </svg>
305                Commits
306            </a>
307        </div>
308    </div>
309</div>
310<main>
311    <div class="main-content">
312        {{ template "body" . }}
313    </div>
314</main>
315<footer>
316    Generated by <a href="https://github.com/antonmedv/gitmal">Gitmal</a>
317</footer>
318</body>
319</html>