wordcamp.org icon indicating copy to clipboard operation
wordcamp.org copied to clipboard

Mu-plugins: Add margin to fixed navigation on sites with the latest event banner

Open 2ndkauboy opened this issue 2 years ago • 1 comments

The solution to the linked issue is not really easy, since different WordCamp themes use very different markup and CSS to make the navigation fixed. There is also no way to change the reference point for a fixed positioned element.

This PR will introduce some JavaScript that searches for any <nav> item with position: fixed and adds a CSS class, that is than used in the existing CSS selector pushing down the navigation as well.

Fixes #1098

Screenshots

This is how the pages look like with this PR applied (compared to #1098):

image

image

2ndkauboy avatar Oct 19 '23 14:10 2ndkauboy

It might be better to assume that some sites have a fixed top nav, and just place this banner somewhere below that - I do wonder about the effectiveness of such an element though, and perhaps we'd be best with something more obvious?

pkevan avatar Feb 08 '24 15:02 pkevan