-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Dynamically adjustment for footer height #34391
Conversation
Checking in; is there anything else I need to do? Also, any feedback and/or advice would be highly welcomed. |
@@ -21,6 +21,9 @@ | |||
*/ | |||
|
|||
window.addEventListener('DOMContentLoaded', function () { | |||
|
|||
//dynamically changes footer size depending on presence of links | |||
if(document.querySelectorAll("a.legal").length > 0) document.getElementById("body-public").querySelector('footer').style = 'height: 95px' |
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.
if(document.querySelectorAll("a.legal").length > 0) document.getElementById("body-public").querySelector('footer').style = 'height: 95px' | |
if (document.querySelectorAll('a.legal').length > 0) { | |
document.getElementById('body-public').querySelector('footer').style = 'height: 95px' | |
} |
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.
But I think @szaimen have another fix somewhere?
I'm not super sure this is the way to go 🤔
Wouldnt it be better to have a class Line 70 in 5ab021c
server/core/templates/layout.public.php Line 94 in 5ab021c
|
+1 for the global css variable approach |
Careful about too much variables, we're defeating the initial goal of them |
Nah, was not thought as global variable (from my side), but just a class overriding the height:
|
Right. However since we have mutliple places where we need to reuse that one, I guess adding one for that is probably the best idea... |
Could you point to where they are calculated and set? |
Uhm, maybe i understood wrong, but aren't these just variables within the scss sheet, but will be compiled to fixed numbers within the finally loaded css? Which is sth. different than global css variables |
indeed. That is why I would push towards a global css variable that could get reused or changed |
Ok 👍 . But then my question was related to give a hint to RyanAveritt on where the variable |
I don't know if we can make a logic from that. Rather changing the varialbe to e.g. 95px if impressum gets activated? |
Yeah, thats what i meant. 😄 Just probably a bit bad formulated. Having a variable, that is either 65px or 95px. (While 95 seems a bit much to me, 80px or even less should suffice iirc. #30586) |
As there is no feedback since a while I will close this ticket. If this is still happening please make sure to upgrade to the latest version. After that, feel free to reopen. |
Footer height is dynamically adjusted to 95px if one of the legal links is set; originally 65px. (first-time contributor)
Fix #34305