Reimplemented /genres page
This commit is contained in:
parent
91b6ae7efd
commit
d290e2d505
@ -11,8 +11,7 @@ func Get(ctx *aero.Context) string {
|
||||
var genres []string
|
||||
|
||||
for _, genre := range arn.Genres {
|
||||
// Skip this genre because it doesn't get processed in the background jobs
|
||||
if genreName == "Hentai" {
|
||||
if genre == "Hentai" {
|
||||
continue
|
||||
}
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
component Genres(genres []string)
|
||||
//- h1.page-title Genres
|
||||
h1 Genres
|
||||
|
||||
//- .genres
|
||||
//- each genre in genres
|
||||
//- a.genre.ajax(href="/genres/" + genre.ID)
|
||||
//- .genre-text.front
|
||||
//- .genre-icon
|
||||
//- RawIcon(arn.GetGenreIcon(genre.Name))
|
||||
//- span= genre.Name
|
||||
.genres
|
||||
each genre in genres
|
||||
a.genre.ajax(href="/genre/" + strings.ToLower(genre))
|
||||
.genre-text.front
|
||||
.genre-icon
|
||||
RawIcon(arn.GetGenreIcon(genre))
|
||||
span= genre
|
||||
|
||||
//- if len(genre.AnimeList) > 0
|
||||
//- img.genre-image.back(src=genre.AnimeList[0].Image, alt=genre.AnimeList[0].Title.Romaji, title=genre.AnimeList[0].Title.Romaji + "\n" + genre.Name + " #1")
|
||||
//- if len(genre.AnimeList) > 0
|
||||
//- img.genre-image.back(src=genre.AnimeList[0].Image, alt=genre.AnimeList[0].Title.Romaji, title=genre.AnimeList[0].Title.Romaji + "\n" + genre.Name + " #1")
|
@ -24,6 +24,7 @@ import (
|
||||
"github.com/animenotifier/notify.moe/pages/explore"
|
||||
"github.com/animenotifier/notify.moe/pages/forum"
|
||||
"github.com/animenotifier/notify.moe/pages/genre"
|
||||
"github.com/animenotifier/notify.moe/pages/genres"
|
||||
"github.com/animenotifier/notify.moe/pages/group"
|
||||
"github.com/animenotifier/notify.moe/pages/groups"
|
||||
"github.com/animenotifier/notify.moe/pages/home"
|
||||
@ -202,6 +203,6 @@ func Configure(app *aero.Application) {
|
||||
app.Post("/api/paypal/payment/create", paypal.CreatePayment)
|
||||
|
||||
// Genres
|
||||
// l.Page("/genres", genres.Get)
|
||||
l.Page("/genres", genres.Get)
|
||||
l.Page("/genre/:name", genre.Get)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user