Improved theme switching

This commit is contained in:
2017-11-16 15:15:35 +01:00
parent a83a4fd208
commit eb822e6418
4 changed files with 32 additions and 11 deletions

View File

@ -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