aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo/view_list.tmpl
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-09-03 10:58:52 +0800
committerGitHub <noreply@github.com>2023-09-03 02:58:52 +0000
commitfba7150ca9decee3e9c9fcd8ddeeef939231f8ec (patch)
treef330f27c3cc914d23a5b5cbadb9088b6bbe5bda9 /templates/repo/view_list.tmpl
parentf1fe102c8c9146f8cb997779a4e802691cd1d366 (diff)
downloadgitea-fba7150ca9decee3e9c9fcd8ddeeef939231f8ec.tar.gz
gitea-fba7150ca9decee3e9c9fcd8ddeeef939231f8ec.zip
Refactor "shortsha" (#26877)
The old code used complex `if` blocks and strange HTML layouts. <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/7fbee2b8-d150-4e6b-b67e-83400fa290eb) </details> This PR refactors the template code and remove legacy CSS styles. The UI doesn't change much. ![image](https://github.com/go-gitea/gitea/assets/2114189/3e195df9-0ab5-4182-bcb2-bb20cad823f2) ![image](https://github.com/go-gitea/gitea/assets/2114189/f707a49f-be41-4dfe-871f-2869f2230380)
Diffstat (limited to 'templates/repo/view_list.tmpl')
-rw-r--r--templates/repo/view_list.tmpl4
1 files changed, 2 insertions, 2 deletions
diff --git a/templates/repo/view_list.tmpl b/templates/repo/view_list.tmpl
index 453c06216d..7be2455779 100644
--- a/templates/repo/view_list.tmpl
+++ b/templates/repo/view_list.tmpl
@@ -6,7 +6,7 @@
<div class="ui active tiny slow centered inline">…</div>
{{else}}
{{if .LatestCommitUser}}
- {{ctx.AvatarUtils.Avatar .LatestCommitUser 24}}
+ {{ctx.AvatarUtils.Avatar .LatestCommitUser 24 "gt-mr-2"}}
{{if .LatestCommitUser.FullName}}
<a class="muted author-wrapper" title="{{.LatestCommitUser.FullName}}" href="{{.LatestCommitUser.HomeLink}}"><strong>{{.LatestCommitUser.FullName}}</strong></a>
{{else}}
@@ -14,7 +14,7 @@
{{end}}
{{else}}
{{if .LatestCommit.Author}}
- {{ctx.AvatarUtils.AvatarByEmail .LatestCommit.Author.Email .LatestCommit.Author.Name 24}}
+ {{ctx.AvatarUtils.AvatarByEmail .LatestCommit.Author.Email .LatestCommit.Author.Name 24 "gt-mr-2"}}
<span class="author-wrapper" title="{{.LatestCommit.Author.Name}}"><strong>{{.LatestCommit.Author.Name}}</strong></span>
{{end}}
{{end}}