Applied new layout system

This commit is contained in:
2019-06-03 12:20:17 +09:00
parent 36427a1501
commit 3268488b7b
26 changed files with 346 additions and 308 deletions

View File

@ -1,18 +1,19 @@
package settingsroutes
import (
"github.com/aerogo/layout"
"github.com/aerogo/aero"
"github.com/animenotifier/notify.moe/components"
"github.com/animenotifier/notify.moe/pages/settings"
"github.com/animenotifier/notify.moe/utils/page"
)
// Register registers the page routes.
func Register(l *layout.Layout) {
func Register(app *aero.Application) {
// Settings
l.Page("/settings", settings.Get(components.SettingsPersonal))
l.Page("/settings/accounts", settings.Get(components.SettingsAccounts))
l.Page("/settings/notifications", settings.Get(components.SettingsNotifications))
l.Page("/settings/info", settings.Get(components.SettingsInfo))
l.Page("/settings/style", settings.Get(components.SettingsStyle))
l.Page("/settings/extras", settings.Get(components.SettingsExtras))
page.Get(app, "/settings", settings.Get(components.SettingsPersonal))
page.Get(app, "/settings/accounts", settings.Get(components.SettingsAccounts))
page.Get(app, "/settings/notifications", settings.Get(components.SettingsNotifications))
page.Get(app, "/settings/info", settings.Get(components.SettingsInfo))
page.Get(app, "/settings/style", settings.Get(components.SettingsStyle))
page.Get(app, "/settings/extras", settings.Get(components.SettingsExtras))
}