Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable28] fix(styles): Make sure footer with legal links is shown correctly #46808

Merged
merged 3 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion apps/theming/lib/ThemingDefaults.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public function getShortFooter() {
}
}
if ($legalLinks !== '') {
$footer .= '<br/>' . $legalLinks;
$footer .= '<br/><span class="footer__legal-links">' . $legalLinks . '</span>';
}

return $footer;
Expand Down
6 changes: 3 additions & 3 deletions apps/theming/tests/ThemingDefaultsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ public function testGetShortFooterImprint() {
->method('t')
->willReturnArgument(0);

$this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener" class="entity-name">Name</a> – Slogan<br/><a href="https://example.com/imprint" class="legal" target="_blank" rel="noreferrer noopener">Legal notice</a>', $this->template->getShortFooter());
$this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener" class="entity-name">Name</a> – Slogan<br/><span class="footer__legal-links"><a href="https://example.com/imprint" class="legal" target="_blank" rel="noreferrer noopener">Legal notice</a></span>', $this->template->getShortFooter());
}

public function testGetShortFooterPrivacy() {
Expand All @@ -351,7 +351,7 @@ public function testGetShortFooterPrivacy() {
->method('t')
->willReturnArgument(0);

$this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener" class="entity-name">Name</a> – Slogan<br/><a href="https://example.com/privacy" class="legal" target="_blank" rel="noreferrer noopener">Privacy policy</a>', $this->template->getShortFooter());
$this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener" class="entity-name">Name</a> – Slogan<br/><span class="footer__legal-links"><a href="https://example.com/privacy" class="legal" target="_blank" rel="noreferrer noopener">Privacy policy</a></span>', $this->template->getShortFooter());
}

public function testGetShortFooterAllLegalLinks() {
Expand All @@ -372,7 +372,7 @@ public function testGetShortFooterAllLegalLinks() {
->method('t')
->willReturnArgument(0);

$this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener" class="entity-name">Name</a> – Slogan<br/><a href="https://example.com/imprint" class="legal" target="_blank" rel="noreferrer noopener">Legal notice</a> · <a href="https://example.com/privacy" class="legal" target="_blank" rel="noreferrer noopener">Privacy policy</a>', $this->template->getShortFooter());
$this->assertEquals('<a href="url" target="_blank" rel="noreferrer noopener" class="entity-name">Name</a> – Slogan<br/><span class="footer__legal-links"><a href="https://example.com/imprint" class="legal" target="_blank" rel="noreferrer noopener">Legal notice</a> · <a href="https://example.com/privacy" class="legal" target="_blank" rel="noreferrer noopener">Privacy policy</a></span>', $this->template->getShortFooter());
}

public function invalidLegalUrlProvider() {
Expand Down
2 changes: 1 addition & 1 deletion core/css/public.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/css/public.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

57 changes: 40 additions & 17 deletions core/css/public.scss
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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 */
Expand All @@ -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%;
}
}
}
Expand Down
Loading
Loading