Improved theme switching
This commit is contained in:
@ -30,12 +30,11 @@ component Sidebar(user *arn.User)
|
||||
//- SidebarButton("Groups", "/groups", "users")
|
||||
//- SidebarButton("Statistics", "/statistics", "pie-chart")
|
||||
|
||||
.buttons
|
||||
button.action(data-action="lightTheme", data-trigger="click") Light
|
||||
button.action(data-action="darkTheme", data-trigger="click") Dark
|
||||
|
||||
.spacer
|
||||
|
||||
//- .theme-switcher
|
||||
//- button.theme-switcher-button.action(data-action="toggleTheme", data-trigger="click") Switch theme
|
||||
|
||||
.sidebar-link(aria-label="Search")
|
||||
.sidebar-button
|
||||
Icon("search")
|
||||
@ -48,6 +47,11 @@ component Sidebar(user *arn.User)
|
||||
if user.Role == "editor"
|
||||
SidebarButton("Editor", "/editor", "pencil")
|
||||
|
||||
a.sidebar-link.action(href="#", data-action="toggleTheme", data-trigger="click")
|
||||
.sidebar-button
|
||||
Icon("paint-brush")
|
||||
span.sidebar-text Theme
|
||||
|
||||
SidebarButton("Help", "/thread/I3MMiOtzR", "question-circle")
|
||||
|
||||
if user != nil
|
||||
|
@ -47,6 +47,9 @@ sidebar-spacing-y = 0.7rem
|
||||
.sidebar-link
|
||||
color text-color
|
||||
|
||||
:hover
|
||||
cursor pointer
|
||||
|
||||
&.active
|
||||
.sidebar-button
|
||||
color tab-active-color
|
||||
@ -62,4 +65,4 @@ sidebar-spacing-y = 0.7rem
|
||||
|
||||
.icon
|
||||
font-size 1rem
|
||||
margin-right 0.75rem
|
||||
margin-right 0.75rem
|
||||
|
Reference in New Issue
Block a user