diff --git a/internal/httpapi/static/app.css b/internal/httpapi/static/app.css index bd77861..21b1084 100644 --- a/internal/httpapi/static/app.css +++ b/internal/httpapi/static/app.css @@ -1,7 +1,7 @@ html, body { height: 100%; } body { padding: 0; min-height: 100vh; } header.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; padding: .6rem 1rem; border-bottom: 1px solid var(--muted-border-color); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; background-color: var(--pico-background-color, #fff); } -header.nav .brand { justify-self: start; } +header.nav .brand { justify-self: start; cursor: pointer; } header.nav .commit { justify-self: center; font-size: .7rem; opacity: .55; } header.nav nav { justify-self: end; } main, article, .dash { margin-top: var(--headerH, 56px); margin-bottom: var(--footerH, 44px); } diff --git a/internal/httpapi/static/app.js b/internal/httpapi/static/app.js index 9effeae..c530594 100644 --- a/internal/httpapi/static/app.js +++ b/internal/httpapi/static/app.js @@ -76,6 +76,12 @@ window.addEventListener('DOMContentLoaded', ()=>{ if('scrollRestoration' in history){ history.scrollRestoration = 'manual'; } measureBars(); loadChannels(); + // Open brand dropdown on hover (desktop) for the dashboard + const brandDetails = document.getElementById('brand-chans'); + if(brandDetails){ + brandDetails.addEventListener('mouseenter', ()=>{ brandDetails.setAttribute('open',''); }); + brandDetails.addEventListener('mouseleave', ()=>{ brandDetails.removeAttribute('open'); }); + } if(document.getElementById('channel')){ fetch('/api/channels').then(r=>r.json()).then(arr=>{ const sel=document.getElementById('channel'); arr.forEach(c=>{ const o=document.createElement('option'); o.value=c; o.textContent=c; sel.appendChild(o); }); }).catch(()=>{}); } diff --git a/internal/httpapi/templates/layout.tmpl b/internal/httpapi/templates/layout.tmpl index 7ee92e1..70717b5 100644 --- a/internal/httpapi/templates/layout.tmpl +++ b/internal/httpapi/templates/layout.tmpl @@ -24,12 +24,6 @@