Cleanup
This commit is contained in:
20
pages/explore/explore.go
Normal file
20
pages/explore/explore.go
Normal 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))
|
||||
}
|
9
pages/explore/explore.pixy
Normal file
9
pages/explore/explore.pixy
Normal 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)
|
Reference in New Issue
Block a user