all repos — legit @ cd131c06293f87b5749a50a227f470e79cc55549

legit - simple git web interface in go (fork)

update layout for refs page, add pgp signatures to tags and commits

only detailed commits have pgp sigs, not in the log to save bandwidth
Iris Lightshard nilix@nilfm.cc
PGP Signature
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEkFh6dA+k/6CXFXU4O3+8IhROY5gFAmPbTW4ACgkQO3+8IhRO
Y5iS+Q//WWPZl41efudhZBCHrIR7kFvUVSKVMAgPux7ooSDklj+gaVXMKhfMJsiI
EanvnZa4rjCaiHaRKA+kVyIURBNDnzGTlYBvjcTlaZ0UF57LorRl6IlDjd7l4eXP
iy4/H453Gd9FKq+0wEHEEOW14zZZO40xeUno5Qg7GF3GbFrbZ/Cs3w9mYrON8+gY
S5Syux3Ri8QZhwMlBiEqpHkXNfLCzuBD8mHIzgIx0v84fCZn8zEuJCfDymEkgVdz
AYewIuXBQgiA0jmuQw/jIaeWts43dfjXnhF0+Z0q5N6azlajHsNSCkTVK8mAPt1z
23kNlHxSGmaoOa0kK+ntjFDPD3PEzp6/sH1nEN2mQBqAl0EWlvzv33ulOCPt54+9
UCGhc12ljAS+n/ziel9NEUAAFC612WwjGICzdMFPkP7WoDv70nW04qtinEeCXSAH
RfjtR570oQBmeKDciWV1nb7ZEXvgDLsHyhWkJ3un6qEtORib7nnApB29Y2XGuDfK
h1mr66fu9tcXiZex7YuKhiWiz2qMKN8bYY0x5VnwtTeMg/V5QVZPGnDRURmdB3Qn
MCAyIRaFwg+U714QsYovO1EUTzCEZpx6+voh9HOMConbDAGLypQlnCFA2F7SziB1
Cptob+YlZ5xwxnHtWRivqa8mbJsOea4hUBPNtxl3O+uJleLvs1k=
=Hoyy
-----END PGP SIGNATURE-----
commit

cd131c06293f87b5749a50a227f470e79cc55549

parent

584243d358e4c14ed1daf65271bb4a3fd505d770

4 files changed, 71 insertions(+), 23 deletions(-)

jump to
M git/diff.gogit/diff.go

@@ -28,10 +28,11 @@

// A nicer git diff representation. type NiceDiff struct { Commit struct { - Message string - Author object.Signature - This string - Parent string + Message string + Author object.Signature + This string + Parent string + PGPSignature string } Stat struct { FilesChanged int

@@ -86,6 +87,9 @@ nd.Commit.Parent = parent.Hash.String()

} nd.Commit.Author = c.Author nd.Commit.Message = c.Message + if c.PGPSignature != "" { + nd.Commit.PGPSignature = c.PGPSignature + } for _, d := range diffs { ndiff := Diff{}
M static/style.cssstatic/style.css

@@ -231,8 +231,37 @@ white-space: pre-wrap;

padding-bottom: 0.5rem; } -.refs strong { - padding-right: 1em; +.refs h4 { + display: inline; +} + +.refs ul { + list-style: none; + display: inline; +} + +.refs ul li { + margin-left: 1ch; + display: inline; +} + +.tag-entry { + padding-bottom: 1em; + margin-bottom: 2em; +} + +.tag-entry:not(:last-child) { + border-bottom: 1px solid var(--medium-gray); +} + +.tag-entry time { + color: var(--gray); + float: right; + font-size: 0.85rem; +} + +.commit time { + display: block; } .line-numbers {
M templates/commit.htmltemplates/commit.html

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

{{- .commit.Message -}} </pre> <div class="commit-info"> - {{ .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> + {{ .commit.Author.Name }} <a href="mailto:{{ .Author.Email }}" class="commit-email">{{ .commit.Author.Email}}</a> + <time>{{ .commit.Author.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</time> + {{ if .commit.PGPSignature }} + <details><summary>PGP Signature</summary> + <pre>{{ .commit.PGPSignature }}</pre> + </details> + {{ end }} </div> <div>
M templates/refs.htmltemplates/refs.html

@@ -12,28 +12,38 @@ {{ template "nav" . }}

<main> {{ $name := .name }} <h3>branches</h3> - <div class="refs"> + <div class="refs branches"> {{ range .branches }} - <div> - <strong>{{ .Name.Short }}</strong> - <a href="/{{ $name }}/tree/{{ .Name.Short }}/">browse</a> - <a href="/{{ $name }}/log/{{ .Name.Short }}">log</a> + <div class="branch-entry"> + <h4>{{ .Name.Short }}</h4> + <ul> + <li><a href="/{{ $name }}/tree/{{ .Name.Short }}/">browse</a></li> + <li><a href="/{{ $name }}/log/{{ .Name.Short }}">log</a></li> + </ul> </div> {{ end }} </div> {{ if .tags }} <h3>tags</h3> - <div class="refs"> + <div class="refs tags"> {{ range .tags }} - <div> - <strong>{{ .Name }}</strong> - <a href="/{{ $name }}/tree/{{ .Name }}/">browse</a> - <a href="/{{ $name }}/log/{{ .Name }}">log</a> - {{ if .Message }} - <pre>{{ .Message }}</pre> - </div> - {{ end }} - {{ end }} + <div class="tag-entry"> + <h4>{{ .Name }}</h4> + <time>{{ .Tagger.When.Format "Mon, 02 Jan 2006 15:04:05 -0700" }}</time> + <ul> + <li><a href="/{{ $name }}/tree/{{ .Name }}/">browse</a></li> + <li><a href="/{{ $name }}/log/{{ .Name }}">log</a></li> + </ul> + {{ if .Message }} + <pre>{{ .Message }}</pre> + {{ end }} + {{ if .PGPSignature }} + <details><summary>PGP Signature</summary> + <pre>{{ .PGPSignature }}</pre> + </details> + {{ end }} + </div> + {{ end }} </div> {{ end }} </main>