41 lines
1.9 KiB
Plaintext
Raw Normal View History

2019-08-28 08:06:42 +00:00
component Episode(anime *arn.Anime, episode *arn.Episode, episodeIndex int, uploaded bool, user *arn.User)
h1
a(href=anime.Link())= anime.Title.ByUser(user)
2018-12-08 11:05:17 +00:00
2018-12-10 04:42:29 +00:00
.episode-navigation-container
if episodeIndex > 0
.episode-arrow.episode-arrow-previous
2019-08-28 08:06:42 +00:00
a.light-button(href=episode.Previous().Link(), title="Previous episode")
2018-12-10 04:42:29 +00:00
RawIcon("chevron-left")
2018-12-08 11:05:17 +00:00
2018-12-10 04:42:29 +00:00
.episode-video
if uploaded
.video-container(id="stream-test")
video.video.lazy.action(data-action="toggleFullscreen", data-trigger="dblclick", data-id="stream-test")
source(data-src=fmt.Sprintf("https://arn.sfo2.cdn.digitaloceanspaces.com/videos/anime/%s/%d.webm", anime.ID, episode.Number), data-type="video/webm")
2018-12-11 06:37:15 +00:00
track(label="English", kind="subtitles", srclang="en", src=fmt.Sprintf("/anime/%s/episode/%d/subtitles/en", anime.ID, episode.Number), default)
2018-03-05 18:54:41 +00:00
2018-12-10 04:42:29 +00:00
VideoControls("stream-test", time.Duration(0))
else
.video-container.episode-not-available(title="Episode not available yet")
//- a(href=anime.Link(), title=anime.Title.ByUser(user))
//- img.anime-cover-image.lazy(data-src=anime.ImageLink("large"), data-webp="true", data-color=anime.AverageColor(), alt=anime.Title.ByUser(user))
2019-08-28 08:06:42 +00:00
if episodeIndex < len(anime.Episodes()) - 1
2018-12-10 04:42:29 +00:00
.episode-arrow.episode-arrow-next
2019-08-28 08:06:42 +00:00
a.light-button(href=episode.Next().Link(), title="Next episode")
2018-12-10 04:42:29 +00:00
RawIcon("chevron-right")
h3.episode-view-number= "Episode " + strconv.Itoa(episode.Number)
2018-03-05 18:54:41 +00:00
if episode.Title.Japanese != ""
.episode-view-title
Japanese(episode.Title.Japanese)
2018-04-13 19:31:55 +00:00
if validate.DateTime(episode.AiringDate.Start)
2018-03-05 18:40:04 +00:00
p.episode-view-airing-date
span.utc-airing-date(data-start-date=episode.AiringDate.Start, data-end-date=episode.AiringDate.End, data-episode-number=episode.Number)= episode.AiringDate.StartDateHuman()
2018-12-12 10:53:08 +00:00
.footer
p Make sure to support the anime you're watching by buying officially released Blu-rays and merchandise.