Eliminate post sub-admin rows, highlight active nav on admin row
Remove the separate sub-admin header rows (data, entries, edit, settings) that caused duplicate/stale rows on HTMX navigation and font styling breaks. Instead, pass selected= to the admin row to highlight the active nav item via aria-selected styling. External nav items (calendars, markets, payments) also gain is-selected and select-colours support. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -10,8 +10,12 @@
|
||||
(defcomp ~blog-admin-label ()
|
||||
(<> (i :class "fa fa-shield-halved" :aria-hidden "true") " admin"))
|
||||
|
||||
(defcomp ~blog-admin-nav-item (&key href nav-btn-class label)
|
||||
(div :class "relative nav-group" (a :href href :class nav-btn-class label)))
|
||||
(defcomp ~blog-admin-nav-item (&key href nav-btn-class label is-selected select-colours)
|
||||
(div :class "relative nav-group"
|
||||
(a :href href
|
||||
:aria-selected (when is-selected "true")
|
||||
:class (str (or nav-btn-class "justify-center cursor-pointer flex flex-row items-center gap-2 rounded bg-stone-200 text-black p-3") " " (or select-colours ""))
|
||||
label)))
|
||||
|
||||
(defcomp ~blog-sub-settings-label (&key icon label)
|
||||
(<> (i :class icon :aria-hidden "true") " " label))
|
||||
|
||||
Reference in New Issue
Block a user