Goit

Simple and lightweight Git web server
git clone https://git.omkov.net/Goit
git clone [email protected]:Goit
Log | Tree | Refs | README | Download

Goit/res/repo/commit.html (61 lines, 1.5 KiB) -rw-r--r-- blame download

0123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
<!DOCTYPE html>
<html lang="en">
	<head>{{template "base/head" .}}</head>
	<body>
		<header>{{template "repo/header" .}}</header><hr>
		<main>
			<table>
				<tr><td>Author</td><td>{{.Author}}</td></tr>
				<tr><td>Date</td><td>{{.Date}}</td></tr>
				<tr><td>Commit</td><td><a href="/{{.Name}}/commit/{{.Commit}}">{{.Commit}}</a></td></tr>
				{{range $i, $h := .Parents}}
					<tr><td>Parent</td><td><a href="/{{$.Name}}/commit/{{$h}}">{{$h}}</a></td></tr>
				{{end}}
				{{if .Branches}}
					<tr>
						<td>Branch{{if gt (len .Branches) 1}}es{{end}}</td>
						<td>
							{{range $i, $_ := .Branches}}{{if $i}},{{- end}}
								{{.}}
							{{- end}}
						</td>
					</tr>
				{{end}}
				{{if .Tags}}
					<tr>
						<td>Tag{{if gt (len .Tags) 1}}s{{end}}</td>
						<td>
							{{range $i, $_ := .Tags}}{{if $i}},{{- end}}
								<a href="/{{$.Name}}/tag/{{.}}">{{.}}</a>
							{{- end}}
						</td>
					</tr>
				{{end}}
			</table>
			<p>{{.MessageSubject}}</p>
			<p>{{.MessageBody}}</p>
			<h2>Diffstat</h2>
			<table>
				{{range .Stats}}
					<tr>
						<td>{{.Status}}</td>
						<td><a href="/{{$.Name}}/file/{{.Path}}">{{.Name}}</a></td>
						<td>|</td>
						{{if .IsBinary}}
							<td colspan="2">binary</td>
						{{else}}
							<td>{{.Num}}</td>
							<td>
								<span style="color: #008800;">{{.Plusses}}</span><!--
								--><span style="color: #AA0000;">{{.Minuses}}</span>
							</td>
						{{end}}
					</tr>
				{{end}}
			</table>
			<p>{{.Summary}}</p>
			<pre style="tab-size: 4;">{{.Diff}}</pre>
		</main>
	</body>
</html>