41 lines
1.6 KiB
Plaintext
Raw Normal View History

2017-06-27 21:33:21 +00:00
component SoundTrack(track *arn.SoundTrack)
2018-03-11 14:43:17 +00:00
.soundtrack.mountable(id=track.ID)
2018-03-11 19:22:33 +00:00
SoundTrackContent(track)
2017-10-12 15:52:46 +00:00
SoundTrackFooter(track)
2018-03-11 19:22:33 +00:00
component SoundTrackContent(track *arn.SoundTrack)
2018-03-11 14:43:17 +00:00
.soundtrack-content
2017-10-12 15:52:46 +00:00
if track.MainAnime() != nil
a.soundtrack-anime-link(href="/anime/" + track.MainAnime().ID)
2018-03-20 21:39:21 +00:00
img.soundtrack-anime-image.lazy(data-src=track.MainAnime().ImageLink("medium"), data-webp="true", data-color=track.MainAnime().AverageColor(), alt=track.MainAnime().Title.Canonical, title=track.MainAnime().Title.Canonical)
2017-11-09 17:31:32 +00:00
2018-03-11 19:22:33 +00:00
SoundTrackMedia(track)
component SoundTrackMedia(track *arn.SoundTrack)
if track.File != ""
.soundtrack-media
.soundtrack-play-area.action(data-action="toggleAudio", data-trigger="click", data-audio-src="https://notify.moe/audio/" + track.File, data-soundtrack-id=track.ID)
2018-04-08 20:50:23 +00:00
img.soundtrack-image.lazy(data-src="https://img.youtube.com/vi/" + track.MediaByService("Youtube")[0].ServiceID + "/0.jpg", alt=track.Title)
2018-03-11 19:22:33 +00:00
button.soundtrack-play-button
RawIcon("play")
.soundtrack-visualizer
.visualizer-box.visualizer-box-1
.visualizer-box.visualizer-box-2
.visualizer-box.visualizer-box-3
else
ExternalMedia(track.Media[0])
2017-10-12 15:52:46 +00:00
component SoundTrackFooter(track *arn.SoundTrack)
2018-03-11 14:43:17 +00:00
.soundtrack-footer
2018-04-08 20:50:23 +00:00
if track.Title.ByUser(nil) == ""
a(href=track.Link() + "/edit") untitled
2017-10-12 15:52:46 +00:00
else
2018-04-08 20:50:23 +00:00
a(href=track.Link())= track.Title.ByUser(nil)
2017-11-09 19:39:49 +00:00
span posted
2017-10-16 08:22:22 +00:00
span.utc-date(data-date=track.Created)
2017-11-09 19:39:49 +00:00
span by
a(href=track.Creator().Link())= track.Creator().Nick + " "
2017-10-12 15:52:46 +00:00
component ExternalMedia(media *arn.ExternalMedia)
iframe.lazy(data-src=media.EmbedLink(), allowfullscreen="allowfullscreen")