2 files changed, +15, -10
c692c87Start the last commit row with the commit id
author
mogi <git@paramogi.world> on 29-11-2026 20:48 UTC
committer
mogi <git@paramogi.world> on 29-11-2026 20:48 UTC
parent7f33f86
style.css
+7, -2
+8, -8
        @@ -789,16 +789,16 @@ fn summary_cell(repo_root: &str, id: &str, summary: &str) -> String {
 789 789 }
 790 790 
 791 791 fn commit_cells(repo_root: &str, id: &str, summary: &str, date: &DateTime<FixedOffset>) -> String {
     792+    let href = format!("{repo_root}commits/{id}");
     793+    let summary = escape_str(summary);
 792 794     format!(
 793 795         "\
     796+<div class=\"flex items-center tree-commit short-id\"><a href=\"{href}\" class=\"commit-id row-link\">{}{}</a></div>\n\
     797+<div class=\"flex flex-2 tree-commit\"><a class=\"truncate row-link\" href=\"{href}\" title=\"{summary}\">{summary}</a></div>\n\
 794 798 {}\
 795    -<div class=\"ml-auto flex items-center\">\n\
 796    -<div class=\"flex items-center tree-commit short-id\">{}</div>\n\
 797    -{}\
 798    -</div>\n\
 799 799 ",
 800    -        summary_cell(repo_root, id, summary),
 801    -        short_id(repo_root, id),
     800+        icon("git-commit"),
     801+        &id[..7],
 802 802         date_cell(date)
 803 803     )
 804 804 }
        @@ -893,7 +893,7 @@ pub fn gen_blob(
 893 893     let mut body = ref_bar(repo, git_ref, &path, &repo_root, commits, "page");
 894 894     if !details.is_empty() {
 895 895         body.push_str(&format!(
 896    -            "<div class=\"box joined flex items-center gap last-commit\">\n{details}</div>\n"
     896+            "<div class=\"box joined flex items-center gap row last-commit\">\n{details}</div>\n"
 897 897         ));
 898 898     }
 899 899     let views = has_source_view(entry);
        @@ -1654,7 +1654,7 @@ fn write_listing(
16541654     };
16551655     if !head.is_empty() {
16561656         body.push_str(&format!(
1657    -            "<div class=\"flex items-center gap px border-b last-commit\">\n{head}</div>\n"
    1657+            "<div class=\"flex items-center gap px row border-b last-commit\">\n{head}</div>\n"
16581658         ));
16591659     }
16601660     if !dir.path.is_empty() {
+7, -2
        @@ -1647,15 +1647,20 @@ pre.chroma[style] .cl {
16471647   background-color: var(--stripe);
16481648 }
16491649 
1650    -.last-commit > .tree-commit {
    1650+.last-commit > .short-id + .tree-commit {
    1651+  margin-left: -0.65rem;
16511652   color: var(--fg);
16521653   --link: var(--fg);
16531654 }
16541655 
1655    -.last-commit > .tree-commit a {
    1656+.last-commit > .short-id + .tree-commit a {
16561657   font-weight: 500;
16571658 }
16581659 
    1660+.last-commit:hover > .short-id {
    1661+  text-decoration: underline var(--fg);
    1662+}
    1663+
16591664 .up-row .tree-path a {
16601665   letter-spacing: 0.1em;
16611666 }