2017-06-15 21:03:55 +00:00
|
|
|
component Navigation(user *arn.User)
|
|
|
|
if user == nil
|
|
|
|
LoggedOutMenu
|
|
|
|
else
|
|
|
|
LoggedInMenu
|
|
|
|
|
|
|
|
component LoggedOutMenu
|
2016-11-28 16:06:00 +00:00
|
|
|
nav#navigation
|
|
|
|
NavigationButton("Dash", "/", "inbox")
|
|
|
|
NavigationButton("Anime", "/anime", "television")
|
|
|
|
NavigationButton("Forum", "/forum", "comment")
|
2017-06-10 00:19:31 +00:00
|
|
|
NavigationButton("Users", "/users", "globe")
|
2016-11-28 16:06:00 +00:00
|
|
|
NavigationButton("Airing", "/airing", "rss")
|
2017-06-15 21:03:55 +00:00
|
|
|
|
|
|
|
component LoggedInMenu
|
|
|
|
nav#navigation
|
|
|
|
NavigationButton("Dash", "/", "inbox")
|
|
|
|
NavigationButton("Anime", "/anime", "television")
|
|
|
|
NavigationButton("Forum", "/forum", "comment")
|
|
|
|
NavigationButton("Users", "/users", "globe")
|
|
|
|
NavigationButton("Airing", "/airing", "rss")
|
|
|
|
NavigationButtonNoAJAX("Logout", "/logout", "sign-out")
|
2016-11-28 16:06:00 +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
|
|
|
|
|
|
|
|
component NavigationButtonNoAJAX(name string, target string, icon string)
|
2017-06-17 22:06:08 +00:00
|
|
|
a.navigation-link(href=target, aria-label=name)
|
2016-11-28 16:06:00 +00:00
|
|
|
.navigation-button
|
2017-06-16 16:12:18 +00:00
|
|
|
Icon(icon)
|
2016-11-28 16:06:00 +00:00
|
|
|
span.navigation-text= name
|