aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2024-07-26 15:01:27 +0200
committerFerdinand Thiessen <opensource@fthiessen.de>2024-07-31 11:01:04 +0200
commit26fc01dfc6f54c4f308dee50d33268c20fcb1c69 (patch)
treeb9589eda867e57e0afb12934867a68a08b21b4ff
parent778c11837483767f0791619d18f1efae6b17553d (diff)
downloadnextcloud-server-26fc01dfc6f54c4f308dee50d33268c20fcb1c69.tar.gz
nextcloud-server-26fc01dfc6f54c4f308dee50d33268c20fcb1c69.zip
fix(styles): Make sure footer with legal links is shown correctly
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
-rw-r--r--apps/theming/lib/ThemingDefaults.php2
-rw-r--r--core/css/public.scss57
-rw-r--r--core/templates/layout.public.php2
3 files changed, 42 insertions, 19 deletions
diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php
index 29a4da1959d..bd22f9cb0fd 100644
--- a/apps/theming/lib/ThemingDefaults.php
+++ b/apps/theming/lib/ThemingDefaults.php
@@ -217,7 +217,7 @@ class ThemingDefaults extends \OC_Defaults {
}
}
if ($legalLinks !== '') {
- $footer .= '<br/>' . $legalLinks;
+ $footer .= '<br/><span class="footer__legal-links">' . $legalLinks . '</span>';
}
return $footer;
diff --git a/core/css/public.scss b/core/css/public.scss
index 11f72dc10f0..7001a4ca6da 100644
--- a/core/css/public.scss
+++ b/core/css/public.scss
@@ -1,6 +1,15 @@
-$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 {
@@ -37,9 +46,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 */
@@ -64,27 +75,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%;
}
}
}
diff --git a/core/templates/layout.public.php b/core/templates/layout.public.php
index 29841610983..3335aaf1b01 100644
--- a/core/templates/layout.public.php
+++ b/core/templates/layout.public.php
@@ -113,7 +113,7 @@ if (isset($template) && $template->getActionCount() !== 0) {
<?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>