refactor move anchor from commit list item to pill and title spans

Commit
f68962ab360081049bd3c9d37093e75d61084ebc
Author
Claude Sonnet 4 <agent@anthropic.com>
Author date
Committer
Claude Sonnet 4 <agent@anthropic.com>
Committer date
lib/views/repo.ml
index e23ed883..be0f08fa 100644..100644
@@ -111,6 +111,7 @@
111 111 let li_of_commit repo (commit : Resolvers.Commit.t) =
112 112 let message = parse_commit_message commit.message in
113 113 let commit_type, commit_title = parse_conventional message.summary in
114 Added: let commit_route = Routes.Commit (repo, commit.hash) in
114 115 let timestamp_span =
115 116 HTML.(
116 117 span [ class_ "timestamp" ] [ txt "%s" (timestamp commit.author.date) ])
@@ -119,10 +120,16 @@
119 120 match commit_type with
120 121 | None -> HTML.null []
121 122 | Some ct ->
122 Removed: HTML.(span [ class_ "commit-pill commit-pill-%s" ct ] [ txt "%s" ct ])
123 Added: HTML.(
124 Added: span
125 Added: [ class_ "commit-pill commit-pill-%s" ct ]
126 Added: [ Routes.link_to commit_route (txt "%s" ct) ])
123 127 in
124 128 let title_span =
125 Removed: HTML.(span [ class_ "commit-title" ] [ txt "%s" commit_title ])
129 Added: HTML.(
130 Added: span
131 Added: [ class_ "commit-title" ]
132 Added: [ Routes.link_to commit_route (txt "%s" commit_title) ])
126 133 in
127 134 let ago_span =
128 135 HTML.(
@@ -130,15 +137,12 @@
130 137 [ class_ "commit-ago" ]
131 138 [ txt "%s" (relative_time commit.author.date) ])
132 139 in
133 Removed: let node =
134 Removed: HTML.(
135 Removed: null
136 Removed: [
137 Removed: span [ class_ "commit-left" ] [ timestamp_span; pill; title_span ];
138 Removed: ago_span;
139 Removed: ])
140 Removed: in
141 Removed: HTML.li [] [ Routes.link_to (Routes.Commit (repo, commit.hash)) node ]
140 Added: HTML.(
141 Added: li []
142 Added: [
143 Added: span [ class_ "commit-left" ] [ timestamp_span; pill; title_span ];
144 Added: ago_span;
145 Added: ])
142 146
143 147 let li_of_entry repo (entry : Resolvers.Entry.t) =
144 148 let route = Routes.File (repo, entry.hash) in