aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRunxi Yu <me@runxiyu.org>2025-02-11 19:10:07 +0800
committerRunxi Yu <me@runxiyu.org>2025-02-11 19:10:07 +0800
commitd635a422d9b68219bfcacbeedcbfb099a136d617 (patch)
treeb0f2465ca622a5db552a9927b9e8a7b0c37e6647
parentstyle.css: Let's use width 100% for tables for now... adjust later (diff)
downloadforge-d635a422d9b68219bfcacbeedcbfb099a136d617.tar.gz
forge-d635a422d9b68219bfcacbeedcbfb099a136d617.tar.zst
forge-d635a422d9b68219bfcacbeedcbfb099a136d617.zip
repo_{index,log}: Link commits to their pages
Diffstat (limited to '')
-rw-r--r--static/style.css4
-rw-r--r--templates/repo_index.html.tmpl2
-rw-r--r--templates/repo_log.html.tmpl2
3 files changed, 6 insertions, 2 deletions
diff --git a/static/style.css b/static/style.css
index 5e6d10a..1242c12 100644
--- a/static/style.css
+++ b/static/style.css
@@ -79,3 +79,7 @@ th[scope=row] {
tr.title-row > th {
background-color: var(--darker-box-background-color);
}
+
+.commit-id {
+ font-family: monospace;
+}
diff --git a/templates/repo_index.html.tmpl b/templates/repo_index.html.tmpl
index ca0fd83..4fd4f08 100644
--- a/templates/repo_index.html.tmpl
+++ b/templates/repo_index.html.tmpl
@@ -21,7 +21,7 @@
<tbody>
{{- range .commits }}
<tr>
- <td class="commit-title">{{ .Message | first_line }}</td>
+ <td class="commit-title"><a href="commit/{{ .ID }}">{{ .Message | first_line }}</a></td>
<td class="commit-author">
<a class="email-name" href="mailto:{{ .Author.Email }}">{{ .Author.Name }}</a>
</td>
diff --git a/templates/repo_log.html.tmpl b/templates/repo_log.html.tmpl
index 67f28a8..9054c2d 100644
--- a/templates/repo_log.html.tmpl
+++ b/templates/repo_log.html.tmpl
@@ -21,7 +21,7 @@
<tbody>
{{- range .commits }}
<tr>
- <td class="commit-id">{{ .Hash.String }}</td>
+ <td class="commit-id"><a href="../../commit/{{ .ID }}">{{ .ID }}</a></td>
<td class="commit-title">{{ .Message | first_line }}</td>
<td class="commit-author">
<a class="email-name" href="mailto:{{ .Author.Email }}">{{ .Author.Name }}</a>