aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-02-11 13:33:03 +0800
committerRunxi Yu <me@runxiyu.org>2025-02-11 13:34:54 +0800
commit49654f1d302fab1b7fd2c257f87c150346ca2663 (patch)
tree2bd067d2253507e5a2a29106fcd235c02119f35f /templates
parentrepo_{raw,tree}: Redirect if visiting file but path_spec ends with slash (diff)
downloadforge-49654f1d302fab1b7fd2c257f87c150346ca2663.tar.gz
forge-49654f1d302fab1b7fd2c257f87c150346ca2663.tar.zst
forge-49654f1d302fab1b7fd2c257f87c150346ca2663.zip
repo_log: Add a log
Diffstat (limited to 'templates')
-rw-r--r--templates/repo_log.html.tmpl41
1 files changed, 41 insertions, 0 deletions
diff --git a/templates/repo_log.html.tmpl b/templates/repo_log.html.tmpl
new file mode 100644
index 0000000..67f28a8
--- /dev/null
+++ b/templates/repo_log.html.tmpl
@@ -0,0 +1,41 @@
+{{- define "repo_log" -}}
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ {{ template "head_common" . }}
+ <title>Log of {{ .group_name }}/repos/{{ .repo_name }} &ndash; Lindenii Forge</title>
+ </head>
+ <body class="repo-index">
+ <table id="recent-commits">
+ <thead>
+ <tr class="title-row">
+ <th colspan="4">Commits on {{ .ref }}</th>
+ </tr>
+ <tr>
+ <th scope="col">ID</th>
+ <th scope="col">Title</th>
+ <th scope="col">Author</th>
+ <th scope="col">Time</th>
+ </tr>
+ </thead>
+ <tbody>
+ {{- range .commits }}
+ <tr>
+ <td class="commit-id">{{ .Hash.String }}</td>
+ <td class="commit-title">{{ .Message | first_line }}</td>
+ <td class="commit-author">
+ <a class="email-name" href="mailto:{{ .Author.Email }}">{{ .Author.Name }}</a>
+ </td>
+ <td class="commit-time">
+ {{ .Author.When.Format "2006-01-02 15:04:05 -0700" }}
+ </td>
+ </tr>
+ {{- end }}
+ </tbody>
+ </table>
+ <footer>
+ {{ template "footer" . }}
+ </footer>
+ </body>
+</html>
+{{- end -}}