git-preview @ main

static git web frontend but with images and html previews + code truncation

templates/head.html

 1{{ define "head" }}
 2  <head>
 3    <meta charset="utf-8">
 4    <meta name="viewport" content="width=device-width, initial-scale=1">
 5    <link rel="stylesheet" href="/static/style.css" type="text/css">
 6    <link rel="icon" type="image/png" size="32x32" href="/static/legit.png">
 7    {{ if .parent }}
 8    <title>{{ .meta.Title }} &mdash; {{ .name }} ({{ .ref }}): {{ .parent }}/</title>
 9
10    {{ else if .path }}
11    <title>{{ .meta.Title }} &mdash; {{ .name }} ({{ .ref }}): {{ .path }}</title>
12    {{ else if .files }}
13    <title>{{ .meta.Title }} &mdash; {{ .name }} ({{ .ref }})</title>
14    {{ else if .commit }}
15    <title>{{ .meta.Title }} &mdash; {{ .name }}: commit</title>
16    {{ else if .commits }}
17    {{ if .log }}
18    <title>{{ .meta.Title }} &mdash; {{ .name }}: log</title>
19    {{ else }}
20    <title>{{ .meta.Title }} &mdash; {{ .name }}</title>
21    {{ end }}
22    {{ else }}
23    <title>{{ .meta.Title }}</title>
24    {{ end }}
25    {{ if and .servername .gomod }}
26    <meta name="go-import" content="{{ .servername}}/{{ .name }} git https://{{ .servername }}/{{ .name }}">
27    {{ end }}
28    <!-- other meta tags here -->
29  </head>
30{{ end }}