Refactor page routes into multiple submodules

This commit is contained in:
2018-04-25 20:03:35 +02:00
parent d331e15363
commit 2503d63b60
21 changed files with 577 additions and 369 deletions

View File

@ -0,0 +1,20 @@
package exploreroutes
import (
"github.com/aerogo/layout"
"github.com/animenotifier/notify.moe/pages/explore"
"github.com/animenotifier/notify.moe/pages/explore/explorecolor"
"github.com/animenotifier/notify.moe/pages/explore/explorerelations"
"github.com/animenotifier/notify.moe/pages/explore/halloffame"
)
// Register registers the page routes.
func Register(l *layout.Layout) {
// Explore
l.Page("/explore", explore.Filter)
l.Page("/explore/anime/:year/:season/:status/:type", explore.Filter)
l.Page("/explore/color/:color/anime", explorecolor.AnimeByAverageColor)
l.Page("/explore/color/:color/anime/from/:index", explorecolor.AnimeByAverageColor)
l.Page("/explore/sequels", explorerelations.Sequels)
l.Page("/halloffame", halloffame.Get)
}