55 lines
1.7 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")
NavigationButton("Airing", "/airing", "th")
NavigationButton("Settings", "/settings", "cog")
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
ExtraNavigationButton("Dash", "/", "inbox")
ExtraNavigationButton("Anime", "/anime", "television")
ExtraNavigationButton("Profile", "/+", "user")
ExtraNavigationButton("Forum", "/forum", "comment")
FuzzySearch
2017-06-18 15:16:40 +00:00
.extra-navigation
ExtraNavigationButton("Users", "/users", "globe")
2017-06-20 18:13:04 +00:00
ExtraNavigationButton("Airing", "/airing", "th")
2017-06-20 19:37:52 +00:00
ExtraNavigationButton("Settings", "/settings", "cog")
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-20 20:54:45 +00:00
input#search.action(data-action="search", data-trigger="input", type="text", placeholder="Search...", title="Shortcut: Ctrl + Q")
2017-06-20 19:37:52 +00:00
component NavigationButton(name string, target string, icon string)
2017-06-17 11:05:52 +00:00
a.navigation-link.ajax(href=target, aria-label=name)
2017-06-15 21:03:55 +00:00
.navigation-button
2017-06-16 16:12:18 +00:00
Icon(icon)
2017-06-15 21:03:55 +00:00
span.navigation-text= name
2017-06-18 15:16:40 +00:00
component ExtraNavigationButton(name string, target string, icon string)
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