2018-03-26 20:37:53 +02:00

91 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(href="/settings", title="Settings")
RawIcon("cog")
a#notification-icon.badge.right-badge(href="/notifications", title="Notifications")
RawIcon("bell")
a#notification-count.badge.right-badge.badge-important.hidden(href="/notifications", title="Notifications") 0
//- Search
.sidebar-link(aria-label="Search")
.sidebar-button
Icon("search")
FuzzySearch
//- Sidebar buttons
if user != nil
SidebarButton("Home", "/+" + user.Nick + "/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")
//- 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
AudioPlayer
if user != nil && (user.Role == "editor" || user.Role == "admin")
SidebarButton("Log", "/log", "list")
SidebarButton("Editor", "/editor", "pencil")
//- 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(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", data-ajax="false")
.sidebar-button
Icon(icon)
span.sidebar-text= name