56 lines
1.5 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
ExternalMedia(media)
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()
a.sound-track-anime-list-item.ajax(href=anime.Link(), title=anime.Title.Canonical)
2017-11-09 18:24:29 +00:00
img.sound-track-anime-list-item-image.lazy(data-src=anime.Image("small"), data-webp="true", alt=anime.Title.Canonical)
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
Tab("Soundtrack", "music", track.Link())
2017-11-05 18:54:58 +00:00
Tab("Edit", "pencil", track.Link() + "/edit")
2017-11-05 19:39:19 +00:00
TabLikeTrack(strconv.Itoa(len(track.Likes)), "heart", track, user)