66 lines
2.0 KiB
Plaintext
Raw Normal View History

2017-07-20 00:54:53 +00:00
component Sidebar(user *arn.User)
2017-11-03 08:34:21 +00:00
aside#sidebar
.user-image-container
if user != nil
Avatar(user)
else
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
if user != nil
2017-11-03 08:34:21 +00:00
SidebarButton("Home", "/animelist/watching", "home")
2017-11-03 17:10:31 +00:00
//- SidebarButton("Dash", "/dashboard", "tachometer")
2017-07-20 00:54:53 +00:00
else
2017-11-03 08:34:21 +00:00
SidebarButton("Home", "/", "home")
2017-10-17 21:17:04 +00:00
2017-11-03 08:34:21 +00:00
SidebarButton("Forum", "/forum", "comment")
SidebarButton("Explore", "/explore", "th")
//- SidebarButton("Artworks", "/artworks", "paint-brush")
SidebarButton("Soundtracks", "/soundtracks", "headphones")
//- SidebarButton("AMVs", "/amvs", "video-camera")
//- SidebarButton("Games", "/games", "gamepad")
SidebarButton("Users", "/users", "globe")
//- SidebarButton("Search", "/search", "search")
2017-11-02 10:07:33 +00:00
2017-11-03 08:34:21 +00:00
if user != nil
2017-11-03 17:10:31 +00:00
//- if user.Role == "admin"
//- SidebarButton("Groups", "/groups", "users")
2017-11-03 08:34:21 +00:00
SidebarButton("Shop", "/shop", "shopping-cart")
2017-11-02 10:07:33 +00:00
2017-11-03 17:10:31 +00:00
//- if user.Role == "admin" || user.Role == "editor"
//- SidebarButton("Statistics", "/statistics", "pie-chart")
2017-07-20 00:54:53 +00:00
2017-11-03 08:34:21 +00:00
SidebarButton("Settings", "/settings", "cog")
2017-07-22 13:04:54 +00:00
2017-11-03 08:34:21 +00:00
.spacer
2017-09-22 21:36:43 +00:00
2017-11-03 08:34:21 +00:00
.sidebar-link(aria-label="Search")
.sidebar-button
Icon("search")
FuzzySearch
2017-10-03 13:26:29 +00:00
2017-11-03 08:34:21 +00:00
if user != nil
if user.Role == "admin"
SidebarButton("Admin", "/admin", "wrench")
if user.Role == "editor"
SidebarButton("Editor", "/editor", "pencil")
SidebarButton("Help", "/thread/I3MMiOtzR", "question-circle")
2017-07-20 00:54:53 +00:00
2017-11-03 08:34:21 +00:00
if user != nil
SidebarButtonNoAJAX("Logout", "/logout", "sign-out")
else
SidebarButton("Login", "/login", "sign-in")
2017-10-06 03:53:49 +00:00
component SidebarButton(name string, target string, icon string)
a.sidebar-link.ajax(href=target, aria-label=name, data-bubble="true")
.sidebar-button
Icon(icon)
span.sidebar-text= name
component SidebarButtonNoAJAX(name string, target string, icon string)
a.sidebar-link(href=target, aria-label=name, data-bubble="true")
.sidebar-button
Icon(icon)
span.sidebar-text= name