2016-11-03 13:01:06 +09:00

20 lines
987 B
Plaintext

component GenreOverview
// TODO: Add this to the stylus file later
style!= "h2{ text-align: center; } .light-button{ display: inline-block; }"
section
header
h2 Genres
div
each genre in Genres
a.light-button.ajax(href="/genres/" + arn.FixGenre(genre))
Icon(GenreIcons[genre])
span= genre
component AnimeInGenre(genre string, animeList []*arn.Anime)
style!= "h2 { text-align: center; } .genre-anime-list{ display: flex; flex-flow: row wrap; float: none !important; justify-content: center; } .genre-anime-image{ width: 16vw; height: 9vw; min-width: 100px; min-height: 141px; max-width: 200px; max-height: 282px; object-fit: cover; } .genre-anime-link{ margin: 0.5em; flex-grow: 0; flex-shrink: 0; }"
h2= "#" + genre
.genre-anime-list
each anime in animeList
a.genre-anime-link.ajax(href="/anime/" + s(anime.ID))
img.anime-image.genre-anime-image(src=anime.Image, alt=anime.Title.Romaji, title=anime.Title.Romaji + " (" + s(anime.Watching) + ")")