From: Omar Polo Subject: gotwebd: make the commit page more like got log and tog To: gameoftrees@openbsd.org Date: Tue, 10 Jan 2023 15:14:17 +0100 syncing gotwebd with `tog' and `got log'. I'm running with this on my instance, here's an example of how it looks: http://git.omarpolo.com/?action=diff&commit=587550a5041e8aba39cd1338a22e85b6405d879f&headref=HEAD&path=got.git (author == committer) or http://git.omarpolo.com/?action=diff&commit=0b3f028dffa4ecc7aa72dc9132d53e9d056cc36f&headref=HEAD&path=got.git (author != committer) I don't think it's very useful to show the tree id. It's also rendered in the blob page; if this is ok i'll drop it from there too. ----------------------------------------------- commit 1bdce15e3cdcbc762bb116312508182c0d575fe1 (main) from: Omar Polo date: Tue Jan 10 14:08:37 2023 UTC gotwebd: make commit page more like `got log' / tog - drop the "diff commit1 commit2" header; it's already showed in the body of the diff. - hide the tree id (not that useful to show.) - show the committer if different from the author. - use From/Via for Committer/Author. diff 2e6043e87514d1a49e1c8a037d7c4e20869b07ad 1bdce15e3cdcbc762bb116312508182c0d575fe1 commit - 2e6043e87514d1a49e1c8a037d7c4e20869b07ad commit + 1bdce15e3cdcbc762bb116312508182c0d575fe1 blob - 6a5d354e145ae61a1ae18f8936f735573508bd28 blob + c8f7a859f74578199b84566a25e7a1b31a3717d9 --- gotwebd/files/htdocs/gotwebd/gotweb.css +++ gotwebd/files/htdocs/gotwebd/gotweb.css @@ -228,20 +228,6 @@ body { padding-top: 2px; padding-bottom: 2px; } -#header_diff_title { - clear: left; - float: left; - width: 6.5em; - padding-left: 10px; - padding-top: 2px; - padding-bottom: 2px; -} -#header_diff { - float: left; - width: 72%; - padding-top: 2px; - padding-bottom: 2px; -} .header_author_title { clear: left; float: left; blob - db75509aef099d948964c7a1a20115f27e7e63ed blob + 3265456df058f025cd052df66cbffdcff9b45932 --- gotwebd/pages.tmpl +++ gotwebd/pages.tmpl @@ -708,18 +708,14 @@ gotweb_render_age(struct template *tp, time_t time, in
-
Diff:
-
- {{ rc->parent_id }} -
- {{ rc->commit_id }} -
Commit:
{{ rc->commit_id }}
-
Tree:
-
{{ rc->tree_id }}
-
Author:
+
From:
{{ rc->author }}
+ {{ if strcmp(rc->committer, rc->author) != 0 }} +
Via:
+
{{ rc->committer }}
+ {{ end }}
Date:
{{ render gotweb_render_age(tp, rc->committer_time, TM_LONG) }}