My last Navbar component got some traffic, but IMHO it’s outdated, and it requires Flask to use it.
The previous version is found here
I decided to make a flaskless version, it does not require you to install anything, it looks like this:
It does lack the SPA feeling that the Flask version has, but it does not require external support, nor does it take an extra port.
The git repo can be found here, with an example: