We’re having trouble with a custom Discourse instance running inside a Django revproxy application (https://dev.edemocracia.labhackercd.net/expressao/).
In this application we have a global topbar that is always sticked to the top of the page with a non sticked wrapper that has a height of 24px set (in order to “push” the site content).
When we scroll this page, the ‘#main’ top offset is then initially different from 0 now, so only after scrolling 24px it will stick by appling the ‘.docked’ class to the body. But since our global topbar is fixed, we’d like to apply the ‘.docked’ class and stick the Discourse header when the ‘#main’ offset is 24px instead of 0, in order to not overlay our bar on top of the header.
How should I approach this issue? Can I customize some of Discourse’s JS? Maybe just inject new JS code to override the default behaviour?