2018-04-09 16:17:21 +00:00
|
|
|
component AnimeEpisodes(anime *arn.Anime, episodes []*arn.AnimeEpisode, user *arn.User, standAlonePage bool)
|
|
|
|
if standAlonePage
|
|
|
|
h1.mountable
|
|
|
|
a(href=anime.Link())= anime.Title.ByUser(user)
|
|
|
|
|
2017-11-05 08:32:46 +00:00
|
|
|
if len(episodes) > 0
|
2017-11-05 10:02:31 +00:00
|
|
|
.anime-section.mountable
|
2018-04-09 16:17:21 +00:00
|
|
|
h3.anime-section-name
|
|
|
|
a(href=anime.Episodes().Link()) Episodes
|
|
|
|
|
2017-12-04 14:32:59 +00:00
|
|
|
.episodes
|
|
|
|
each episode in episodes
|
2018-03-23 20:33:19 +00:00
|
|
|
a.episode.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
|
|
|
|
|
2018-07-02 13:51:56 +00:00
|
|
|
if episode.Title.Japanese != ""
|
|
|
|
span.episode-title= episode.Title.Japanese
|
|
|
|
else
|
|
|
|
span.episode-title -
|
2017-12-04 14:32:59 +00:00
|
|
|
|
2018-04-13 19:31:55 +00:00
|
|
|
if validate.DateTime(episode.AiringDate.Start)
|
2018-04-18 12:34:33 +00:00
|
|
|
.episode-airing-date-start.utc-airing-date.no-tip(data-start-date=episode.AiringDate.Start, data-end-date=episode.AiringDate.End, data-episode-number=episode.Number)= episode.AiringDate.StartDateHuman()
|
2017-12-04 14:32:59 +00:00
|
|
|
|
|
|
|
//- 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
|
2018-04-25 20:15:42 +00:00
|
|
|
//- a(href=link, target="_blank", rel="noopener", title="Watch episode " + fmt.Sprint(episode.Number) + " on " + name)
|
2017-12-04 14:32:59 +00:00
|
|
|
//- RawIcon("eye")
|
|
|
|
//- //- a(href="https://translate.google.com/#ja/en/" + episode.Title.Japanese, target="_blank", rel="noopener")
|
|
|
|
//- //- RawIcon("google")
|
2018-04-13 19:31:55 +00:00
|
|
|
//- if validate.DateTime(episode.AiringDate.Start)
|
2017-12-04 14:32:59 +00:00
|
|
|
//- 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
|