Improved navigation
This commit is contained in:
parent
f1767f034e
commit
62a5f391a4
@ -9,8 +9,13 @@ component LoggedOutMenu
|
|||||||
NavigationButton("About", "/", "question-circle")
|
NavigationButton("About", "/", "question-circle")
|
||||||
NavigationButton("Anime", "/anime", "television")
|
NavigationButton("Anime", "/anime", "television")
|
||||||
NavigationButton("Forum", "/forum", "comment")
|
NavigationButton("Forum", "/forum", "comment")
|
||||||
|
|
||||||
|
FuzzySearch
|
||||||
|
|
||||||
|
.extra-navigation
|
||||||
NavigationButton("Users", "/users", "globe")
|
NavigationButton("Users", "/users", "globe")
|
||||||
NavigationButton("Airing", "/airing", "th")
|
NavigationButton("Airing", "/airing", "th")
|
||||||
|
NavigationButton("Settings", "/settings", "cog")
|
||||||
|
|
||||||
component LoggedInMenu(user *arn.User)
|
component LoggedInMenu(user *arn.User)
|
||||||
nav#navigation.logged-in
|
nav#navigation.logged-in
|
||||||
@ -22,9 +27,6 @@ component LoggedInMenu(user *arn.User)
|
|||||||
FuzzySearch
|
FuzzySearch
|
||||||
|
|
||||||
.extra-navigation
|
.extra-navigation
|
||||||
//- if user.Role == "admin"
|
|
||||||
//- ExtraNavigationButton("Admin", "/admin", "wrench")
|
|
||||||
|
|
||||||
ExtraNavigationButton("Users", "/users", "globe")
|
ExtraNavigationButton("Users", "/users", "globe")
|
||||||
ExtraNavigationButton("Airing", "/airing", "th")
|
ExtraNavigationButton("Airing", "/airing", "th")
|
||||||
ExtraNavigationButton("Settings", "/settings", "cog")
|
ExtraNavigationButton("Settings", "/settings", "cog")
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package settings
|
package settings
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"net/http"
|
||||||
|
|
||||||
"github.com/aerogo/aero"
|
"github.com/aerogo/aero"
|
||||||
"github.com/animenotifier/notify.moe/components"
|
"github.com/animenotifier/notify.moe/components"
|
||||||
"github.com/animenotifier/notify.moe/utils"
|
"github.com/animenotifier/notify.moe/utils"
|
||||||
@ -11,7 +13,7 @@ func Get(ctx *aero.Context) string {
|
|||||||
user := utils.GetUser(ctx)
|
user := utils.GetUser(ctx)
|
||||||
|
|
||||||
if user == nil {
|
if user == nil {
|
||||||
return ctx.Redirect("/")
|
return ctx.Error(http.StatusForbidden, "Not logged in", nil)
|
||||||
}
|
}
|
||||||
|
|
||||||
return ctx.HTML(components.Settings(user))
|
return ctx.HTML(components.Settings(user))
|
||||||
|
@ -48,6 +48,8 @@
|
|||||||
background text-color
|
background text-color
|
||||||
border none
|
border none
|
||||||
color white
|
color white
|
||||||
|
font-size 1em
|
||||||
|
min-width 0
|
||||||
|
|
||||||
:focus
|
:focus
|
||||||
border none !important
|
border none !important
|
||||||
@ -64,12 +66,12 @@
|
|||||||
margin-right 0
|
margin-right 0
|
||||||
|
|
||||||
> 330px
|
> 330px
|
||||||
.navigation-button
|
.navigation-button, #search
|
||||||
font-size 1.3em
|
font-size 1.3em
|
||||||
|
|
||||||
> 930px
|
> 930px
|
||||||
.navigation-button
|
.navigation-button, #search
|
||||||
font-size 1.1em
|
font-size 1.2em
|
||||||
|
|
||||||
#navigation
|
#navigation
|
||||||
justify-content flex-start
|
justify-content flex-start
|
||||||
|
Loading…
Reference in New Issue
Block a user