42 lines
1.7 KiB
Plaintext
42 lines
1.7 KiB
Plaintext
component SoundTrack(track *arn.SoundTrack)
|
|
SoundTrackMedia(track, track.Media[0])
|
|
|
|
component SoundTrackMedia(track *arn.SoundTrack, media *arn.ExternalMedia)
|
|
.soundtrack.mountable(id=track.ID)
|
|
SoundTrackContent(track, media)
|
|
SoundTrackFooter(track)
|
|
|
|
component SoundTrackContent(track *arn.SoundTrack, media *arn.ExternalMedia)
|
|
.soundtrack-content
|
|
if track.MainAnime() != nil
|
|
a.soundtrack-anime-link.ajax(href="/anime/" + track.MainAnime().ID)
|
|
img.soundtrack-anime-image.lazy(data-src=track.MainAnime().Image("medium"), data-webp="true", alt=track.MainAnime().Title.Canonical, title=track.MainAnime().Title.Canonical)
|
|
|
|
if track.File != "" && media.Service == "Youtube"
|
|
.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)
|
|
img.soundtrack-image.lazy(data-src="https://img.youtube.com/vi/" + media.ServiceID + "/maxresdefault.jpg", alt=track.Title)
|
|
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(media)
|
|
|
|
component SoundTrackFooter(track *arn.SoundTrack)
|
|
.soundtrack-footer
|
|
if track.Title == ""
|
|
a.ajax(href=track.Link() + "/edit") untitled
|
|
else
|
|
a.ajax(href=track.Link())= track.Title
|
|
span posted
|
|
span.utc-date(data-date=track.Created)
|
|
span by
|
|
a.ajax(href=track.Creator().Link())= track.Creator().Nick + " "
|
|
|
|
component ExternalMedia(media *arn.ExternalMedia)
|
|
iframe.lazy(data-src=media.EmbedLink(), allowfullscreen="allowfullscreen") |