Cleanup
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
package popularanime
|
||||
package explore
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
@ -16,5 +16,5 @@ func Get(ctx *aero.Context) string {
|
||||
return ctx.Error(http.StatusInternalServerError, "Error fetching popular anime", err)
|
||||
}
|
||||
|
||||
return ctx.HTML(components.PopularAnime(animeList))
|
||||
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)
|
@ -1,16 +0,0 @@
|
||||
component OldPopularAnime(popularAnime []*arn.Anime, titleCount int, animeCount int)
|
||||
//- h2 Anime
|
||||
|
||||
//- #search-container
|
||||
//- input#search(type="text", placeholder="Search...", onkeyup="$.searchAnime();", onfocus="this.select();", disabled="disabled", data-count=titleCount, data-anime-count=animeCount)
|
||||
|
||||
//- #search-results-container
|
||||
//- #search-results
|
||||
|
||||
//- if popularAnime != nil
|
||||
//- h3.popular-title Popular
|
||||
|
||||
//- .popular-anime-list
|
||||
//- each anime in popularAnime
|
||||
//- a.popular-anime.ajax(href="/anime/" + toString(anime.ID), title=anime.Title.Romaji + " (" + arn.Plural(anime.Watching(), "user") + " watching)")
|
||||
//- img.anime-image.popular-anime-image(src=anime.Image, alt=anime.Title.Romaji)
|
@ -1,19 +0,0 @@
|
||||
// .popular-title
|
||||
// text-align center
|
||||
|
||||
// .popular-anime-list
|
||||
// display flex
|
||||
// flex-flow row wrap
|
||||
// justify-content center
|
||||
|
||||
// .popular-anime
|
||||
// padding 0.5em
|
||||
// display block
|
||||
|
||||
// .popular-anime-image
|
||||
// width 100px !important
|
||||
// height 141px !important
|
||||
// border-radius 3px
|
||||
// object-fit cover
|
||||
// default-transition
|
||||
// shadow-up
|
@ -1,6 +0,0 @@
|
||||
component PopularAnime(animeList []*arn.Anime)
|
||||
h2 Top 3
|
||||
AnimeGrid(animeList[:3])
|
||||
|
||||
h2 Popular
|
||||
AnimeGrid(animeList[3:])
|
Reference in New Issue
Block a user