From d1527dac3d1e68caf5a6f54c08144e28256e5c47 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Mon, 9 Oct 2023 15:19:23 +0800 Subject: [PATCH] Improve file history UI and fix URL escaping bug (#27531) Follow #27354 Major changes: 1. The `right aligned` in `` is a no-op because it doesn't have any content 2. The `gt-df` in `` was wrong, it causes UI misalignment, a table cell shouldn't be "flex" 3. Use `gt-py-0` for `gt-pt-0 gt-pb-0` 4. Simplify the layout for buttons, because the `text right aligned` is widely used and good enough, it doesn't make sense to introduce the `
` 5. Escape the `$.FileName` correctly Before: ![image](https://github.com/go-gitea/gitea/assets/2114189/eb2ced3f-1dad-4149-9ed2-aee4c0663621) After: ![image](https://github.com/go-gitea/gitea/assets/2114189/08244b61-416b-4279-b495-029bc0a96f67) --- templates/repo/commits_list.tmpl | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/templates/repo/commits_list.tmpl b/templates/repo/commits_list.tmpl index 6793a81bf..d071fb90a 100644 --- a/templates/repo/commits_list.tmpl +++ b/templates/repo/commits_list.tmpl @@ -6,7 +6,7 @@ SHA1 {{ctx.Locale.Tr "repo.commits.message"}} {{ctx.Locale.Tr "repo.commits.date"}} - + @@ -25,7 +25,7 @@ {{$userName}} {{end}} - + {{$class := "ui sha label"}} {{if .Signature}} {{$class = (print $class " isSigned")}} @@ -76,11 +76,11 @@ {{else}} {{TimeSince .Author.When ctx.Locale}} {{end}} - -
- - {{if $.FileName}}{{svg "octicon-file-code"}}{{end}} -
+ + + {{if $.FileName}} + {{svg "octicon-file-code"}} + {{end}} {{end}}