86 lines
2.7 KiB
Plaintext

component Sidebar(user *arn.User)
aside#sidebar
//- User avatar
.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
a.badge.left-badge.ajax(href="/settings", title="Settings")
RawIcon("cog")
a#notification-icon.badge.right-badge.ajax(href="/notifications", title="Notifications")
RawIcon("bell")
a#notification-count.badge.right-badge.ajax.badge-important.hidden(href="/notifications", title="Notifications") 0
//- Sidebar buttons
if user != nil
SidebarButton("Home", "/animelist/watching", "home")
else
SidebarButton("Home", "/", "home")
SidebarButton("Forum", "/forum", "comment")
SidebarButton("Explore", "/explore", "th")
SidebarButton("Calendar", "/calendar", "calendar")
SidebarButton("Soundtracks", "/soundtracks", "headphones")
SidebarButton("Quotes", "/quotes", "quote-left")
SidebarButton("Companies", "/companies", "building")
SidebarButton("Users", "/users", "globe")
if user != nil
SidebarButton("Shop", "/shop", "shopping-cart")
//- 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")
//- SidebarButton("Companies", "/companies", "building")
//- SidebarButton("Genres", "/genres", "clone")
.spacer
.sidebar-link(aria-label="Search")
.sidebar-button
Icon("search")
FuzzySearch
if user != nil
if user.Role == "admin"
SidebarButton("Admin", "/admin", "wrench")
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
SidebarButtonNoAJAX("Logout", "/logout", "sign-out")
else
SidebarButton("Login", "/login", "sign-in")
.sidebar-social-media
SocialMediaButtons
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