From b903e2b7531448347ad6f23d5e575c4f02089c93 Mon Sep 17 00:00:00 2001 From: Giteabot Date: Mon, 27 May 2024 15:41:10 +0800 Subject: [PATCH] Prevent tab shifting, remove extra margin on fluid pages (#31090) (#31099) Backport #31090 by @silverwind 1. Extend concept of https://github.com/go-gitea/gitea/pull/29831 to all tabular menus, there were only three left that weren't already ``. Screenshot 2024-05-27 at 00 42 16 Screenshot 2024-05-27 at 00 29 32 2. Remove extra padding on `fluid padded` container like for example PR diff view. The page margin is already correctly sized via `.ui.container`, so this was just extraneous padding that looked ugly. Before: Screenshot 2024-05-27 at 00 45 11 After: Screenshot 2024-05-27 at 00 45 22 3. Replace `gt-word-break` with `tw-break-anywhere` in issue-title, fixing overflow. Before: Screenshot 2024-05-27 at 00 50 14 After: Screenshot 2024-05-27 at 00 50 26 Co-authored-by: silverwind --- templates/repo/issue/view_title.tmpl | 2 +- templates/repo/pulls/tab_menu.tmpl | 6 +++--- templates/repo/settings/webhook/history.tmpl | 10 ++++++---- templates/shared/combomarkdowneditor.tmpl | 4 ++-- templates/shared/misc/tabtitle.tmpl | 1 + web_src/css/modules/container.css | 4 ---- 6 files changed, 13 insertions(+), 14 deletions(-) create mode 100644 templates/shared/misc/tabtitle.tmpl diff --git a/templates/repo/issue/view_title.tmpl b/templates/repo/issue/view_title.tmpl index 097d7b1f7c..58d3759a9d 100644 --- a/templates/repo/issue/view_title.tmpl +++ b/templates/repo/issue/view_title.tmpl @@ -6,7 +6,7 @@
{{$canEditIssueTitle := and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .Repository.IsArchived)}}
-

+

{{RenderIssueTitle $.Context .Issue.Title ($.Repository.ComposeMetas ctx) | RenderCodeBlock}} #{{.Issue.Index}}

diff --git a/templates/repo/pulls/tab_menu.tmpl b/templates/repo/pulls/tab_menu.tmpl index d5a8d6ed21..8b192c44db 100644 --- a/templates/repo/pulls/tab_menu.tmpl +++ b/templates/repo/pulls/tab_menu.tmpl @@ -2,17 +2,17 @@