Fix public layout header title & description

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2020-04-30 13:31:20 +02:00 committed by backportbot[bot]
parent 4e334dd42c
commit 9a65d20282
3 changed files with 24 additions and 20 deletions

View File

@ -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;

View File

@ -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 */

View File

@ -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>