57 lines
1.6 KiB
Plaintext
Raw Normal View History

2017-06-15 21:03:55 +00:00
component Navigation(user *arn.User)
if user == nil
LoggedOutMenu
else
2017-06-18 15:16:40 +00:00
LoggedInMenu(user)
2017-06-15 21:03:55 +00:00
component LoggedOutMenu
2017-06-20 19:37:52 +00:00
nav#navigation.logged-out
2017-06-20 18:13:04 +00:00
NavigationButton("About", "/", "question-circle")
NavigationButton("Anime", "/anime", "television")
NavigationButton("Forum", "/forum", "comment")
2017-06-21 00:51:55 +00:00
FuzzySearch
.extra-navigation
NavigationButton("Users", "/users", "globe")
2017-06-21 01:05:34 +00:00
NavigationButton("Airing", "/airing", "th")
NavigationButton("Login", "/login", "sign-in")
2017-06-15 21:03:55 +00:00
2017-06-18 15:16:40 +00:00
component LoggedInMenu(user *arn.User)
2017-06-20 19:37:52 +00:00
nav#navigation.logged-in
2017-06-25 13:04:35 +00:00
.extension-navigation
NavigationButton("Watching list", "/extension/embed", "home")
NavigationButton("Dash", "/", "dashboard")
2017-06-21 01:05:34 +00:00
NavigationButton("Profile", "/+", "user")
NavigationButton("Forum", "/forum", "comment")
2017-06-25 14:56:42 +00:00
NavigationButton("Anime", "/anime", "television")
2017-06-20 19:37:52 +00:00
FuzzySearch
2017-06-18 15:16:40 +00:00
.extra-navigation
2017-06-21 01:05:34 +00:00
NavigationButton("Users", "/users", "globe")
.extra-navigation
NavigationButton("Airing", "/airing", "th")
NavigationButton("Settings", "/settings", "cog")
2017-06-18 15:16:40 +00:00
2017-06-21 01:05:34 +00:00
.extra-navigation
2017-06-18 15:16:40 +00:00
NavigationButtonNoAJAX("Logout", "/logout", "sign-out")
2017-06-20 19:37:52 +00:00
component FuzzySearch
2017-06-24 14:41:22 +00:00
input#search.action(data-action="search", data-trigger="input", type="text", placeholder="Search...", title="Shortcut: F")
2017-06-20 19:37:52 +00:00
component NavigationButton(name string, target string, icon string)
2017-06-18 15:16:40 +00:00
a.navigation-link.ajax(href=target, aria-label=name, title=name)
.navigation-button
Icon(icon)
span.navigation-text= name
2017-06-15 21:03:55 +00:00
component NavigationButtonNoAJAX(name string, target string, icon string)
2017-06-17 22:06:08 +00:00
a.navigation-link(href=target, aria-label=name)
.navigation-button
2017-06-16 16:12:18 +00:00
Icon(icon)
span.navigation-text= name