From aee5ef00519cd199992bb7dc02b4fa22a392869e Mon Sep 17 00:00:00 2001 From: silverwind Date: Thu, 1 Apr 2021 00:19:53 +0200 Subject: Diff box fixes (#15214) - Fix misaligned "Show Outdated" buttons via flexbox - Add hover effect to "Show Outdated" buttons - Remove overreaching margin from selector .diff-file-box and handle cases individually. Fixes: https://github.com/go-gitea/gitea/issues/15097 Co-authored-by: Lunny Xiao Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: zeripath Co-authored-by: techknowlogick --- templates/repo/diff/box.tmpl | 6 +-- templates/repo/diff/conversation.tmpl | 26 +++++++------ templates/repo/issue/view_content/comments.tmpl | 50 +++++++++++++------------ 3 files changed, 45 insertions(+), 37 deletions(-) (limited to 'templates/repo') diff --git a/templates/repo/diff/box.tmpl b/templates/repo/diff/box.tmpl index 368fc2c444..2dcad2ba9d 100644 --- a/templates/repo/diff/box.tmpl +++ b/templates/repo/diff/box.tmpl @@ -43,7 +43,7 @@ {{range $i, $file := .Diff.Files}} {{if $file.IsIncomplete}} -
+ {{else}} -
+

{{$isImage := false}} @@ -145,7 +145,7 @@ {{end}} {{if .Diff.IsIncomplete}} -
+

{{$.i18n.Tr "repo.diff.too_many_files"}}

diff --git a/templates/repo/diff/conversation.tmpl b/templates/repo/diff/conversation.tmpl index 4dd7de0fc1..7b447d01bf 100644 --- a/templates/repo/diff/conversation.tmpl +++ b/templates/repo/diff/conversation.tmpl @@ -3,16 +3,20 @@ {{$isNotPending := (not (eq (index .comments 0).Review.Type 0))}}
{{if $resolved}} -
- {{$resolveDoer.Name}} {{$.i18n.Tr "repo.issues.review.resolved_by"}} - - +
+
+ {{$resolveDoer.Name}} {{$.i18n.Tr "repo.issues.review.resolved_by"}} +
+
+ + +
{{end}}
@@ -32,4 +36,4 @@ {{end}}
-
\ No newline at end of file +
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index 0cae8bdf95..f84981c1c6 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -459,35 +459,39 @@ {{ range $filename, $lines := .Review.CodeComments}} {{range $line, $comms := $lines}}