44 lines
1.9 KiB
Plaintext

component AnimeEpisodes(episodes []*arn.AnimeEpisode, user *arn.User)
if len(episodes) > 0
.anime-section.mountable
h3.anime-section-name Episodes
.episodes
each episode in episodes
.episode.mountable(data-mountable-type="episode")
.episode-number
if episode.Number != -1
span= episode.Number
.episode-title= episode.Title.Japanese
//- if episode.Title.Japanese != ""
//- Japanese(episode.Title.Japanese)
//- else
//- span -
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