42 lines
1.3 KiB
Plaintext
Raw Normal View History

2017-07-20 00:54:53 +00:00
component Sidebar(user *arn.User)
.user-image-container
if user != nil
Avatar(user)
else
2017-10-03 02:59:39 +00:00
img.user-image.lazy(src=utils.EmptyImage(), data-src="/images/brand/64.png", data-webp="true", alt="Anime Notifier")
2017-07-20 00:54:53 +00:00
2017-09-22 18:10:37 +00:00
if user != nil
SidebarButton("Home", "/animelist/watching", "home")
else
SidebarButton("Home", "/", "home")
2017-07-20 00:54:53 +00:00
SidebarButton("Forum", "/forum", "comment")
SidebarButton("Explore", "/explore", "th")
2017-07-22 13:04:54 +00:00
SidebarButton("Artworks", "/artworks", "paint-brush")
2017-07-20 00:54:53 +00:00
SidebarButton("Soundtracks", "/soundtracks", "headphones")
2017-07-22 13:04:54 +00:00
SidebarButton("AMVs", "/amvs", "video-camera")
2017-09-22 21:36:43 +00:00
//- SidebarButton("Games", "/games", "gamepad")
2017-07-20 00:54:53 +00:00
SidebarButton("Users", "/users", "globe")
2017-09-22 21:36:43 +00:00
//- SidebarButton("Search", "/search", "search")
2017-07-20 00:54:53 +00:00
if user != nil
2017-10-03 13:26:29 +00:00
SidebarButton("Shop", "/shop", "shopping-cart")
2017-09-22 21:36:43 +00:00
SidebarButton("Statistics", "/statistics", "pie-chart")
2017-07-20 00:54:53 +00:00
SidebarButton("Settings", "/settings", "cog")
2017-07-22 13:04:54 +00:00
.spacer
2017-09-22 21:36:43 +00:00
.sidebar-link(aria-label="Search")
.sidebar-button
Icon("search")
FuzzySearch
2017-10-03 13:26:29 +00:00
if user != nil && (user.Role == "admin" || user.Role == "editor")
SidebarButton("Admin", "/admin", "wrench")
2017-07-23 03:57:33 +00:00
SidebarButton("Help", "/thread/I3MMiOtzR", "question-circle")
2017-07-20 00:54:53 +00:00
if user != nil
SidebarButtonNoAJAX("Logout", "/logout", "sign-out")
else
SidebarButton("Login", "/login", "sign-in")