This commit is contained in:
2017-07-01 01:16:25 +02:00
parent d40d4a576a
commit 10ef00a810
31 changed files with 16 additions and 48 deletions

20
pages/explore/explore.go Normal file
View File

@ -0,0 +1,20 @@
package explore
import (
"net/http"
"github.com/aerogo/aero"
"github.com/animenotifier/arn"
"github.com/animenotifier/notify.moe/components"
)
// Get search page.
func Get(ctx *aero.Context) string {
animeList, err := arn.GetPopularAnimeCached()
if err != nil {
return ctx.Error(http.StatusInternalServerError, "Error fetching popular anime", err)
}
return ctx.HTML(components.ExploreAnime(nil, nil, animeList))
}

View File

@ -0,0 +1,9 @@
component ExploreAnime(overall []*arn.Anime, story []*arn.Anime, airing []*arn.Anime)
h2 Highest Rating
AnimeGrid(overall)
h2 Best Story
AnimeGrid(story)
h2 Currently Airing
AnimeGrid(airing)