Skip to content

Commit

Permalink
Merge pull request #47810 from nextcloud/backport/47649/stable30
Browse files Browse the repository at this point in the history
[stable30] fix: Fix inaccessible content on public pages due to overlapping footer
  • Loading branch information
AndyScherzinger authored Sep 10, 2024
2 parents 0fc355b + 1635603 commit 6512e63
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 16 deletions.
4 changes: 4 additions & 0 deletions core/Listener/BeforeTemplateRenderedListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ public function handle(Event $event): void {
Util::addScript('core', 'unsupported-browser-redirect');
}

if ($event->getResponse()->getRenderAs() === TemplateResponse::RENDER_AS_PUBLIC) {
Util::addScript('core', 'public');
}

\OC_Util::addStyle('server', null, true);

if ($event instanceof BeforeLoginTemplateRenderedEvent) {
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.

14 changes: 2 additions & 12 deletions core/css/public.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,9 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#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));
}
--footer-height: calc(2lh + 2 * var(--default-grid-baseline)); // Set the initial value, will be updated programmatically to match the actual height

.header-right {

#header-primary-action a {
color: var(--color-primary-element-text);
}
Expand Down Expand Up @@ -51,6 +41,7 @@

#content {
min-height: var(--body-height, calc(100% - var(--footer-height)));
padding-block-end: var(--footer-height);
}

#app-content-vue {
Expand Down Expand Up @@ -89,7 +80,6 @@
align-items: center;
justify-content: center;

height: var(--footer-height);
width: calc(100% - 2 * var(--body-container-margin));
margin-inline: var(--body-container-margin);
padding-block: var(--default-grid-baseline);
Expand Down
2 changes: 1 addition & 1 deletion core/css/server.css

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

Loading

0 comments on commit 6512e63

Please sign in to comment.