diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-05-01 10:07:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-01 10:07:26 +0300 |
commit | acf9b2fa0d69f022fd3d7c18e698d5886848ab91 (patch) | |
tree | c2aee979201f8c7a66ba24735076d0f6ea0a1e34 /core | |
parent | e8976b8e34e15c864e20aa5c9b54988e84a4e583 (diff) | |
parent | 8436c1c2804cdcd524a3511b47ea8afe635d7920 (diff) |
Merge pull request #20750 from nextcloud/backport/20744/stable18
[stable18] Fix public layout header title & description
Diffstat (limited to 'core')
-rw-r--r-- | core/css/header.scss | 18 | ||||
-rw-r--r-- | core/templates/layout.public.php | 10 |
2 files changed, 24 insertions, 4 deletions
diff --git a/core/css/header.scss b/core/css/header.scss index b352f12e1b6..dce6cf70927 100644 --- a/core/css/header.scss +++ b/core/css/header.scss @@ -64,6 +64,7 @@ box-sizing: border-box; opacity: 1; align-items: center; + display: flex; flex-wrap: wrap; overflow: hidden; @@ -211,9 +212,9 @@ } #header-left, .header-left { - flex: 0 0; - flex-grow: 1; + flex: 1 0; white-space: nowrap; + min-width: 0; } #header-right, .header-right { @@ -269,6 +270,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); @@ -279,6 +281,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 996b78a922b..634725456b8 100644 --- a/core/templates/layout.public.php +++ b/core/templates/layout.public.php @@ -39,11 +39,17 @@ <span id="nextcloud"> <div class="logo logo-icon svg"></div> <h1 class="header-appname"> - <?php if (isset($template)) { p($template->getHeaderTitle()); } else { p($theme->getName());} ?> + <?php if (isset($template) && $template->getHeaderTitle() !== '') { + p($template->getHeaderTitle()); + } else { + p($theme->getName()); + } ?> </h1> + <?php if (isset($template) && $template->getHeaderDetails() !== '') { ?> <div class="header-shared-by"> - <?php if (isset($template)) { p($template->getHeaderDetails()); } ?> + <?php p($template->getHeaderDetails()); ?> </div> + <?php } ?> </span> </div> |