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
This commit is contained in:
parent
584243d358
commit
cd131c0629
4 changed files with 71 additions and 23 deletions
|
@ -32,6 +32,7 @@ type NiceDiff struct {
|
|||
Author object.Signature
|
||||
This string
|
||||
Parent string
|
||||
PGPSignature string
|
||||
}
|
||||
Stat struct {
|
||||
FilesChanged int
|
||||
|
@ -86,6 +87,9 @@ func (g *GitRepo) Diff() (*NiceDiff, error) {
|
|||
}
|
||||
nd.Commit.Author = c.Author
|
||||
nd.Commit.Message = c.Message
|
||||
if c.PGPSignature != "" {
|
||||
nd.Commit.PGPSignature = c.PGPSignature
|
||||
}
|
||||
|
||||
for _, d := range diffs {
|
||||
ndiff := Diff{}
|
||||
|
|
|
@ -231,8 +231,37 @@ a:hover {
|
|||
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 {
|
||||
|
|
|
@ -11,8 +11,13 @@
|
|||
{{- .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>
|
||||
|
|
|
@ -12,27 +12,37 @@
|
|||
<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>
|
||||
<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>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ if .PGPSignature }}
|
||||
<details><summary>PGP Signature</summary>
|
||||
<pre>{{ .PGPSignature }}</pre>
|
||||
</details>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end }}
|
||||
|
|
Loading…
Reference in a new issue