From 1d8316f27831d6a77837d649ea09b94c66926cba Mon Sep 17 00:00:00 2001 From: Giteabot Date: Thu, 18 Apr 2024 18:04:47 +0800 Subject: [PATCH] Fix border-radius on view, blame and code search (#30545) (#30560) Backport #30545 by @silverwind Fixes: https://github.com/go-gitea/gitea/issues/30540 1. Fix all these boxes by adding `bottom attached` and removing a problematic CSS rule: Screenshot 2024-04-17 at 22 25 31 Screenshot 2024-04-17 at 22 21 18 2. Change the "last commit" box to `ui segment` which has correct border-radius. Also included is a tiny tweak to make author name ellipse instead of wrap. Screenshot 2024-04-17 at 22 23 23 Co-authored-by: silverwind (cherry picked from commit b4a38318c333519b1008d03fd01e14a803363498) --- templates/repo/blame.tmpl | 2 +- templates/repo/settings/lfs_file.tmpl | 2 +- templates/repo/view_file.tmpl | 4 ++-- web_src/css/repo.css | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/templates/repo/blame.tmpl b/templates/repo/blame.tmpl index 45cf841748..01978dacf7 100644 --- a/templates/repo/blame.tmpl +++ b/templates/repo/blame.tmpl @@ -28,7 +28,7 @@ -
+
{{if .IsFileTooLarge}} diff --git a/templates/repo/settings/lfs_file.tmpl b/templates/repo/settings/lfs_file.tmpl index 43afba96c3..5bcd2af5bf 100644 --- a/templates/repo/settings/lfs_file.tmpl +++ b/templates/repo/settings/lfs_file.tmpl @@ -11,7 +11,7 @@ {{ctx.Locale.Tr "repo.settings.lfs_findcommits"}} -
+
{{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}}
{{if .IsMarkup}} diff --git a/templates/repo/view_file.tmpl b/templates/repo/view_file.tmpl index 333121c205..dfbc45dd61 100644 --- a/templates/repo/view_file.tmpl +++ b/templates/repo/view_file.tmpl @@ -11,7 +11,7 @@ {{end}} {{if not .ReadmeInList}} -
+
{{template "repo/latest_commit" .}}
@@ -93,7 +93,7 @@ {{end}}
-
+
{{if not (or .IsMarkup .IsRenderedHTML)}} {{template "repo/unicode_escape_prompt" dict "EscapeStatus" .EscapeStatus "root" $}} {{end}} diff --git a/web_src/css/repo.css b/web_src/css/repo.css index 51e134e7e3..0093cb3eb5 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -435,7 +435,6 @@ td .commit-summary { padding: 0 !important; } -.non-diff-file-content .attached.segment, .non-diff-file-content .pdfobject { border-radius: 0 0 var(--border-radius) var(--border-radius); } @@ -2524,6 +2523,7 @@ tbody.commit-list { .author-wrapper { max-width: 180px; align-self: center; + white-space: nowrap; } /* in the commit list, messages can wrap so we can use inline */