2018-04-14 21:51:18 +00:00
|
|
|
component AMV(amv *arn.AMV, user *arn.User)
|
|
|
|
.amv.mountable
|
2018-04-19 13:04:25 +00:00
|
|
|
AMVVideo(amv)
|
2018-04-15 08:36:51 +00:00
|
|
|
AMVFooter(amv, user)
|
|
|
|
|
2018-04-19 13:04:25 +00:00
|
|
|
component AMVMini(amv *arn.AMV, user *arn.User)
|
|
|
|
.amv.mountable
|
|
|
|
AMVVideo(amv)
|
|
|
|
AMVMiniFooter(amv, user)
|
|
|
|
|
|
|
|
component AMVVideo(amv *arn.AMV)
|
2018-12-07 19:40:27 +00:00
|
|
|
.video-container(id=amv.ID, data-api="/api/amv/" + amv.ID)
|
2018-12-07 00:54:17 +00:00
|
|
|
video.video.media-play-area.lazy.action(data-action="playVideo", data-trigger="click", data-media-id=amv.ID)
|
2018-04-19 13:04:25 +00:00
|
|
|
source(data-src="https://notify.moe/videos/amvs/" + amv.File, data-type="video/webm")
|
|
|
|
|
2018-12-07 00:54:17 +00:00
|
|
|
//- button.media-play-button
|
|
|
|
//- RawIcon("play")
|
|
|
|
|
|
|
|
.video-controls
|
2018-12-07 20:19:50 +00:00
|
|
|
.video-progress-bar
|
|
|
|
.video-current-progress
|
|
|
|
|
|
|
|
.video-time= fmt.Sprintf("%d:%02d", int(amv.Info.Duration.Minutes()), int(amv.Info.Duration.Seconds()) % 60)
|
2018-12-07 19:40:27 +00:00
|
|
|
|
|
|
|
//- button.video-control.action(data-action="like", data-trigger="click")
|
|
|
|
//- RawIcon("heart-o")
|
|
|
|
|
|
|
|
button.video-control.action(data-action="toggleFullscreen", data-trigger="click", data-id=amv.ID, aria-label="Fullscreen")
|
2018-12-07 00:54:17 +00:00
|
|
|
RawIcon("square-o")
|
|
|
|
|
2018-04-15 08:36:51 +00:00
|
|
|
component AMVFooter(amv *arn.AMV, user *arn.User)
|
|
|
|
.amv-footer
|
|
|
|
if amv.Title.ByUser(user) == ""
|
|
|
|
a(href=amv.Link() + "/edit") untitled
|
|
|
|
else
|
|
|
|
a(href=amv.Link())= amv.Title.ByUser(user)
|
|
|
|
span posted
|
2018-04-19 13:04:25 +00:00
|
|
|
span.utc-date.no-tip(data-date=amv.Created)
|
2018-04-15 08:36:51 +00:00
|
|
|
span by
|
2018-04-19 13:04:25 +00:00
|
|
|
a(href=amv.Creator().Link())= amv.Creator().Nick + " "
|
|
|
|
|
|
|
|
component AMVMiniFooter(amv *arn.AMV, user *arn.User)
|
|
|
|
.amv-footer
|
|
|
|
if amv.Title.ByUser(user) == ""
|
|
|
|
a(href=amv.Link() + "/edit") untitled
|
|
|
|
else
|
|
|
|
a(href=amv.Link())= amv.Title.ByUser(user)
|