web frontend for git (tangled's grandpa)
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

cleaner titles

by nilix

+36 -41
+2 -1
routes/routes.go
··· 190 190 data["ref"] = ref 191 191 data["parent"] = treePath 192 192 data["desc"] = getDescription(path) 193 + data["dotdot"] = filepath.Dir(treePath) 193 194 194 195 d.listFiles(files, data, w) 195 196 return ··· 254 255 data["name"] = name 255 256 data["ref"] = ref 256 257 data["desc"] = getDescription(path) 257 - data["dotdot"] = filepath.Dir(path) 258 + data["log"] = true 258 259 259 260 if err := t.ExecuteTemplate(w, "log", data); err != nil { 260 261 log.Println(err)
+5 -4
static/style.css
··· 252 252 } 253 253 254 254 .file-wrapper { 255 + display: flex; 256 + flex-direction: row; 257 + grid-template-columns: 1rem minmax(0, 1fr); 258 + gap: 1rem; 259 + padding: 0.5rem; 255 260 background: var(--light-gray); 256 - display: table; 257 - padding: 0.5rem 258 - width: 100%; 259 261 } 260 262 261 263 .file-content { 262 264 background: var(--light-gray); 263 265 overflow-y: hidden; 264 266 overflow-x: auto; 265 - display: block; 266 267 } 267 268 268 269 .diff-type {
+8 -14
templates/file.html
··· 1 1 {{ define "file" }} 2 2 <html> 3 3 {{ template "head" . }} 4 - <title>{{.name }} &mdash; {{ .path }}</title> 5 - 6 4 {{ template "repoheader" . }} 7 5 <body> 8 6 {{ template "nav" . }} 9 7 <main> 10 8 <p>{{ .path }}</p> 11 - <table class="file-wrapper"> 12 - <tbody><tr> 13 - <td class="line-numbers"> 14 - <pre> 15 - {{- range .linecount }} 9 + <div class="file-wrapper"> 10 + <div class="line-numbers"> 11 + {{- range .linecount }} 16 12 <a id="L{{ . }}" href="#L{{ . }}">{{ . }}</a> 17 - {{- end -}} 18 - </pre> 19 - </td> 20 - <td class="file-content"> 13 + {{- end -}} 14 + </div> 15 + <div class="file-content"> 16 + <span></span> 21 17 <pre> 22 18 {{- .content -}} 23 19 </pre> 24 - </td> 25 - </tbody></tr> 26 - </table> 20 + </div> 27 21 </main> 28 22 </body> 29 23 </html>
+20
templates/head.html
··· 5 5 <link rel="stylesheet" href="/static/style.css" type="text/css"> 6 6 <link rel="stylesheet" href="https://cdn.icyphox.sh/fonts/inter.css" type="text/css"> 7 7 <link rel="icon" type="image/png" size="32x32" href="/static/legit.png"> 8 + {{ if .parent }} 9 + <title>{{ .meta.Title }} &mdash; {{ .name }} ({{ .ref }}): {{ .parent }}/</title> 10 + 11 + {{ else if .path }} 12 + <title>{{ .meta.Title }} &mdash; {{ .name }} ({{ .ref }}): {{ .path }}</title> 13 + {{ else if .files }} 14 + <title>{{ .meta.Title }} &mdash; {{ .name }} ({{ .ref }})</title> 15 + {{ else if .commit }} 16 + <title>{{ .meta.Title }} &mdash; {{ .name }}: {{ .commit.This }}</title> 17 + {{ else if .branches }} 18 + <title>{{ .meta.Title }} &mdash; {{ .name }}: refs</title> 19 + {{ else if .commits }} 20 + {{ if .log }} 21 + <title>{{ .meta.Title }} &mdash; {{ .name }}: log</title> 22 + {{ else }} 23 + <title>{{ .meta.Title }} &mdash; {{ .name }}</title> 24 + {{ end }} 25 + {{ else }} 26 + <title>{{ .meta.Title }}</title> 27 + {{ end }} 8 28 {{ if and .servername .gomod }} 9 29 <meta name="go-import" content="{{ .servername}}/{{ .name }} git https://{{ .servername }}/{{ .name }}"> 10 30 {{ end }}
-4
templates/index.html
··· 2 2 <html> 3 3 {{ template "head" . }} 4 4 5 - <title> 6 - {{ .meta.Title }} 7 - </title> 8 - 9 5 <header> 10 6 <h1>{{ .meta.Title }}</h1> 11 7 <h2>{{ .meta.Description }}</h2>
-4
templates/log.html
··· 2 2 <html> 3 3 {{ template "head" . }} 4 4 5 - <title> 6 - {{ .name }} &mdash; log 7 - </title> 8 - 9 5 {{ template "repoheader" . }} 10 6 <body> 11 7 {{ template "nav" . }}
-4
templates/refs.html
··· 2 2 <html> 3 3 {{ template "head" . }} 4 4 5 - <title> 6 - {{ .name }} &mdash; refs 7 - </title> 8 - 9 5 {{ template "repoheader" . }} 10 6 <body> 11 7 {{ template "nav" . }}
-5
templates/repo.html
··· 1 1 {{ define "repo" }} 2 2 <html> 3 - <title>{{ .name }} 4 - {{ if .parent }} 5 - &mdash; {{ .parent }} 6 - {{ end }} 7 - </title> 8 3 {{ template "head" . }} 9 4 10 5 {{ template "repoheader" . }}
+1 -5
templates/tree.html
··· 1 1 {{ define "tree" }} 2 2 <html> 3 - <title>{{ .name }} 4 - {{ if .parent }} 5 - &mdash; {{ .parent }} 6 - {{ end }} 7 - </title> 3 + 8 4 {{ template "head" . }} 9 5 10 6 {{ template "repoheader" . }}