Skip to content

NavBar card v0.5.0

Compare
Choose a tag to compare
@joseluis9595 joseluis9595 released this 24 Mar 17:56
· 11 commits to main since this release
37a2997

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

  • New optional selected config for each route. #27
  • Fixed centering of navbar in desktop devices. #30

Full Changelog: v0.4.0...v0.5.0