-
Notifications
You must be signed in to change notification settings - Fork 45
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
Hide footer in public share page #99
Conversation
The footer in the public share page is hidden by adding the "hidden" CSS class to the footer. However, the CSS rules for the footer defined in the server are more specific than the general rule for ".hidden" elements, which caused the footer to be shown even if marked as ".hidden". Now a more specific rule was added to override the ones from the server and ensure that the footer is hidden. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
@@ -6,6 +6,10 @@ | |||
display: block; | |||
} | |||
|
|||
#body-public footer.hidden { | |||
display: none; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have tested it again removing and adding the fix and for me it works as expected (footer visible without the fix, footer hidden with the fix).
Note that in your screenshot all the rules come from the server (the display: none
is the generic one from the server, not the one from #body-public footer.hidden
in style.css). Maybe a cache issue?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe also from gallery app or so?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works now 👍
Backport in #103 |
The footer in the public share page is hidden by adding the
hidden
CSS class to the footer. However, the CSS rules for the footer defined in the server are more specific than the general rule for.hidden
elements, which caused the footer to be shown even if marked as.hidden
. Now a more specific rule was added to override the ones from the server and ensure that the footer is hidden.Note that this problem occurs in all browsers; it is not related to IE 11.
Also note that, as the PDF viewer can not be closed in the public share page and thus the footer is never shown, the proper way to fix this would be to change the TemplateResponse in the DisplayController to a PublicTemplateResponse which makes possible to completely remove the footer from the rendered template, and then adjust the JavaScript code as needed.
Despite that I opted for the other approach for easier backport to
stable14
, as this issue appeared in NC 14.0.0 Beta 4 (when the CSS rules for the footer were added in the server).