Skip to content

Commit 0d96eb2

Browse files
committed
Attr bar: fixed 8rem height with scroll
1 parent b21f8ab commit 0d96eb2

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

  • packages/ZibStack.NET.UI/sample/SampleApi/wwwroot

‎packages/ZibStack.NET.UI/sample/SampleApi/wwwroot/index.html‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
.main { display: flex; flex: 1; overflow: hidden; }
2323
.editor-pane { width: 42%; min-width: 300px; border-right: 1px solid var(--border); display: flex; flex-direction: column; flex-shrink: 0; }
24-
.attr-bar { padding: .4rem .5rem; border-top: 1px solid var(--border); flex-shrink: 0; display: flex; flex-wrap: wrap; gap: .25rem .3rem; align-items: center; max-height: 14rem; overflow-y: auto; }
24+
.attr-bar { padding: .5rem; border-top: 1px solid var(--border); flex-shrink: 0; display: grid; grid-template-columns: 1fr; gap: .3rem; height: 8rem; overflow-y: auto; }
2525
.attr-bar .attr-group { display: inline-flex; gap: .2rem; align-items: center; }
2626
.attr-bar .attr-label { font-size: .6rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-right: .1rem; }
2727
.attr-tag { font-size: .65rem; padding: .1rem .35rem; border-radius: .15rem; cursor: pointer; border: 1px solid transparent; white-space: nowrap; }
@@ -457,9 +457,10 @@ <h1><em>ZibStack.NET</em> Playground</h1>
457457
const bar=$('#attr-bar'); const groups = {};
458458
allAttributes.forEach(a => { (groups[a.package]||(groups[a.package]=[])).push(a); });
459459
bar.innerHTML = Object.entries(groups).map(([pkg,attrs]) =>
460-
`<span class="attr-label">${pkg}</span>` +
461-
attrs.map(a => `<span class="attr-tag ${pkg.toLowerCase()}" data-attr="${a.name}">[${a.name}]</span>`).join('')
462-
).join('<span style="margin:0 .3rem;color:var(--border)">|</span>');
460+
`<div style="display:flex;flex-wrap:wrap;gap:.2rem;align-items:center"><span class="attr-label">${pkg}</span>` +
461+
attrs.map(a => `<span class="attr-tag ${pkg.toLowerCase()}" data-attr="${a.name}">[${a.name}]</span>`).join('') +
462+
`</div>`
463+
).join('');
463464
} catch(e) { $('#attr-bar').textContent = 'Failed to load attributes'; }
464465
}
465466

0 commit comments

Comments
 (0)