55 lines
1.7 KiB
Plaintext
55 lines
1.7 KiB
Plaintext
component Sidebar(user *arn.User)
|
|
.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")
|
|
|
|
if user != nil
|
|
SidebarButton("Home", "/animelist/watching", "home")
|
|
SidebarButton("Dash", "/dashboard", "tachometer")
|
|
else
|
|
SidebarButton("Home", "/", "home")
|
|
|
|
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")
|
|
|
|
if user != nil
|
|
SidebarButton("Shop", "/shop", "shopping-cart")
|
|
SidebarButton("Statistics", "/statistics", "pie-chart")
|
|
SidebarButton("Settings", "/settings", "cog")
|
|
|
|
.spacer
|
|
|
|
.sidebar-link(aria-label="Search")
|
|
.sidebar-button
|
|
Icon("search")
|
|
FuzzySearch
|
|
|
|
if user != nil && (user.Role == "admin" || user.Role == "editor")
|
|
SidebarButton("Admin", "/admin", "wrench")
|
|
|
|
SidebarButton("Help", "/thread/I3MMiOtzR", "question-circle")
|
|
|
|
if user != nil
|
|
SidebarButtonNoAJAX("Logout", "/logout", "sign-out")
|
|
else
|
|
SidebarButton("Login", "/login", "sign-in")
|
|
|
|
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 |