all repos — legit @ b97e2ba81f0f58e7b2029dacea2b4c0eb43c9403

web frontend for git, written in go

Merge branch 'html-fixes'

Alan Pearce
commit

b97e2ba81f0f58e7b2029dacea2b4c0eb43c9403

parent

5acac24dede0143e6415d83d94a66017fd3c2692

M config.yamlconfig.yaml
@@ -1,5 +1,5 @@
repo: - scanPath: /var/www/git + scanPath: /tmp/git readme: - readme - README
M templates/404.htmltemplates/404.html
@@ -1,4 +1,5 @@
{{ define "404" }} +<!DOCTYPE html> <html> <title>404</title> {{ template "head" . }}
M templates/500.htmltemplates/500.html
@@ -1,4 +1,5 @@
{{ define "500" }} +<!DOCTYPE html> <html> <title>500</title> {{ template "head" . }}
M templates/commit.htmltemplates/commit.html
@@ -1,9 +1,10 @@
{{ define "commit" }} +<!DOCTYPE html> <html> {{ template "head" . }} - {{ template "repoheader" . }} <body> + {{ template "repoheader" . }} {{ template "nav" . }} <main> <section class="commit">
@@ -41,11 +42,11 @@ </div>
<div> <br> <strong>jump to</strong> - {{ range .diff }} <ul> + {{ range .diff }} <li><a href="#{{ .Name.New }}">{{ .Name.New }}</a></li> - </ul> {{ end }} + </ul> </div> </div> </section>
@@ -77,9 +78,8 @@ {{- end -}}
{{ if .IsBinary }} <p>Not showing binary file.</p> {{ else }} - <pre> + <pre><span style="display: block">{{- .Header -}}</span> {{- range .TextFragments -}} - <p>{{- .Header -}}</p> {{- range .Lines -}} {{- if eq .Op.String "+" -}} <span class="diff-add">{{ .String }}</span>
M templates/file.htmltemplates/file.html
@@ -1,8 +1,9 @@
{{ define "file" }} +<!DOCTYPE html> <html> {{ template "head" . }} - {{ template "repoheader" . }} <body> + {{ template "repoheader" . }} {{ template "nav" . }} <main> <p>{{ .path }} (<a style="color: gray" href="?raw=true">view raw</a>)</p>
@@ -26,7 +27,7 @@ <pre>
{{- .content -}} </pre> </td> - </tbody></tr> + </tr></tbody> </table> </div> {{end}}
M templates/head.htmltemplates/head.html
@@ -3,7 +3,7 @@ <head>
<meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="/static/style.css" type="text/css"> - <link rel="icon" type="image/png" size="32x32" href="/static/legit.png"> + <link rel="icon" type="image/png" sizes="32x32" href="/static/legit.png"> {{ if .parent }} <title>{{ .meta.Title }} &mdash; {{ .name }} ({{ .ref }}): {{ .parent }}/</title>
M templates/index.htmltemplates/index.html
@@ -1,12 +1,13 @@
{{ define "index" }} +<!DOCTYPE html> <html> {{ template "head" . }} - <header> - <h1>{{ .meta.Title }}</h1> - <h2>{{ .meta.Description }}</h2> - </header> <body> + <header> + <h1>{{ .meta.Title }}</h1> + <h2>{{ .meta.Description }}</h2> + </header> <main> <div class="index"> {{ range .info }}
M templates/log.htmltemplates/log.html
@@ -1,9 +1,10 @@
{{ define "log" }} +<!DOCTYPE html> <html> {{ template "head" . }} - {{ template "repoheader" . }} <body> + {{ template "repoheader" . }} {{ template "nav" . }} <main> {{ $repo := .name }}
M templates/nav.htmltemplates/nav.html
@@ -2,11 +2,11 @@ {{ define "nav" }}
<nav> <ul> {{ if .name }} - <li><a href="/{{ .name }}">summary</a> - <li><a href="/{{ .name }}/refs">refs</a> + <li><a href="/{{ .name }}">summary</a></li> + <li><a href="/{{ .name }}/refs">refs</a></li> {{ if .ref }} - <li><a href="/{{ .name }}/tree/{{ .ref }}/">tree</a> - <li><a href="/{{ .name }}/log/{{ .ref }}">log</a> + <li><a href="/{{ .name }}/tree/{{ .ref }}/">tree</a></li> + <li><a href="/{{ .name }}/log/{{ .ref }}">log</a></li> {{ end }} {{ end }} </ul>
M templates/refs.htmltemplates/refs.html
@@ -1,9 +1,10 @@
{{ define "refs" }} +<!DOCTYPE html> <html> {{ template "head" . }} - {{ template "repoheader" . }} <body> + {{ template "repoheader" . }} {{ template "nav" . }} <main> {{ $name := .name }}
M templates/repo.htmltemplates/repo.html
@@ -1,11 +1,12 @@
{{ define "repo" }} +<!DOCTYPE html> <html> {{ template "head" . }} - -{{ template "repoheader" . }} <body> + {{ template "repoheader" . }} {{ template "nav" . }} + <main> {{ $repo := .name }} <div class="log">
M templates/tree.htmltemplates/tree.html
@@ -1,10 +1,11 @@
{{ define "tree" }} +<!DOCTYPE html> <html> {{ template "head" . }} - {{ template "repoheader" . }} <body> + {{ template "repoheader" . }} {{ template "nav" . }} <main> {{ $repo := .name }}