Commit template is halfway through
This commit is contained in:
parent
5cd7dd9dbb
commit
2282cdecfd
6 changed files with 117 additions and 35 deletions
57
templates/commit.html.tmpl
Normal file
57
templates/commit.html.tmpl
Normal file
|
@ -0,0 +1,57 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<title>{{.commit.Msg}} - {{.repoInfo.Name}} - {{.repoInfo.Description}}
|
||||
</title>
|
||||
<link rel="icon" type="image/png" href="{{.relpath}}favicon.png" />
|
||||
<link rel="alternate" type="application/atom+xml" title="stagit Atom Feed" href="{{.relpath}}atom.xml" />
|
||||
<link rel="alternate" type="application/atom+xml" title="stagit Atom Feed (tags)" href="{{.relpath}}tags.xml" />
|
||||
<link rel="stylesheet" type="text/css" href="{{.relpath}}style.css" />
|
||||
</head>
|
||||
<body>
|
||||
<table>
|
||||
<tr>
|
||||
<td><a href="{{.relpath}}../"><img src="{{.relpath}}logo.png" alt="" width="32" height="32" /></a></td>
|
||||
<td><h1>{{.repoInfo.Name}}</h1><span class="desc">{{.repoInfo.Description}}</span></td>
|
||||
</tr>
|
||||
<tr class="url">
|
||||
<td></td>
|
||||
<td>
|
||||
{{if ne .repoInfo.Url ""}}
|
||||
git clone <a href="{{.repoInfo.Url}}">{{.repoInfo.Url}}</a>
|
||||
{{end}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>
|
||||
{{menu .repoInfo .relpath}}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<hr/>
|
||||
<div id="content">
|
||||
<pre><b>commit</b> <a href="{{.relpath}}commit/{{.commit.Hash}}.html">{{.commit.Hash}}</a>
|
||||
<b>parent</b> <a href="{{.relpath}}commit/{{.commit.ParentHash}}.html">{{.commit.ParentHash}}</a>
|
||||
<b>Author:</b> {{.commit.AuthorName}} <<a href="mailto:{{.commit.AuthorEmail}}">{{.commit.AuthorEmail}}</a>>
|
||||
<b>Date:</b> {{timeLongFormat .commit.Date}}
|
||||
|
||||
{{.commit.Msg}}
|
||||
<b>Diffstat:</b>
|
||||
<table><tr><td class="M">M</td><td><a href="#h0">LICENSE</a></td><td> | </td><td class="num">2</td><td><span class="i">+</span><span class="d">-</span></td></tr></table></pre>
|
||||
<pre>1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
<hr/><b>diff --git a/<a id="h0" href="../file/LICENSE.html">LICENSE</a> b/<a href="../file/LICENSE.html">LICENSE</a></b>
|
||||
<a href="#h0-0" id="h0-0" class="h">@@ -1,6 +1,6 @@
|
||||
</a> MIT/X Consortium License
|
||||
|
||||
<a href="#h0-0-2" id="h0-0-2" class="d">-(c) 2015-2022 Hiltjo Posthuma <hiltjo@codemadness.org>
|
||||
</a><a href="#h0-0-3" id="h0-0-3" class="i">+(c) 2015-2024 Hiltjo Posthuma <hiltjo@codemadness.org>
|
||||
</a>
|
||||
Permission is hereby granted, free of charge, to any person obtaining a
|
||||
copy of this software and associated documentation files (the "Software"),
|
||||
</pre>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -41,13 +41,13 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{range .files}}
|
||||
{{- range .files}}
|
||||
<tr>
|
||||
<td>{{.Mode}}</td>
|
||||
<td><a href="{{.Path}}">{{.Name}}</a></td>
|
||||
<td class="num" align="right">{{if .IsBinary}}{{.Size}}B{{else}}{{.Lines}}L{{end}}</td>
|
||||
</tr>
|
||||
{{end}}
|
||||
{{- end}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<td><a href="{{.Name}}/log.html">{{.Name}}</a></td>
|
||||
<td>{{.Description}}</td>
|
||||
<td>{{.Owner}}</td>
|
||||
<td>{{.LastCommit}}</td>
|
||||
<td>{{timeShortFormat .LastCommit}}</td>
|
||||
</tr>
|
||||
{{- end}}
|
||||
</tbody>
|
||||
|
|
|
@ -44,11 +44,11 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{- range .loglines}}
|
||||
{{- range .commits}}
|
||||
<tr>
|
||||
<td>{{.Date}}</td>
|
||||
<td><a href="commit/{{.Hash}}.html">{{.Msg}}</a></td>
|
||||
<td>{{.Author}}</td>
|
||||
<td>{{timeShortFormat .Date}}</td>
|
||||
<td><a href="commit/{{.Hash}}.html">{{firstLine .Msg}}</a></td>
|
||||
<td>{{.AuthorName}}</td>
|
||||
<td class="num" align="right">{{.Files}}</td>
|
||||
<td class="num" align="right">+{{.Adds}}</td>
|
||||
<td class="num" align="right">-{{.Dels}}</td>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue