I don’t know how to use generate_sticky_navigation_logo_output
. I can’t find such at available filters collection.
I’ve figured out other solution:
Hook generate_inside_navigation
, priority less than 10
.
My code:
<div class="navigation-branding">
<div class="sticky-navigation-logo">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 40 40" width="40" height="40" class="is-logo-image" alt="my logo">
<use href="#svg-logo" id="sticky-nav-logo"/>
</svg>
</div>
</div>
Of course, I use another hook with SVG defs for #svg-logo
reference.
There’s need to hide duplicated logo when nav is not stuck:
.stuckElement:not(.is_stuck) .navigation-branding {
display: none;
}
How do you think about it?