2020-02-10 23:11:09 +00:00
|
|
|
component SoundTrackPage(track *arn.SoundTrack, relatedTracks []*arn.SoundTrack, user *arn.User)
|
2017-11-05 18:54:58 +00:00
|
|
|
SoundTrackTabs(track, user)
|
|
|
|
|
2018-03-11 14:43:17 +00:00
|
|
|
.soundtrack-full-page
|
2018-04-08 20:50:23 +00:00
|
|
|
if track.Title.ByUser(user) == ""
|
2017-10-12 22:44:19 +00:00
|
|
|
h1.mountable untitled
|
|
|
|
else
|
2018-04-08 20:50:23 +00:00
|
|
|
h1.mountable= track.Title.ByUser(user)
|
2017-06-27 22:16:45 +00:00
|
|
|
|
2018-03-11 14:43:17 +00:00
|
|
|
.widget-form.soundtrack-media-list
|
2017-10-12 22:44:19 +00:00
|
|
|
each media in track.Media
|
|
|
|
.widget.mountable
|
|
|
|
h3.widget-title= media.Service
|
2018-11-21 06:43:32 +00:00
|
|
|
|
2018-03-11 14:43:17 +00:00
|
|
|
.soundtrack-media.video-container
|
2018-11-21 06:43:32 +00:00
|
|
|
iframe.lazy.video(data-src=media.EmbedLink(), title=media.Service + " media source", allowfullscreen)
|
2018-03-11 02:00:06 +00:00
|
|
|
|
2018-03-11 03:51:10 +00:00
|
|
|
if user != nil && media.Service == "Youtube" && track.File != ""
|
2018-03-11 02:00:06 +00:00
|
|
|
.buttons
|
2018-12-07 00:54:17 +00:00
|
|
|
button.action(data-action="playAudio", data-trigger="click", data-audio-src="/audio/" + track.File, data-media-id=track.ID)
|
2018-03-11 02:00:06 +00:00
|
|
|
Icon("play")
|
|
|
|
span Play in background
|
2017-11-05 18:54:58 +00:00
|
|
|
|
2017-10-15 23:26:41 +00:00
|
|
|
.widget.mountable
|
|
|
|
h3.widget-title Anime
|
|
|
|
|
2018-03-11 14:43:17 +00:00
|
|
|
.soundtrack-anime-list
|
2017-10-15 23:26:41 +00:00
|
|
|
each anime in track.Anime()
|
2018-04-18 11:42:38 +00:00
|
|
|
a.soundtrack-anime-list-item.tip(href=anime.Link(), aria-label=anime.Title.ByUser(user))
|
2018-03-20 21:39:21 +00:00
|
|
|
img.soundtrack-anime-list-item-image.lazy(data-src=anime.ImageLink("small"), data-webp="true", data-color=anime.AverageColor(), alt=anime.Title.ByUser(user))
|
2017-11-05 18:54:58 +00:00
|
|
|
|
2018-03-17 21:31:14 +00:00
|
|
|
if len(track.Links) > 0
|
|
|
|
.widget.mountable
|
|
|
|
h3.widget-title Links
|
|
|
|
ul.soundtrack-links
|
|
|
|
for _, link := range track.Links
|
|
|
|
li
|
|
|
|
a.soundtrack-link(href=link.URL, target="_blank")= link.Title
|
|
|
|
|
2020-02-10 23:11:09 +00:00
|
|
|
if len(relatedTracks) > 0
|
|
|
|
.widget.mountable
|
2020-02-11 11:45:03 +00:00
|
|
|
h3.widget-title Related
|
2020-02-12 04:13:25 +00:00
|
|
|
ul.related-tracks
|
2020-02-10 23:11:09 +00:00
|
|
|
each relatedTrack in relatedTracks
|
2020-02-12 04:13:25 +00:00
|
|
|
li
|
|
|
|
a(href=relatedTrack.Link())= relatedTrack.TitleByUser(user)
|
2021-11-20 12:26:51 +00:00
|
|
|
|
2017-10-15 18:19:45 +00:00
|
|
|
.widget.mountable
|
|
|
|
h3.widget-title Tags
|
2018-03-13 00:49:54 +00:00
|
|
|
|
2017-10-15 23:35:28 +00:00
|
|
|
.tags
|
2017-10-15 18:19:45 +00:00
|
|
|
each tag in track.Tags
|
2018-03-23 20:33:19 +00:00
|
|
|
a.tag(href="/soundtracks/tag/" + tag)= tag
|
2018-10-29 02:56:45 +00:00
|
|
|
|
2018-10-29 02:30:23 +00:00
|
|
|
.widget.mountable
|
|
|
|
h3.widget-title Comments
|
2018-10-29 02:56:45 +00:00
|
|
|
Comments(track, user)
|
2018-03-13 00:49:54 +00:00
|
|
|
|
2019-09-01 07:39:17 +00:00
|
|
|
footer.footer.mountable
|
2017-10-12 22:44:19 +00:00
|
|
|
if track.EditedBy != ""
|
2017-11-13 20:28:03 +00:00
|
|
|
span Edited
|
2017-10-12 22:44:19 +00:00
|
|
|
span.utc-date(data-date=track.Edited)
|
2017-11-13 20:28:03 +00:00
|
|
|
span by
|
2018-04-08 10:01:18 +00:00
|
|
|
span= track.Editor().Nick
|
2017-10-12 22:44:19 +00:00
|
|
|
else
|
2017-11-13 20:28:03 +00:00
|
|
|
span Posted
|
2017-10-12 22:44:19 +00:00
|
|
|
span.utc-date(data-date=track.Created)
|
2017-11-13 20:28:03 +00:00
|
|
|
span by
|
2017-10-18 16:18:15 +00:00
|
|
|
span= track.Creator().Nick
|
2017-11-05 18:54:58 +00:00
|
|
|
|
2017-10-12 22:44:19 +00:00
|
|
|
span .
|
2017-10-12 15:52:46 +00:00
|
|
|
|
2017-11-05 18:54:58 +00:00
|
|
|
component SoundTrackTabs(track *arn.SoundTrack, user *arn.User)
|
2017-10-12 15:52:46 +00:00
|
|
|
.tabs
|
2018-04-19 14:23:14 +00:00
|
|
|
LikeTab(strconv.Itoa(len(track.Likes)), "heart", "track", track, user)
|
2017-10-12 15:52:46 +00:00
|
|
|
Tab("Soundtrack", "music", track.Link())
|
2018-04-13 10:20:13 +00:00
|
|
|
|
|
|
|
if track.HasLyrics()
|
|
|
|
Tab("Lyrics", "font", track.Link() + "/lyrics")
|
|
|
|
|
2018-03-15 21:44:09 +00:00
|
|
|
if user != nil
|
|
|
|
Tab("Edit", "pencil", track.Link() + "/edit")
|
2018-04-13 10:20:13 +00:00
|
|
|
|
2018-03-13 16:59:16 +00:00
|
|
|
Tab("History", "history", track.Link() + "/history")
|