Files
gothub/views/commit.html
T
2023-07-23 13:16:39 +05:30

47 lines
1.1 KiB
HTML

{{ 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="/diff/{{.FullName}}/commit/{{.CommitHashShortened}}"
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" .}}