2017-06-20 21:37:52 +02:00

53 lines
1.7 KiB
Plaintext

component Navigation(user *arn.User)
if user == nil
LoggedOutMenu
else
LoggedInMenu(user)
component LoggedOutMenu
nav#navigation.logged-out
NavigationButton("About", "/", "question-circle")
NavigationButton("Anime", "/anime", "television")
NavigationButton("Forum", "/forum", "comment")
NavigationButton("Users", "/users", "globe")
NavigationButton("Airing", "/airing", "th")
component LoggedInMenu(user *arn.User)
nav#navigation.logged-in
ExtraNavigationButton("Dash", "/", "inbox")
ExtraNavigationButton("Anime", "/anime", "television")
ExtraNavigationButton("Profile", "/+", "user")
ExtraNavigationButton("Forum", "/forum", "comment")
FuzzySearch
.extra-navigation
//- if user.Role == "admin"
//- ExtraNavigationButton("Admin", "/admin", "wrench")
ExtraNavigationButton("Users", "/users", "globe")
ExtraNavigationButton("Airing", "/airing", "th")
ExtraNavigationButton("Settings", "/settings", "cog")
NavigationButtonNoAJAX("Logout", "/logout", "sign-out")
component FuzzySearch
input#search(type="text", placeholder="Search...", title="Shortcut: Ctrl + Q")
component NavigationButton(name string, target string, icon string)
a.navigation-link.ajax(href=target, aria-label=name)
.navigation-button
Icon(icon)
span.navigation-text= name
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
component NavigationButtonNoAJAX(name string, target string, icon string)
a.navigation-link(href=target, aria-label=name)
.navigation-button
Icon(icon)
span.navigation-text= name