From f39256f035a561fbd10955ac40ef5ad4b794f47d Mon Sep 17 00:00:00 2001 From: yp05327 <576951401@qq.com> Date: Wed, 25 Oct 2023 19:40:39 +0900 Subject: [PATCH] Add word-break to organization name and description (#26624) Fix #24318 Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/38282e5e-0b4d-4568-a853-59352798e826) ![image](https://github.com/go-gitea/gitea/assets/18380374/79d89ee6-61f6-45a7-af0b-d1c23fead25a) ![image](https://github.com/go-gitea/gitea/assets/18380374/39b45fae-52e2-4697-b83a-7cd10f76ac43) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/09e8cfcf-0150-494e-9f63-0868f529da65) ![image](https://github.com/go-gitea/gitea/assets/18380374/d2c348d3-fe03-466a-a5f4-878b7a93a318) ![image](https://github.com/go-gitea/gitea/assets/18380374/7f75b807-300c-42d5-b2c3-bae9e45e3c08) ![image](https://github.com/go-gitea/gitea/assets/18380374/06eca901-f5cf-4100-bb65-92457ad106e3) --- templates/org/header.tmpl | 2 +- templates/org/home.tmpl | 2 +- templates/shared/user/org_profile_avatar.tmpl | 2 +- web_src/css/base.css | 1 + web_src/css/org.css | 1 + web_src/css/repo.css | 1 + 6 files changed, 6 insertions(+), 3 deletions(-) diff --git a/templates/org/header.tmpl b/templates/org/header.tmpl index 72adf6d9b5..7b912c1c56 100644 --- a/templates/org/header.tmpl +++ b/templates/org/header.tmpl @@ -2,7 +2,7 @@
-
+
{{ctx.AvatarUtils.Avatar . 100}} {{.DisplayName}} diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl index ff4f3a8b1a..ee3237d45b 100644 --- a/templates/org/home.tmpl +++ b/templates/org/home.tmpl @@ -3,7 +3,7 @@
{{ctx.AvatarUtils.Avatar .Org 140 "org-avatar"}}
-
+
{{.Org.DisplayName}} {{if .Org.Visibility.IsLimited}}{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}{{end}} diff --git a/templates/shared/user/org_profile_avatar.tmpl b/templates/shared/user/org_profile_avatar.tmpl index b9ade23d05..a8846b0abd 100644 --- a/templates/shared/user/org_profile_avatar.tmpl +++ b/templates/shared/user/org_profile_avatar.tmpl @@ -2,7 +2,7 @@
-
+
{{ctx.AvatarUtils.Avatar . 100}} {{.DisplayName}} diff --git a/web_src/css/base.css b/web_src/css/base.css index 0cfd311158..ae8eb05709 100644 --- a/web_src/css/base.css +++ b/web_src/css/base.css @@ -1411,6 +1411,7 @@ img.ui.avatar, .ui.label { padding: 0.3em 0.5em; transition: none; + white-space: nowrap; } .ui.label, diff --git a/web_src/css/org.css b/web_src/css/org.css index 061d30bef2..d2bf0ff606 100644 --- a/web_src/css/org.css +++ b/web_src/css/org.css @@ -102,6 +102,7 @@ .organization.profile #org-info { overflow-wrap: anywhere; flex: 1; + word-break: break-all; } .organization.profile #org-info .ui.header { diff --git a/web_src/css/repo.css b/web_src/css/repo.css index 7d76dd8b3f..5b532aa495 100644 --- a/web_src/css/repo.css +++ b/web_src/css/repo.css @@ -2606,6 +2606,7 @@ tbody.commit-list { justify-content: space-between; flex-wrap: wrap; word-break: break-word; + gap: 0.5rem; } @media (max-width: 767.98px) {