aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/theming/lib/ThemingDefaults.php15
-rw-r--r--core/css/guest.scss3
-rw-r--r--core/templates/layout.guest.php9
-rw-r--r--core/templates/layout.public.php2
-rw-r--r--themes/example/defaults.php12
5 files changed, 29 insertions, 12 deletions
diff --git a/apps/theming/lib/ThemingDefaults.php b/apps/theming/lib/ThemingDefaults.php
index 7f74539ed5d..1e55a1fb2f9 100644
--- a/apps/theming/lib/ThemingDefaults.php
+++ b/apps/theming/lib/ThemingDefaults.php
@@ -172,11 +172,16 @@ class ThemingDefaults extends \OC_Defaults {
public function getShortFooter() {
$slogan = $this->getSlogan();
$baseUrl = $this->getBaseUrl();
- if ($baseUrl !== '') {
- $footer = '<a href="' . $baseUrl . '" target="_blank"' .
- ' rel="noreferrer noopener" class="entity-name">' . $this->getEntity() . '</a>';
- } else {
- $footer = '<span class="entity-name">' .$this->getEntity() . '</span>';
+ $entity = $this->getEntity();
+ $footer = '';
+
+ if ($entity !== '') {
+ if ($baseUrl !== '') {
+ $footer = '<a href="' . $baseUrl . '" target="_blank"' .
+ ' rel="noreferrer noopener" class="entity-name">' . $entity . '</a>';
+ } else {
+ $footer = '<span class="entity-name">' .$entity . '</span>';
+ }
}
$footer .= ($slogan !== '' ? ' – ' . $slogan : '');
diff --git a/core/css/guest.scss b/core/css/guest.scss
index f834149fd35..be352135de4 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 41f519574a1..450f8caf676 100644
--- a/core/templates/layout.guest.php
+++ b/core/templates/layout.guest.php
@@ -47,9 +47,14 @@ p($theme->getTitle());
</main>
</div>
</div>
- <footer class="guest-box">
+ <?php
+ $longFooter = $theme->getLongFooter();
+ ?>
+ <footer class="guest-box <?php if ($longFooter === '') {
+ p('hidden');
+ } ?>">
<p class="info">
- <?php print_unescaped($theme->getLongFooter()); ?>
+ <?php print_unescaped($longFooter); ?>
</p>
</footer>
</body>
diff --git a/core/templates/layout.public.php b/core/templates/layout.public.php
index eef140a1cd5..8ebbef828b4 100644
--- a/core/templates/layout.public.php
+++ b/core/templates/layout.public.php
@@ -103,7 +103,7 @@ if (isset($template) && $template->getActionCount() !== 0) {
</h1>
<?php print_unescaped($_['content']); ?>
</main>
- <?php if (isset($template) && $template->getFooterVisible()) { ?>
+ <?php if (isset($template) && $template->getFooterVisible() && ($theme->getLongFooter() !== '' || $_['showSimpleSignUpLink'])) { ?>
<footer>
<p><?php print_unescaped($theme->getLongFooter()); ?></p>
<?php
diff --git a/themes/example/defaults.php b/themes/example/defaults.php
index a1c749c46c9..7ed7a2766e4 100644
--- a/themes/example/defaults.php
+++ b/themes/example/defaults.php
@@ -81,8 +81,16 @@ class OC_Theme {
* @return string short footer
*/
public function getShortFooter(): string {
- $footer = '© ' . date('Y') . ' <a href="' . $this->getBaseUrl() . '" target="_blank">' . $this->getEntity() . '</a>' .
- '<br/>' . $this->getSlogan();
+ $entity = $this->getEntity();
+
+ $footer = '© ' . date('Y');
+
+ // Add link if entity name is not empty
+ if ($entity !== '') {
+ $footer .= ' <a href="' . $this->getBaseUrl() . '" target="_blank">' . $entity . '</a>' . '<br/>';
+ }
+
+ $footer .= $this->getSlogan();
return $footer;
}