30 lines
1.2 KiB
Plaintext
30 lines
1.2 KiB
Plaintext
component AnimeEpisodes(anime *arn.Anime, episodes []*arn.AnimeEpisode, episodeToFriends map[int][]*arn.User, user *arn.User, standAlonePage bool)
|
|
if standAlonePage
|
|
h1.mountable
|
|
a(href=anime.Link())= anime.Title.ByUser(user)
|
|
|
|
if len(episodes) > 0
|
|
.anime-section.mountable
|
|
h3.anime-section-name
|
|
a(href=anime.Episodes().Link()) Episodes
|
|
|
|
.episodes
|
|
for index, episode := range episodes
|
|
a.episode.mountable(href=anime.Link() + "/episode/" + strconv.Itoa(episode.Number), data-mountable-type="episode", data-available=episode.Available())
|
|
.episode-number
|
|
if episode.Number != -1
|
|
span= episode.Number
|
|
|
|
if episode.Title.Japanese != ""
|
|
span.episode-title= episode.Title.Japanese
|
|
else
|
|
span.episode-title -
|
|
|
|
if validate.DateTime(episode.AiringDate.Start)
|
|
.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()
|
|
|
|
if episodeToFriends != nil
|
|
.episode-friends
|
|
each friend in episodeToFriends[index+1]
|
|
AvatarNoLink(friend)
|