43 lines
2.0 KiB
Plaintext
Raw Normal View History

2017-12-04 20:07:13 +00:00
component AnimeEpisodes(anime *arn.Anime, episodes []*arn.AnimeEpisode, user *arn.User)
2017-11-05 08:32:46 +00:00
if len(episodes) > 0
2017-11-05 10:02:31 +00:00
.anime-section.mountable
2017-11-05 08:32:46 +00:00
h3.anime-section-name Episodes
2017-12-04 14:32:59 +00:00
.episodes
each episode in episodes
2017-12-04 20:58:55 +00:00
a.episode.ajax.mountable(href=anime.Link() + "/episode/" + strconv.Itoa(episode.Number), data-mountable-type="episode", data-available=episode.Available())
2017-12-04 14:32:59 +00:00
.episode-number
if episode.Number != -1
span= episode.Number
2017-12-04 20:07:13 +00:00
.episode-title
if episode.Title.Japanese != ""
span= episode.Title.Japanese
else
span -
2017-12-04 14:32:59 +00:00
if validator.IsValidDate(episode.AiringDate.Start)
.episode-airing-date-start.utc-airing-date(data-start-date=episode.AiringDate.Start, data-end-date=episode.AiringDate.End, data-episode-number=episode.Number)= episode.AiringDate.StartDateHuman()
//- table.episodes
//- tbody
//- each episode in episodes
//- tr.episode.mountable(data-mountable-type="episode")
//- td.episode-number
//- if episode.Number != -1
//- span= episode.Number
//- td.episode-title
//- if episode.Title.Japanese != ""
//- Japanese(episode.Title.Japanese)
//- else
//- span -
//- if user != nil && user.Location.CountryName != "Japan"
//- td.episode-actions
//- for name, link := range episode.Links
//- a(href=link, target="_blank", rel="noopener", title="Watch episode " + toString(episode.Number) + " on " + name)
//- RawIcon("eye")
//- //- a(href="https://translate.google.com/#ja/en/" + episode.Title.Japanese, target="_blank", rel="noopener")
//- //- RawIcon("google")
//- if validator.IsValidDate(episode.AiringDate.Start)
//- td.episode-airing-date-start.utc-airing-date(data-start-date=episode.AiringDate.Start, data-end-date=episode.AiringDate.End, data-episode-number=episode.Number)= episode.AiringDate.StartDateHuman()
//- else
//- td.episode-airing-date-start