80 lines
2.5 KiB
Plaintext
Raw Normal View History

2018-04-13 15:55:52 +00:00
component ExploreAnime(animes []*arn.Anime, year string, season string, status string, typ string, user *arn.User)
2018-03-23 00:43:45 +00:00
#filter-root(data-url="/explore/anime")
2018-04-13 15:55:52 +00:00
ExploreFilters(year, season, 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
2018-07-05 16:52:05 +00:00
button.action(data-trigger="click", data-action="toggleHideAddedAnime", title="Hide anime in my collection")
2018-03-17 21:09:17 +00:00
RawIcon("eye-slash")
2018-10-31 05:27:48 +00:00
a.button(href="/calendar", title="Calendar")
RawIcon("calendar")
2018-03-27 19:08:26 +00:00
a.button(href="/halloffame", title="Hall of Fame")
RawIcon("trophy")
a.button(href="/genres", title="View genres")
RawIcon("clone")
2018-03-26 21:38:15 +00:00
if user != nil
a.button(href="/explore/sequels", title="View sequels of my completed anime")
RawIcon("forward")
a.button(href="/explore/color/any/anime", title="View colors")
2018-03-21 21:57:06 +00:00
RawIcon("paint-brush")
2017-11-07 16:46:39 +00:00
h1.page-title Explore
.explore-anime
2018-03-26 21:38:15 +00:00
if len(animes) == 0
p.no-data.mountable No anime found using the above filters.
else
2018-03-26 21:38:15 +00:00
AnimeGrid(animes, user)
2017-11-07 16:46:39 +00:00
2018-04-13 15:55:52 +00:00
component ExploreFilters(year string, season string, status string, typ string, advancedFilters bool)
2017-11-07 16:46:39 +00:00
.explore-filters
2018-04-13 15:55:52 +00:00
.filter-select-container
select#filter-year.filter-select.action(value=year, data-action="filterAnime", data-trigger="change")
if advancedFilters
option.option-any(value="") Any
2018-03-23 00:43:45 +00:00
2018-04-13 15:55:52 +00:00
for year := time.Now().Year()+1; year >= 1951; year--
option(value=year)= year
.filter-label Year
2017-11-07 16:46:39 +00:00
2018-04-13 15:55:52 +00:00
.filter-select-container
select#filter-season.filter-select.action(value=season, data-action="filterAnime", data-trigger="change")
option.option-any(value="") Any
option(value="winter") Winter
option(value="spring") Spring
option(value="summer") Summer
option(value="autumn") Autumn
2018-03-23 00:43:45 +00:00
2018-04-13 15:55:52 +00:00
.filter-label Season
2017-11-07 16:46:39 +00:00
2018-04-13 15:55:52 +00:00
.filter-select-container
select#filter-status.filter-select.action(value=status, data-action="filterAnime", data-trigger="change")
option.option-any(value="") Any
option(value="current") Current
option(value="upcoming") Upcoming
option(value="finished") Finished
2018-03-25 16:27:24 +00:00
2018-04-13 15:55:52 +00:00
if advancedFilters
option(value="tba") TBA
.filter-label Status
.filter-select-container
select#filter-type.filter-select.action(value=typ, data-action="filterAnime", data-trigger="change")
option.option-any(value="") Any
option(value="tv") TV
option(value="movie") Movie
option(value="ova") OVA
option(value="ona") ONA
option(value="special") Special
if advancedFilters
option(value="music") Music
.filter-label Type