From aa2b3b2b1fdaf37917014770cd6bef3a2a5028a3 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sat, 7 Jun 2025 19:57:07 +0200 Subject: [PATCH] Misc CSS fixes (#34638) 1. apply [`text-wrap: balance`](https://developer.mozilla.org/en-US/docs/Web/CSS/text-wrap#balance) to various places making the text wrapping nicer, moving `empty-placeholder` CSS to base because it's not repo-specific. Screenshot 2025-06-07 at 15 09 00 Screenshot 2025-06-07 at 15 11 16 Screenshot 2025-06-07 at 15 22 26 2. fix overflow-related bug on actions run list, before: Screenshot 2025-06-07 at 15 26 26 After: Screenshot 2025-06-07 at 15 26 59 --- templates/home.tmpl | 12 ++++++------ templates/org/header.tmpl | 2 +- templates/repo/migrate/migrate.tmpl | 2 +- web_src/css/actions.css | 1 + web_src/css/base.css | 10 ++++++++++ web_src/css/form.css | 1 + web_src/css/repo.css | 12 ------------ 7 files changed, 20 insertions(+), 20 deletions(-) diff --git a/templates/home.tmpl b/templates/home.tmpl index 116dc487dc..cc9da82605 100644 --- a/templates/home.tmpl +++ b/templates/home.tmpl @@ -4,10 +4,10 @@
-

+

{{AppName}}

-

{{ctx.Locale.Tr "startpage.app_desc"}}

+

{{ctx.Locale.Tr "startpage.app_desc"}}

@@ -16,7 +16,7 @@

{{svg "octicon-flame"}} {{ctx.Locale.Tr "startpage.install"}}

-

+

{{ctx.Locale.Tr "startpage.install_desc" "https://docs.gitea.com/installation/install-from-binary" "https://github.com/go-gitea/gitea/tree/master/docker" "https://docs.gitea.com/installation/install-from-package"}}

@@ -24,7 +24,7 @@

{{svg "octicon-device-desktop"}} {{ctx.Locale.Tr "startpage.platform"}}

-

+

{{ctx.Locale.Tr "startpage.platform_desc" "https://go.dev/"}}

@@ -34,7 +34,7 @@

{{svg "octicon-rocket"}} {{ctx.Locale.Tr "startpage.lightweight"}}

-

+

{{ctx.Locale.Tr "startpage.lightweight_desc"}}

@@ -42,7 +42,7 @@

{{svg "octicon-code"}} {{ctx.Locale.Tr "startpage.license"}}

-

+

{{ctx.Locale.Tr "startpage.license_desc" "https://code.gitea.io/gitea" "code.gitea.io/gitea" "https://github.com/go-gitea/gitea"}}

diff --git a/templates/org/header.tmpl b/templates/org/header.tmpl index 80519361fd..90798b5d7c 100644 --- a/templates/org/header.tmpl +++ b/templates/org/header.tmpl @@ -18,7 +18,7 @@ {{end}} - {{if .RenderedDescription}}
{{.RenderedDescription}}
{{end}} + {{if .RenderedDescription}}
{{.RenderedDescription}}
{{end}}
{{if .Org.Location}}
{{svg "octicon-location"}} {{.Org.Location}}
{{end}} {{if .Org.Website}}
{{svg "octicon-link"}} {{.Org.Website}}
{{end}} diff --git a/templates/repo/migrate/migrate.tmpl b/templates/repo/migrate/migrate.tmpl index c5c697edff..79ac5cc8a1 100644 --- a/templates/repo/migrate/migrate.tmpl +++ b/templates/repo/migrate/migrate.tmpl @@ -19,7 +19,7 @@
{{.Title}}
-
+
{{ctx.Locale.Tr (printf "repo.migrate.%s.description" .Name)}}
diff --git a/web_src/css/actions.css b/web_src/css/actions.css index 665893a287..c43ebe21a0 100644 --- a/web_src/css/actions.css +++ b/web_src/css/actions.css @@ -59,6 +59,7 @@ .run-list-ref { display: inline-block !important; + max-width: 105px; } @media (max-width: 767.98px) { diff --git a/web_src/css/base.css b/web_src/css/base.css index ab7e6dc414..b50abf79f1 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -318,6 +318,16 @@ a.label, background: var(--color-hover); } +.empty-placeholder { + display: flex; + flex-direction: column; + align-items: center; + padding-top: 40px; + padding-bottom: 40px; + text-align: center; + text-wrap: balance; +} + .inline-code-block { padding: 2px 4px; border-radius: .24em; diff --git a/web_src/css/form.css b/web_src/css/form.css index cf8fe96bea..c51eba1bc9 100644 --- a/web_src/css/form.css +++ b/web_src/css/form.css @@ -220,6 +220,7 @@ textarea:focus, color: var(--color-secondary-dark-5); padding-bottom: 0.6em; display: inline-block; + text-wrap: balance; } .m-captcha-style { diff --git a/web_src/css/repo.css b/web_src/css/repo.css index af89c0dcff..f7ede5bf92 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -1227,14 +1227,6 @@ td .commit-summary { font-weight: var(--font-weight-normal); } -.empty-placeholder { - display: flex; - flex-direction: column; - align-items: center; - padding-top: 40px; - padding-bottom: 40px; -} - .repository.packages .file-size { white-space: nowrap; } @@ -2040,10 +2032,6 @@ tbody.commit-list { box-shadow: 0 0.5rem 1rem var(--color-shadow) !important; } -.migrate-entry .description { - text-wrap: balance; -} - .commits-table .commits-table-right form { display: flex; align-items: center;