Improved navigation

This commit is contained in:
Eduard Urbach 2017-06-21 02:51:55 +02:00
parent f1767f034e
commit 62a5f391a4
3 changed files with 15 additions and 9 deletions

View File

@ -9,8 +9,13 @@ component LoggedOutMenu
NavigationButton("About", "/", "question-circle")
NavigationButton("Anime", "/anime", "television")
NavigationButton("Forum", "/forum", "comment")
FuzzySearch
.extra-navigation
NavigationButton("Users", "/users", "globe")
NavigationButton("Airing", "/airing", "th")
NavigationButton("Settings", "/settings", "cog")
component LoggedInMenu(user *arn.User)
nav#navigation.logged-in
@ -22,9 +27,6 @@ component LoggedInMenu(user *arn.User)
FuzzySearch
.extra-navigation
//- if user.Role == "admin"
//- ExtraNavigationButton("Admin", "/admin", "wrench")
ExtraNavigationButton("Users", "/users", "globe")
ExtraNavigationButton("Airing", "/airing", "th")
ExtraNavigationButton("Settings", "/settings", "cog")

View File

@ -1,6 +1,8 @@
package settings
import (
"net/http"
"github.com/aerogo/aero"
"github.com/animenotifier/notify.moe/components"
"github.com/animenotifier/notify.moe/utils"
@ -11,7 +13,7 @@ func Get(ctx *aero.Context) string {
user := utils.GetUser(ctx)
if user == nil {
return ctx.Redirect("/")
return ctx.Error(http.StatusForbidden, "Not logged in", nil)
}
return ctx.HTML(components.Settings(user))

View File

@ -48,6 +48,8 @@
background text-color
border none
color white
font-size 1em
min-width 0
:focus
border none !important
@ -64,12 +66,12 @@
margin-right 0
> 330px
.navigation-button
.navigation-button, #search
font-size 1.3em
> 930px
.navigation-button
font-size 1.1em
.navigation-button, #search
font-size 1.2em
#navigation
justify-content flex-start