91 lines
2.8 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
2017-11-13 13:28:52 +00:00
//- User avatar
2017-11-03 08:34:21 +00:00
.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")
2018-02-28 11:12:58 +00:00
if user != nil
a.badge.left-badge(href="/settings", title="Settings")
2018-02-28 11:12:58 +00:00
RawIcon("cog")
a#notification-icon.badge.right-badge(href="/notifications", title="Notifications")
2018-02-28 11:12:58 +00:00
RawIcon("bell")
2018-02-28 15:26:49 +00:00
a#notification-count.badge.right-badge.badge-important.hidden(href="/notifications", title="Notifications") 0
2017-11-13 13:28:52 +00:00
2018-03-26 18:37:53 +00:00
//- Search
.sidebar-link(aria-label="Search")
.sidebar-button
Icon("search")
FuzzySearch
2017-11-13 13:28:52 +00:00
//- Sidebar buttons
2017-07-20 00:54:53 +00:00
if user != nil
SidebarButton("Home", "/+" + user.Nick + "/animelist/watching", "home")
2017-07-20 00:54:53 +00:00
else
2017-11-03 08:34:21 +00:00
SidebarButton("Home", "/", "home")
2017-11-13 13:28:52 +00:00
2017-11-03 08:34:21 +00:00
SidebarButton("Forum", "/forum", "comment")
SidebarButton("Explore", "/explore", "th")
2017-11-22 11:51:56 +00:00
SidebarButton("Calendar", "/calendar", "calendar")
2017-11-03 08:34:21 +00:00
SidebarButton("Soundtracks", "/soundtracks", "headphones")
SidebarButton("Quotes", "/quotes", "quote-left")
2018-03-01 21:44:14 +00:00
SidebarButton("Companies", "/companies", "building")
2017-11-03 08:34:21 +00:00
SidebarButton("Users", "/users", "globe")
2017-11-02 10:07:33 +00:00
2017-11-03 08:34:21 +00:00
if user != nil
2018-03-04 15:53:42 +00:00
SidebarButton("Support", "/support", "heart")
2018-03-04 01:04:43 +00:00
2018-03-10 00:20:54 +00:00
//- if arn.IsDevelopment()
//- SidebarButton("Groups", "/groups", "users")
2017-07-22 13:04:54 +00:00
2017-11-13 13:28:52 +00:00
//- 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")
2017-11-30 02:21:37 +00:00
//- SidebarButton("Companies", "/companies", "building")
//- SidebarButton("Genres", "/genres", "clone")
2017-11-13 13:28:52 +00:00
2017-11-03 08:34:21 +00:00
.spacer
2018-03-11 03:45:01 +00:00
2018-03-11 17:17:35 +00:00
AudioPlayer
2017-11-16 15:14:55 +00:00
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")
2017-10-03 13:26:29 +00:00
2017-11-16 14:15:35 +00:00
a.sidebar-link.action(href="#", data-action="toggleTheme", data-trigger="click")
.sidebar-button
Icon("paint-brush")
span.sidebar-text Theme
2017-11-03 08:34:21 +00:00
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
.sidebar-social-media
SocialMediaButtons
2017-10-06 03:53:49 +00:00
component SidebarButton(name string, target string, icon string)
a.sidebar-link(href=target, aria-label=name, data-bubble="true")
2017-10-06 03:53:49 +00:00
.sidebar-button
Icon(icon)
span.sidebar-text= name
component SidebarButtonNoAJAX(name string, target string, icon string)
2018-03-23 20:29:28 +00:00
a.sidebar-link(href=target, aria-label=name, data-bubble="true", data-ajax="false")
2017-10-06 03:53:49 +00:00
.sidebar-button
Icon(icon)
span.sidebar-text= name