diff --git a/side-nav.js b/side-nav.js
index ac49d79..7ccfadf 100644
--- a/side-nav.js
+++ b/side-nav.js
@@ -16,19 +16,17 @@ const CHEVRON_ICON = `
`
-const ICONS = {
- dashboard: ``,
- vpc: ``,
- subnet: ``,
- vm: ``,
-}
+const CSS = new URL('./side-nav.css', import.meta.url).href
+const MQ = window.matchMedia('(max-width: 768px)')
+const NAV_W = 220 // px
-const CSS = new URL('./side-nav.css', import.meta.url).href
-const MQ = window.matchMedia('(max-width: 768px)')
-const NAV_W = 220 // px
+const ICON_FALLBACK = ``
+
+const iconsRes = await fetch('./icons.json')
+const ICONS = iconsRes.ok ? await iconsRes.json() : {}
function resolveIcon(name) {
- return ICONS[name] ?? ``
+ return ICONS[name] ?? ICON_FALLBACK
}
class SideNav extends HTMLElement {