From 9a65d202823aea28416e1d97221849e34afed067 Mon Sep 17 00:00:00 2001 From: =?utf8?q?John=20Molakvo=C3=A6=20=28skjnldsv=29?= Date: Thu, 30 Apr 2020 13:31:20 +0200 Subject: [PATCH] Fix public layout header title & description MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ (skjnldsv) --- apps/files_sharing/css/public.scss | 16 ---------------- core/css/header.scss | 18 ++++++++++++++++-- core/templates/layout.public.php | 10 ++++++++-- 3 files changed, 24 insertions(+), 20 deletions(-) diff --git a/apps/files_sharing/css/public.scss b/apps/files_sharing/css/public.scss index 83cba309da7..c63e8cc80cd 100644 --- a/apps/files_sharing/css/public.scss +++ b/apps/files_sharing/css/public.scss @@ -162,22 +162,6 @@ thead { text-align: left; } -/* Needed to ellipsize long header text on share page */ -#body-login #header-left, -#body-login .header-left { - overflow: hidden; -} - -#header .header-shared-by { - color: var(--color-primary-text); - position: relative; - font-weight: 300; - font-size: 11px; - line-height: 11px; - overflow: hidden; - text-overflow: ellipsis; -} - #note-content { padding: 5px; display:inline-block; diff --git a/core/css/header.scss b/core/css/header.scss index c1e89b5cc8e..e5a0f053bc6 100644 --- a/core/css/header.scss +++ b/core/css/header.scss @@ -64,6 +64,7 @@ opacity: 1; display: flex; align-items: center; + display: flex; flex-wrap: wrap; overflow: hidden; @@ -199,9 +200,9 @@ } #header-left, .header-left { - flex: 0 0; - flex-grow: 1; + flex: 1 0; white-space: nowrap; + min-width: 0; } #header-right, .header-right { @@ -257,6 +258,7 @@ } } +/* TODO: move into minimal css file for public shared template */ /* only used for public share pages now as we have the app icons when logged in */ .header-appname { color: var(--color-primary-text); @@ -267,6 +269,18 @@ padding-right: 5px; overflow: hidden; text-overflow: ellipsis; + // Take full width to push the header-shared-by bellow (if any) + flex: 1 1 100%; +} + +.header-shared-by { + color: var(--color-primary-text); + position: relative; + font-weight: 300; + font-size: 11px; + line-height: 11px; + overflow: hidden; + text-overflow: ellipsis; } /* do not show menu toggle on public share links as there is no menu */ diff --git a/core/templates/layout.public.php b/core/templates/layout.public.php index 36a5f1e5383..1d7a02a81f0 100644 --- a/core/templates/layout.public.php +++ b/core/templates/layout.public.php @@ -39,11 +39,17 @@

- getHeaderTitle()); } else { p($theme->getName());} ?> + getHeaderTitle() !== '') { + p($template->getHeaderTitle()); + } else { + p($theme->getName()); + } ?>

+ getHeaderDetails() !== '') { ?>
- getHeaderDetails()); } ?> + getHeaderDetails()); ?>
+
-- 2.39.5