55 lines
1.6 KiB
Plaintext
Raw Normal View History

2017-11-12 10:18:16 +00:00
component ExploreAnime(animeList []*arn.Anime, year string, status string, typ string, user *arn.User)
2018-03-23 00:43:45 +00:00
#filter-root(data-url="/explore/anime")
ExploreFilters(year, status, typ, false)
2017-11-07 16:46:39 +00:00
.corner-buttons-hide-on-mobile
2018-03-17 21:09:17 +00:00
if user != nil
button.action(data-trigger="click", data-action="hideAddedAnime", title="Hide anime in my collection")
RawIcon("eye-slash")
a.button(href="/explore/color/any/anime", title="View colors")
2018-03-21 21:57:06 +00:00
RawIcon("paint-brush")
a.button(href="/genres", title="View genres")
RawIcon("clone")
2017-11-07 16:46:39 +00:00
h1.page-title Explore
.explore-anime
if len(animeList) == 0
p.no-data.mountable No anime found using the above filters.
else
AnimeGrid(animeList, user)
2017-11-07 16:46:39 +00:00
2018-03-25 16:27:24 +00:00
component ExploreFilters(year string, status string, typ string, advancedFilters bool)
2017-11-07 16:46:39 +00:00
.explore-filters
2018-03-23 00:43:45 +00:00
select#filter-year.action(value=year, data-action="filterAnime", data-trigger="change")
2018-03-25 16:27:24 +00:00
if advancedFilters
2018-03-23 00:43:45 +00:00
option(value="")
2017-11-07 16:46:39 +00:00
for year := time.Now().Year()+1; year >= 1951; year--
option(value=year)= year
2018-03-23 00:43:45 +00:00
select#filter-status.action(value=status, data-action="filterAnime", data-trigger="change")
2018-03-25 16:27:24 +00:00
if advancedFilters
2018-03-23 00:43:45 +00:00
option(value="")
2017-11-07 16:46:39 +00:00
option(value="current") Current
option(value="upcoming") Upcoming
option(value="finished") Finished
2018-03-25 16:27:24 +00:00
if advancedFilters
option(value="tba") TBA
2018-03-23 00:43:45 +00:00
select#filter-type.action(value=typ, data-action="filterAnime", data-trigger="change")
2018-03-25 16:27:24 +00:00
if advancedFilters
2018-03-23 00:43:45 +00:00
option(value="")
2017-11-07 16:46:39 +00:00
option(value="tv") TV
option(value="movie") Movie
option(value="ova") OVA
option(value="ona") ONA
2018-03-25 16:27:24 +00:00
option(value="special") Special
if advancedFilters
option(value="music") Music