From 32ac5e7af81eee5a53e24568d779f5fb6e30583d Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Sat, 23 Sep 2023 14:21:49 +0200 Subject: [PATCH] fix(theming): Make sure the footer is hidden if not content is rendered Previously the footer was empty, but the backdrop was still shown. This hides the footer if no text content was defined. Signed-off-by: Ferdinand Thiessen --- apps/theming/lib/ThemingDefaults.php | 15 ++++++++++----- core/css/guest.scss | 3 +-- core/templates/layout.guest.php | 9 +++++++-- core/templates/layout.public.php | 2 +- themes/example/defaults.php | 12 ++++++++++-- 5 files changed, 29 insertions(+), 12 deletions(-) diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php index 7f74539ed5d01..1e55a1fb2f907 100644 --- a/apps/theming/lib/ThemingDefaults.php +++ b/apps/theming/lib/ThemingDefaults.php @@ -172,11 +172,16 @@ public function getDocBaseUrl() { public function getShortFooter() { $slogan = $this->getSlogan(); $baseUrl = $this->getBaseUrl(); - if ($baseUrl !== '') { - $footer = '' . $this->getEntity() . ''; - } else { - $footer = '' .$this->getEntity() . ''; + $entity = $this->getEntity(); + $footer = ''; + + if ($entity !== '') { + if ($baseUrl !== '') { + $footer = '' . $entity . ''; + } else { + $footer = '' .$entity . ''; + } } $footer .= ($slogan !== '' ? ' – ' . $slogan : ''); diff --git a/core/css/guest.scss b/core/css/guest.scss index f834149fd351b..be352135de4e8 100644 --- a/core/css/guest.scss +++ b/core/css/guest.scss @@ -107,7 +107,7 @@ body { .wrapper { width: 100%; max-width: 700px; - margin-top: 10vh; + margin-block: 10vh auto; } /* Default FORM */ @@ -736,7 +736,6 @@ img.icon-loading-small-dark, object.icon-loading-small-dark, video.icon-loading- /* FOOTER */ footer { - margin-top: auto; .info .entity-name { font-weight: bold; } diff --git a/core/templates/layout.guest.php b/core/templates/layout.guest.php index 41f519574a147..450f8caf67642 100644 --- a/core/templates/layout.guest.php +++ b/core/templates/layout.guest.php @@ -47,9 +47,14 @@ -