]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix public layout header title & description 20751/head
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Thu, 30 Apr 2020 11:31:20 +0000 (13:31 +0200)
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Thu, 30 Apr 2020 17:22:46 +0000 (19:22 +0200)
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
apps/files_sharing/css/public.scss
core/css/header.scss
core/templates/layout.public.php

index a8207167c2c7d681afb24082fc76f2f3c2504171..fb50dd2f25331aa0c612021400bda20f2648da13 100644 (file)
@@ -168,22 +168,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;
index 2b63dc978ace6e414636f65a0cd77367e207e1bf..ace4f898bcedad51112aa961bc1a9df51626f140 100644 (file)
@@ -63,6 +63,7 @@
        box-sizing: border-box;
        opacity: 1;
        align-items: center;
+       display: flex;
        flex-wrap: wrap;
        overflow: hidden;
 
        }
 
        #header-left, .header-left {
-               flex: 0 0;
-               flex-grow: 1;
+               flex: 1 0;
                white-space: nowrap;
+               min-width: 0;
        }
 
        #header-right, .header-right {
        }
 }
 
+/* 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);
        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 */
index bbfa264d17172e0d52998f366da38596d60c2a48..f041be7f26da2404a55ca113afa1cb8b72a28cb2 100644 (file)
                        <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>