add support for viewing commit changes (with a horrible commit ui for now)

This commit is contained in:
Arya Kiran
2023-03-20 16:23:56 +05:30
parent 0bbb5f93e4
commit 15645df84d
3 changed files with 145 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
{{ template "header" .}}
<main>
<style>
// prettier-ignore
{{.css}}
pre {
white-space: pre-wrap;
word-wrap: break-word;
}
</style>
{{ if .commit }} {{ range $key, $value := .commit}}
<div class="userProfile">
<h1>{{.CommitHashShortened}} | {{.CommitName}}</h1>
</div>
<div class="userReadme">
{{.CommitName}} <pre>{{.CommitDesc}}</pre> {{.CommitHashShortened}} {{.CommitDate}} {{.Commiter}} {{.CommitToBranch}} {{.PreviousCommit}}
Members: {{range .Commiter}}
<a href="/{{.}}" target="_blank">@{{.}}</a>
{{ end }}
</div>
{{end}}
{{ .file}}
{{ else }}
<h2>Directory not found</h2>
<p>That directory doesn't exist.</p>
{{ end }}
</main>
{{ template "footer" .}}