56 lines
1.6 KiB
Plaintext
Raw Normal View History

2017-11-05 18:54:58 +00:00
component Track(track *arn.SoundTrack, user *arn.User)
SoundTrackTabs(track, user)
2017-10-12 22:44:19 +00:00
.sound-track-full-page
if track.Title == ""
h1.mountable untitled
else
h1.mountable= track.Title
2017-06-27 22:16:45 +00:00
2017-10-12 22:44:19 +00:00
.widget-form.sound-track-media-list
each media in track.Media
.widget.mountable
h3.widget-title= media.Service
.sound-track-media.video-container
iframe.lazy.video(data-src=media.EmbedLink(), allowfullscreen="allowfullscreen")
2017-11-05 18:54:58 +00:00
2017-10-15 23:26:41 +00:00
.widget.mountable
h3.widget-title Anime
.sound-track-anime-list
each anime in track.Anime()
2017-11-19 14:15:44 +00:00
a.sound-track-anime-list-item.ajax(href=anime.Link(), title=anime.Title.ByUser(user))
img.sound-track-anime-list-item-image.lazy(data-src=anime.Image("small"), data-webp="true", alt=anime.Title.ByUser(user))
2017-11-05 18:54:58 +00:00
2017-10-22 12:36:55 +00:00
if len(track.Beatmaps()) > 0
.widget.mountable
h3.widget-title Beatmaps
ul.beatmaps
for index, beatmap := range track.Beatmaps()
li
a.beatmap(href="https://osu.ppy.sh/s/" + beatmap, target="_blank")= "Beatmap #" + strconv.Itoa(index + 1)
2017-10-15 18:19:45 +00:00
.widget.mountable
h3.widget-title Tags
2017-10-15 23:35:28 +00:00
.tags
2017-10-15 18:19:45 +00:00
each tag in track.Tags
2017-10-15 23:35:28 +00:00
.tag= tag
.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
2017-10-12 22:44:19 +00:00
span= track.EditedByUser().Nick
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-03-01 13:39:43 +00:00
TabLike(strconv.Itoa(len(track.Likes)), "heart", "track", track, user)
2017-10-12 15:52:46 +00:00
Tab("Soundtrack", "music", track.Link())
2017-11-05 18:54:58 +00:00
Tab("Edit", "pencil", track.Link() + "/edit")