feat(webui): remove menubar Channel item; brand acts as channel selector only on dashboard; hover to open; commit text toned down

This commit is contained in:
Thomas Cravey 2025-08-17 15:48:10 -05:00
parent 71cf7a927f
commit 9e95ccdca4
3 changed files with 7 additions and 7 deletions

View file

@ -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); }

View file

@ -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(()=>{});
}

View file

@ -24,12 +24,6 @@
<div class="commit">{{ .CommitShort }}</div>
<nav>
<ul>
<li class="chan">
<details role="list">
<summary aria-haspopup="listbox">Channel</summary>
<ul id="nav-chans" role="listbox"></ul>
</details>
</li>
<li><a href="/summarizer">Summarizer</a></li>
<li><a href="/logout">Logout</a></li>
</ul>