96 lines
3.1 KiB
Plaintext
Raw Normal View History

2017-07-20 02:54:53 +02:00
component Sidebar(user *arn.User)
2017-11-03 09:34:21 +01:00
aside#sidebar
2017-11-13 14:28:52 +01:00
//- User avatar
2017-11-03 09:34:21 +01:00
.user-image-container
if user != nil
2018-04-18 11:31:55 +02:00
AvatarNoTip(user)
2017-11-03 09:34:21 +01:00
else
a(href="/")
img.user-image.lazy(src=utils.EmptyImage(), data-src="/images/brand/64.png", data-webp="true", alt="Anime Notifier")
2018-02-28 12:12:58 +01:00
if user != nil
a.badge.left-badge(href="/settings", title="Settings")
2018-02-28 12:12:58 +01:00
RawIcon("cog")
a#notification-icon.badge.right-badge(href="/notifications", title="Notifications")
2018-02-28 12:12:58 +01:00
RawIcon("bell")
2018-02-28 16:26:49 +01:00
a#notification-count.badge.right-badge.badge-important.hidden(href="/notifications", title="Notifications") 0
2017-11-13 14:28:52 +01:00
2018-03-26 20:37:53 +02:00
//- Search
div(aria-label="Search")
2018-03-26 20:37:53 +02:00
.sidebar-button
Icon("search")
FuzzySearch
2018-04-20 20:58:45 +02:00
.speech-input.action(data-action="searchBySpeech", data-trigger="click", title="Speech input")
2018-04-20 20:16:59 +02:00
RawIcon("microphone")
2018-03-26 20:37:53 +02:00
2017-11-13 14:28:52 +01:00
//- Sidebar buttons
2017-07-20 02:54:53 +02:00
if user != nil
SidebarButton("Home", "/+" + user.Nick + "/animelist/watching", "home")
2017-07-20 02:54:53 +02:00
else
2017-11-03 09:34:21 +01:00
SidebarButton("Home", "/", "home")
2017-11-13 14:28:52 +01:00
2017-11-03 09:34:21 +01:00
SidebarButton("Forum", "/forum", "comment")
SidebarButton("Explore", "/explore", "th")
2017-11-22 12:51:56 +01:00
SidebarButton("Calendar", "/calendar", "calendar")
2018-04-15 11:30:25 +02:00
SidebarButton("AMVs", "/amvs", "video-camera")
2017-11-03 09:34:21 +01:00
SidebarButton("Soundtracks", "/soundtracks", "headphones")
SidebarButton("Quotes", "/quotes", "quote-left")
2018-03-01 22:44:14 +01:00
SidebarButton("Companies", "/companies", "building")
2017-11-03 09:34:21 +01:00
SidebarButton("Users", "/users", "globe")
2017-11-02 11:07:33 +01:00
2017-11-03 09:34:21 +01:00
if user != nil
2018-03-04 16:53:42 +01:00
SidebarButton("Support", "/support", "heart")
2018-03-04 02:04:43 +01:00
2018-03-10 01:20:54 +01:00
//- if arn.IsDevelopment()
//- SidebarButton("Groups", "/groups", "users")
2017-07-22 15:04:54 +02:00
2017-11-13 14:28:52 +01: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 03:21:37 +01:00
//- SidebarButton("Companies", "/companies", "building")
//- SidebarButton("Genres", "/genres", "clone")
2018-04-23 12:18:53 +02:00
//- SidebarButton("Characters", "/characters", "child")
2017-11-13 14:28:52 +01:00
2017-11-03 09:34:21 +01:00
.spacer
2018-03-11 04:45:01 +01:00
2018-03-11 18:17:35 +01:00
AudioPlayer
2017-11-16 16:14:55 +01: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 15:26:29 +02:00
2018-04-23 16:51:11 +02:00
a.sidebar-link.action(href="#", data-action="nextTheme", data-trigger="click")
2017-11-16 15:15:35 +01:00
.sidebar-button
Icon("paint-brush")
span.sidebar-text Theme
2017-11-03 09:34:21 +01:00
SidebarButton("Help", "/thread/I3MMiOtzR", "question-circle")
2017-07-20 02:54:53 +02:00
2017-11-03 09:34:21 +01:00
if user != nil
SidebarButtonNoAJAX("Logout", "/logout", "sign-out")
else
SidebarButton("Login", "/login", "sign-in")
2017-10-06 05:53:49 +02:00
.sidebar-social-media
SocialMediaButtons
2017-10-06 05:53:49 +02:00
component SidebarButton(name string, target string, icon string)
a.sidebar-link(href=target, aria-label=name, data-bubble="true")
2017-10-06 05:53:49 +02:00
.sidebar-button
Icon(icon)
span.sidebar-text= name
component SidebarButtonNoAJAX(name string, target string, icon string)
2018-03-23 21:29:28 +01:00
a.sidebar-link(href=target, aria-label=name, data-bubble="true", data-ajax="false")
2017-10-06 05:53:49 +02:00
.sidebar-button
Icon(icon)
span.sidebar-text= name