Improved menu
This commit is contained in:
parent
62a5f391a4
commit
5ddf387f88
2
main.go
2
main.go
@ -16,6 +16,7 @@ import (
|
|||||||
"github.com/animenotifier/notify.moe/pages/dashboard"
|
"github.com/animenotifier/notify.moe/pages/dashboard"
|
||||||
"github.com/animenotifier/notify.moe/pages/forum"
|
"github.com/animenotifier/notify.moe/pages/forum"
|
||||||
"github.com/animenotifier/notify.moe/pages/forums"
|
"github.com/animenotifier/notify.moe/pages/forums"
|
||||||
|
"github.com/animenotifier/notify.moe/pages/login"
|
||||||
popularanime "github.com/animenotifier/notify.moe/pages/popular-anime"
|
popularanime "github.com/animenotifier/notify.moe/pages/popular-anime"
|
||||||
"github.com/animenotifier/notify.moe/pages/posts"
|
"github.com/animenotifier/notify.moe/pages/posts"
|
||||||
"github.com/animenotifier/notify.moe/pages/profile"
|
"github.com/animenotifier/notify.moe/pages/profile"
|
||||||
@ -61,6 +62,7 @@ func main() {
|
|||||||
app.Ajax("/admin", admin.Get)
|
app.Ajax("/admin", admin.Get)
|
||||||
app.Ajax("/search/:term", search.Get)
|
app.Ajax("/search/:term", search.Get)
|
||||||
app.Ajax("/users", users.Get)
|
app.Ajax("/users", users.Get)
|
||||||
|
app.Ajax("/login", login.Get)
|
||||||
app.Ajax("/airing", airing.Get)
|
app.Ajax("/airing", airing.Get)
|
||||||
app.Ajax("/webdev", webdev.Get)
|
app.Ajax("/webdev", webdev.Get)
|
||||||
// app.Ajax("/genres", genres.Get)
|
// app.Ajax("/genres", genres.Get)
|
||||||
|
@ -14,35 +14,34 @@ component LoggedOutMenu
|
|||||||
|
|
||||||
.extra-navigation
|
.extra-navigation
|
||||||
NavigationButton("Users", "/users", "globe")
|
NavigationButton("Users", "/users", "globe")
|
||||||
|
|
||||||
NavigationButton("Airing", "/airing", "th")
|
NavigationButton("Airing", "/airing", "th")
|
||||||
NavigationButton("Settings", "/settings", "cog")
|
NavigationButton("Login", "/login", "sign-in")
|
||||||
|
|
||||||
component LoggedInMenu(user *arn.User)
|
component LoggedInMenu(user *arn.User)
|
||||||
nav#navigation.logged-in
|
nav#navigation.logged-in
|
||||||
ExtraNavigationButton("Dash", "/", "inbox")
|
NavigationButton("Dash", "/", "inbox")
|
||||||
ExtraNavigationButton("Anime", "/anime", "television")
|
NavigationButton("Anime", "/anime", "television")
|
||||||
ExtraNavigationButton("Profile", "/+", "user")
|
NavigationButton("Profile", "/+", "user")
|
||||||
ExtraNavigationButton("Forum", "/forum", "comment")
|
NavigationButton("Forum", "/forum", "comment")
|
||||||
|
|
||||||
FuzzySearch
|
FuzzySearch
|
||||||
|
|
||||||
.extra-navigation
|
.extra-navigation
|
||||||
ExtraNavigationButton("Users", "/users", "globe")
|
NavigationButton("Users", "/users", "globe")
|
||||||
ExtraNavigationButton("Airing", "/airing", "th")
|
|
||||||
ExtraNavigationButton("Settings", "/settings", "cog")
|
|
||||||
|
|
||||||
|
.extra-navigation
|
||||||
|
NavigationButton("Airing", "/airing", "th")
|
||||||
|
|
||||||
|
NavigationButton("Settings", "/settings", "cog")
|
||||||
|
|
||||||
|
.extra-navigation
|
||||||
NavigationButtonNoAJAX("Logout", "/logout", "sign-out")
|
NavigationButtonNoAJAX("Logout", "/logout", "sign-out")
|
||||||
|
|
||||||
component FuzzySearch
|
component FuzzySearch
|
||||||
input#search.action(data-action="search", data-trigger="input", type="text", placeholder="Search...", title="Shortcut: Ctrl + Q")
|
input#search.action(data-action="search", data-trigger="input", type="text", placeholder="Search...", title="Shortcut: Ctrl + Q")
|
||||||
|
|
||||||
component NavigationButton(name string, target string, icon string)
|
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)
|
a.navigation-link.ajax(href=target, aria-label=name, title=name)
|
||||||
.navigation-button
|
.navigation-button
|
||||||
Icon(icon)
|
Icon(icon)
|
||||||
|
@ -5,7 +5,3 @@ component FrontPage
|
|||||||
|
|
||||||
p
|
p
|
||||||
a(href="https://github.com/animenotifier/notify.moe", target="_blank", rel="noopener") Source on GitHub
|
a(href="https://github.com/animenotifier/notify.moe", target="_blank", rel="noopener") Source on GitHub
|
||||||
|
|
||||||
.login-buttons
|
|
||||||
a.login-button(href="/auth/google")
|
|
||||||
img.login-button-image(src="/images/login/google", alt="Google Login", title="Login with your Google account")
|
|
11
pages/login/login.go
Normal file
11
pages/login/login.go
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
package login
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/aerogo/aero"
|
||||||
|
"github.com/animenotifier/notify.moe/components"
|
||||||
|
)
|
||||||
|
|
||||||
|
// Get ...
|
||||||
|
func Get(ctx *aero.Context) string {
|
||||||
|
return ctx.HTML(components.Login())
|
||||||
|
}
|
4
pages/login/login.pixy
Normal file
4
pages/login/login.pixy
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
component Login
|
||||||
|
.login-buttons
|
||||||
|
a.login-button(href="/auth/google")
|
||||||
|
img.login-button-image(src="/images/login/google", alt="Google Login", title="Login with your Google account")
|
@ -58,13 +58,6 @@
|
|||||||
.extra-navigation
|
.extra-navigation
|
||||||
display none
|
display none
|
||||||
|
|
||||||
.navigation-text
|
|
||||||
display none
|
|
||||||
|
|
||||||
.navigation-button
|
|
||||||
.icon
|
|
||||||
margin-right 0
|
|
||||||
|
|
||||||
> 330px
|
> 330px
|
||||||
.navigation-button, #search
|
.navigation-button, #search
|
||||||
font-size 1.3em
|
font-size 1.3em
|
||||||
@ -76,21 +69,12 @@
|
|||||||
#navigation
|
#navigation
|
||||||
justify-content flex-start
|
justify-content flex-start
|
||||||
|
|
||||||
.logged-out
|
|
||||||
.navigation-text
|
|
||||||
display inline-block
|
|
||||||
|
|
||||||
.navigation-button
|
|
||||||
.icon
|
|
||||||
margin-right 0.5em
|
|
||||||
|
|
||||||
#search
|
#search
|
||||||
display block
|
display block
|
||||||
flex 1
|
flex 1
|
||||||
|
|
||||||
.extra-navigation
|
.extra-navigation
|
||||||
horizontal
|
display block
|
||||||
justify-content flex-end
|
|
||||||
|
|
||||||
< 400px height
|
< 400px height
|
||||||
#navigation
|
#navigation
|
||||||
|
Loading…
Reference in New Issue
Block a user