88 lines
2.8 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("Support", "/support", "heart")
//- if arn.IsDevelopment()
//- SidebarButton("Groups", "/groups", "users")
if user != nil && (user.Role == "editor" || user.Role == "admin")
SidebarButton("Editor", "/editor", "pencil")
SidebarButton("Log", "/log", "list")
//- 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 && user.Role == "admin"
SidebarButton("Admin", "/admin", "wrench")
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