Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix(styles): Make sure footer with legal links is shown correctly
Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux committed Jul 26, 2024
commit 39e163a19236713463aa56028e71a04ef1f13052
2 changes: 1 addition & 1 deletion apps/theming/lib/ThemingDefaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public function getShortFooter() {
}
}
if ($legalLinks !== '') {
$footer .= '<br/>' . $legalLinks;
$footer .= '<br/><span class="footer__legal-links">' . $legalLinks . '</span>';
}

return $footer;
Expand Down
57 changes: 40 additions & 17 deletions core/css/public.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
$footer-height: 65px;

#body-public {
--footer-height: calc(var(--default-line-height) + 2 * var(--default-grid-baseline));;

&:has(.footer__legal-links),
&:has(.footer__simple-sign-up) {
--footer-height: calc(2 * var(--default-line-height) + 3 * var(--default-grid-baseline));;
}

&:has(.footer__legal-links):has(.footer__simple-sign-up) {
--footer-height: calc(3 * var(--default-line-height) + 3 * var(--default-grid-baseline));
}

.header-right {

#header-primary-action a {
Expand Down Expand Up @@ -41,9 +50,11 @@ $footer-height: 65px;
}

#content {
// 100% - footer
min-height: calc(100% - #{$footer-height});
min-height: var(--body-height, calc(100% - var(--footer-height)));
}

#app-content-vue {
padding-block-end: var(--footer-height);
}

/** don't apply content header padding on the base layout */
Expand All @@ -68,27 +79,39 @@ $footer-height: 65px;
/* public footer */
footer {
position: fixed;
bottom: var(--body-container-margin);;
background-color: var(--color-main-background);
border-radius: var(--body-container-radius);
box-sizing: border-box;

display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: $footer-height;
flex-direction: column;
bottom: 0;
width: calc(100% - 16px);
margin: 8px;
background-color: var(--color-main-background);
border-radius: var(--border-radius-large);

height: var(--footer-height);
width: calc(100% - 2 * var(--body-container-margin));
margin-inline: var(--body-container-margin);
padding-block: var(--default-grid-baseline);

.footer__legal-links {
margin-block-end: var(--default-grid-baseline);
}

p {
text-align: center;
color: var(--color-text-lighter);
color: var(--color-text-maxcontrast);
margin-block: 0 var(--default-grid-baseline);
width: 100%;

a {
color: var(--color-text-lighter);
display: inline-block;
font-size: var(--default-font-size);
font-weight: bold;
line-height: var(--default-line-height);
height: var(--default-line-height);
color: var(--color-text-maxcontrast);
white-space: nowrap;
/* increasing clickability to more than the text height */
padding: 10px;
margin: -10px;
line-height: 200%;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/templates/layout.public.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@
<?php
if ($_['showSimpleSignUpLink']) {
?>
<p>
<p class="footer__simple-sign-up">
<a href="<?php p($_['signUpLink']); ?>" target="_blank" rel="noreferrer noopener">
<?php p($l->t('Get your own free account')); ?>
</a>
Expand Down