NavBar card v0.5.0
New selected
option for each route
With this new release, I've introduced an optional new configuration item for each route. You can now choose whether or not to show one route as selected via JS templates.
This new option plays nicely with anchor-card, as mentioned in #27
type: custom:navbar-card
...
routes:
...
- icon: mdi:home-outline
icon_selected: mdi:home-assistant
url: /lovelace/home?anchor=map
label: Home
selected: |
[[[
const matchesPath = window.location.pathname == "/lovelace/home";
const hasAnchor = window.location.search.includes("anchor=map");
return matchesPath && hasAnchor;
]]]
All changes in this release
Full Changelog: v0.4.0...v0.5.0