22 lines
840 B
Plaintext
Raw Normal View History

2018-03-21 22:18:08 +00:00
component ExploreColor(animes []*arn.Anime, nextIndex int, totalCount int, color string, user *arn.User)
2018-03-21 21:57:06 +00:00
h1.page-title Explore anime by color
for saturation := 0.75; saturation >= 0.25; saturation -= 0.25
.tabs.color-stripes
for hue := 0.0; hue < 1.0; hue += 0.05
2018-11-23 10:11:46 +00:00
a.tab.color-stripe.color-box.action(href=fmt.Sprintf("/explore/color/hsl:%.3f,%.2f,0.5/anime", hue, saturation), data-action="diff", data-trigger="click", data-color=fmt.Sprintf("hsl(%.0f, %.0f%%, 50%%)", hue * 360, saturation * 100))
2018-03-21 21:57:06 +00:00
.explore-anime
2018-03-21 22:18:08 +00:00
if totalCount == 0
2018-03-21 21:57:06 +00:00
if color == "any"
p.no-data.mountable Please choose a color.
else
p.no-data.mountable No anime found for the given color.
else
2018-03-21 22:18:08 +00:00
p.text-center.mountable= strconv.Itoa(totalCount) + " anime."
2018-03-21 21:57:06 +00:00
2018-03-21 22:18:08 +00:00
AnimeGrid(animes, user)
if nextIndex != -1
.buttons
LoadMore(nextIndex)