From 6672cf081289068fafa7e2912942ed8de7d8fc18 Mon Sep 17 00:00:00 2001 From: 0ko <0ko@noreply.codeberg.org> Date: Tue, 4 Jun 2024 04:08:54 +0000 Subject: [PATCH] Fix org view on mobile for members (#3949) The row of buttons on the org view is pretty bad on mobile, as it doesn't leave enough space for the org name. My recent PR 3642 made it worse. I added a mitigation to allow buttons to go to an other row, so that the layout is usable on mobile. It is still non-ideal as it will continue going out of bounds on small screens, but is much better. ## Preview [Old preview](/attachments/1e280a77-533c-41b5-954d-b336f1b72186) ![](/attachments/4a2c45e2-7da8-4d87-afb7-7c281e14c756) Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3949 Reviewed-by: Otto Reviewed-by: Beowulf --- templates/org/header.tmpl | 12 +++++++----- web_src/css/org.css | 11 +++++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/templates/org/header.tmpl b/templates/org/header.tmpl index 3da3be8959..1209b29401 100644 --- a/templates/org/header.tmpl +++ b/templates/org/header.tmpl @@ -2,11 +2,13 @@ {{ctx.AvatarUtils.Avatar .Org 100 "org-avatar"}}
- {{.Org.DisplayName}} - - {{if .Org.Visibility.IsLimited}}{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}{{end}} - {{if .Org.Visibility.IsPrivate}}{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}{{end}} - +
+ {{.Org.DisplayName}} + + {{if .Org.Visibility.IsLimited}}{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}{{end}} + {{if .Org.Visibility.IsPrivate}}{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}{{end}} + +
{{if .EnableFeed}} diff --git a/web_src/css/org.css b/web_src/css/org.css index 00d50fce41..e96b2bb83b 100644 --- a/web_src/css/org.css +++ b/web_src/css/org.css @@ -106,6 +106,17 @@ margin-bottom: 0; } +@media (max-width: 767.98px) { + .page-content.organization #org-info .ui.header { + flex-direction: column; + margin-bottom: 1rem; + } + .page-content.organization #org-info .org-title { + width: 100%; + margin-bottom: 0.5rem; + } +} + .page-content.organization #org-info .desc { font-size: 16px; margin-bottom: 10px;