all repos — legit @ 2d263d99a3b92257235fd6b766fa5d1206751ac0

legit - simple git web interface in go (fork)

add style tweaks: commit hashes, emails, and more cross-browser friendly file view
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAmPZgfMACgkQO3+8IhRO
Y5h3Jg//XVryJ39SnX5gyQPq/1CpkKr9oaL3wYoGO647Egmjcy5wrEt6US4AxMrs
aq0+aV+qHErleL3INIKK12F3Hjptb8j/ae/Ilvldbs64AvY9AzjjyFkPGZNQeBxr
ziqFMxfjaFUitp6adAyJ28f70bDrys1Wmk6KrgMtPbAku0j9WtkhrHPRAD4JWK4l
ZtIIt0lWoOuA4DsMJlsXty7dG+zBY4pBKkVwUNuQIvFbL1rNdl/m1x6fh1z9kZRD
otz7oDEAONFdMoBWyHSTXX6lvHdUumjJpdH7L2ilog4kht9Fp42pOhnXoGoVBCvZ
rF3asIB5BcjrYJmjapFQMScxMXKT1xdoZ+t/9yD5m/XtfYRAqvNBk9lS/bt3wRPI
+908LYPXah4+p9gqIxwKe9pFQbca0VuqpZ2mvZsbshbpVKoxMgC8LUIvs0ze7G7n
tUFeFD3S5Dfu9N/qXDFjdobus7s45P3TL7MjMjpxYOzRrxvwev3s0OIowPWabrUy
JOxGmxGe5Wmi6APj5i6u3cWslhDzrDEnOZQQRoSvk1U0TN5+fd8cXbd+eTyGRXIs
rWJFGptHXtF/wEA5whw1Ag46oJE1VurYBEFxDOjeWZA0Cne6sjDaWJGaYYTeLDMX
ncKiXErIY/F1huDaVegdNR5Lth/OIAj0tK5u87CYNfcCR8ypWao=
=Qjsa
-----END PGP SIGNATURE-----
commit

2d263d99a3b92257235fd6b766fa5d1206751ac0

parent

7a512b1da60ca92203ec93ecce8b0debfe6da913

5 files changed, 31 insertions(+), 20 deletions(-)

jump to
M static/style.cssstatic/style.css

@@ -180,6 +180,10 @@ .diff-stat {

padding: 1rem 0 1rem 0; } +.commit-hash, .commit-email { + font-family: var(--mono-font); +} + .commit-email:before { content: '<'; }

@@ -238,21 +242,24 @@ -khtml-user-select: none;

-webkit-user-select: none; -o-user-select: none; user-select: none; + display: flex; + float: left; + flex-direction: column; + margin-right: 1ch; } .file-wrapper { - display: flex; - flex-direction: row; - grid-template-columns: 1rem minmax(0, 1fr); - gap: 1rem; - padding: 0.5rem; background: var(--light-gray); + display: table; + padding: 0.5rem + width: 100%; } .file-content { background: var(--light-gray); overflow-y: hidden; overflow-x: auto; + display: block; } .diff-type {
M templates/commit.htmltemplates/commit.html

@@ -11,13 +11,13 @@ <pre>

{{- .commit.Message -}} </pre> <div class="commit-info"> - {{ .commit.Author.Name }} <span class="commit-email">{{ .commit.Author.Email}}</span> + {{ .commit.Author.Name }} <a href="mailto:{{ .Author.Email }}" class="commit-email">{{ .commit.Author.Email}}</span> <div>{{ .commit.Author.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</div> </div> <div> <strong>commit</strong> - <p><a href="/{{ .name }}/commit/{{ .commit.This }}"> + <p><a href="/{{ .name }}/commit/{{ .commit.This }}" class="commit-hash"> {{ .commit.This }} </a> </p>

@@ -26,7 +26,7 @@

{{ if .commit.Parent }} <div> <strong>parent</strong> - <p><a href="/{{ .name }}/commit/{{ .commit.Parent }}"> + <p><a href="/{{ .name }}/commit/{{ .commit.Parent }}" class="commit-hash"> {{ .commit.Parent }} </a></p> </div>
M templates/file.htmltemplates/file.html

@@ -8,18 +8,22 @@ <body>

{{ template "nav" . }} <main> <p>{{ .path }}</p> - <div class="file-wrapper"> - <div class="line-numbers"> - {{- range .linecount }} + <table class="file-wrapper"> + <tbody><tr> + <td class="line-numbers"> + <pre> + {{- range .linecount }} <a id="L{{ . }}" href="#L{{ . }}">{{ . }}</a> - {{- end -}} - </div> - <div class="file-content"> - <span></span> + {{- end -}} + </pre> + </td> + <td class="file-content"> <pre> {{- .content -}} </pre> - </div> + </td> + </tbody></tr> + </table> </main> </body> </html>
M templates/log.htmltemplates/log.html

@@ -14,11 +14,11 @@ {{ $repo := .name }}

<div class="log"> {{ range .commits }} <div> - <div><a href="/{{ $repo }}/commit/{{ .Hash.String }}">{{ slice .Hash.String 0 8 }}</a></div> + <div><a href="/{{ $repo }}/commit/{{ .Hash.String }}" class="commit-hash">{{ slice .Hash.String 0 8 }}</a></div> <pre>{{ .Message }}</pre> </div> <div class="commit-info"> - {{ .Author.Name }} <span class="commit-email">{{ .Author.Email }}</span> + {{ .Author.Name }} <a href="mailto:{{ .Author.Email }}" class="commit-email">{{ .Author.Email }}</a> <div>{{ .Author.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</div> </div> {{ end }}
M templates/repo.htmltemplates/repo.html

@@ -16,11 +16,11 @@ {{ $repo := .name }}

<div class="log"> {{ range .commits }} <div> - <div><a href="/{{ $repo }}/commit/{{ .Hash.String }}">{{ slice .Hash.String 0 8 }}</a></div> + <div><a href="/{{ $repo }}/commit/{{ .Hash.String }}" class="commit-hash">{{ slice .Hash.String 0 8 }}</a></div> <pre>{{ .Message }}</pre> </div> <div class="commit-info"> - {{ .Author.Name }} <span class="commit-email">{{ .Author.Email }}</span> + {{ .Author.Name }} <a href="mailto:{{ .Author.Email }}" class="commit-email">{{ .Author.Email }}</a> <div>{{ .Author.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</div> </div> {{ end }}