mirror of
https://codeberg.org/gothub/gothub
synced 2024-12-06 19:16:24 +01:00
add support for viewing specific commits
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
{{ template "header" .}}
|
||||
|
||||
<main>
|
||||
{{ if.commit }}
|
||||
<style>
|
||||
// prettier-ignore
|
||||
{{.css}}
|
||||
pre {
|
||||
white-space: pre-wrap;
|
||||
word-wrap: break-word;
|
||||
}
|
||||
</style>
|
||||
{{ range $key, $value := .commit}}
|
||||
<div class="download-parent">
|
||||
<a href="/{{.FullName}}" class="button">Back to {{.FullName}}</a>
|
||||
</div>
|
||||
|
||||
<div class="user-readme">
|
||||
<div class="user-container">
|
||||
<h3>{{.CommitHashShortened}} | {{.CommitName}}</h3>
|
||||
<a
|
||||
href="/{{.FullName}}/{{.CommitHashShortened}}.diff"
|
||||
class="button secondary"
|
||||
>Raw</a
|
||||
>
|
||||
</div>
|
||||
{{.CommitName}} {{ if .CommitDesc }}
|
||||
<pre>{{.CommitDesc}}</pre>
|
||||
{{end}}
|
||||
<p>
|
||||
Commited on {{.CommitDate}} by {{range .Commiter}}
|
||||
<a href="/{{.}}" target="_blank">@{{.}}</a>{{ end }}
|
||||
</p>
|
||||
<p>
|
||||
Previous Commit:
|
||||
<a href="/{{.FullName}}/commit/{{.PreviousCommit}}"
|
||||
>{{.PreviousCommit}}</a
|
||||
>
|
||||
</p>
|
||||
</div>
|
||||
{{end}} {{ .file}} {{ else }}
|
||||
<h2>Commit not found</h2>
|
||||
<p>That commit doesn't exist.</p>
|
||||
{{ end }}
|
||||
</main>
|
||||
{{ template "footer" .}}
|
||||
Reference in New Issue
Block a user