Cleaned up sidebar
This commit is contained in:
parent
96288ae632
commit
e2f7d247b0
@ -1,37 +1,35 @@
|
|||||||
component Sidebar(user *arn.User)
|
component Sidebar(user *arn.User)
|
||||||
aside#sidebar
|
aside#sidebar
|
||||||
|
//- User avatar
|
||||||
.user-image-container
|
.user-image-container
|
||||||
if user != nil
|
if user != nil
|
||||||
Avatar(user)
|
Avatar(user)
|
||||||
else
|
else
|
||||||
img.user-image.lazy(src=utils.EmptyImage(), data-src="/images/brand/64.png", data-webp="true", alt="Anime Notifier")
|
img.user-image.lazy(src=utils.EmptyImage(), data-src="/images/brand/64.png", data-webp="true", alt="Anime Notifier")
|
||||||
|
|
||||||
|
//- Sidebar buttons
|
||||||
if user != nil
|
if user != nil
|
||||||
SidebarButton("Home", "/animelist/watching", "home")
|
SidebarButton("Home", "/animelist/watching", "home")
|
||||||
//- SidebarButton("Dash", "/dashboard", "tachometer")
|
|
||||||
else
|
else
|
||||||
SidebarButton("Home", "/", "home")
|
SidebarButton("Home", "/", "home")
|
||||||
|
|
||||||
SidebarButton("Forum", "/forum", "comment")
|
SidebarButton("Forum", "/forum", "comment")
|
||||||
SidebarButton("Explore", "/explore", "th")
|
SidebarButton("Explore", "/explore", "th")
|
||||||
//- SidebarButton("Artworks", "/artworks", "paint-brush")
|
|
||||||
SidebarButton("Soundtracks", "/soundtracks", "headphones")
|
SidebarButton("Soundtracks", "/soundtracks", "headphones")
|
||||||
//- SidebarButton("AMVs", "/amvs", "video-camera")
|
|
||||||
//- SidebarButton("Games", "/games", "gamepad")
|
|
||||||
SidebarButton("Users", "/users", "globe")
|
SidebarButton("Users", "/users", "globe")
|
||||||
//- SidebarButton("Search", "/search", "search")
|
|
||||||
|
|
||||||
if user != nil
|
if user != nil
|
||||||
//- if user.Role == "admin"
|
|
||||||
//- SidebarButton("Groups", "/groups", "users")
|
|
||||||
|
|
||||||
SidebarButton("Shop", "/shop", "shopping-cart")
|
SidebarButton("Shop", "/shop", "shopping-cart")
|
||||||
|
|
||||||
//- if user.Role == "admin" || user.Role == "editor"
|
|
||||||
//- SidebarButton("Statistics", "/statistics", "pie-chart")
|
|
||||||
|
|
||||||
SidebarButton("Settings", "/settings", "cog")
|
SidebarButton("Settings", "/settings", "cog")
|
||||||
|
|
||||||
|
//- Disabled:
|
||||||
|
//- SidebarButton("Dash", "/dashboard", "tachometer")
|
||||||
|
//- SidebarButton("Artworks", "/artworks", "paint-brush")
|
||||||
|
//- SidebarButton("AMVs", "/amvs", "video-camera")
|
||||||
|
//- SidebarButton("Games", "/games", "gamepad")
|
||||||
|
//- SidebarButton("Groups", "/groups", "users")
|
||||||
|
//- SidebarButton("Statistics", "/statistics", "pie-chart")
|
||||||
|
|
||||||
.spacer
|
.spacer
|
||||||
|
|
||||||
.sidebar-link(aria-label="Search")
|
.sidebar-link(aria-label="Search")
|
||||||
@ -42,7 +40,7 @@ component Sidebar(user *arn.User)
|
|||||||
if user != nil
|
if user != nil
|
||||||
if user.Role == "admin"
|
if user.Role == "admin"
|
||||||
SidebarButton("Admin", "/admin", "wrench")
|
SidebarButton("Admin", "/admin", "wrench")
|
||||||
|
|
||||||
if user.Role == "editor"
|
if user.Role == "editor"
|
||||||
SidebarButton("Editor", "/editor", "pencil")
|
SidebarButton("Editor", "/editor", "pencil")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user