40 lines
1.1 KiB
Plaintext
Raw Normal View History

2018-03-13 21:38:26 +00:00
component SoundTracks(tracks []*arn.SoundTrack, nextIndex int, tag string, user *arn.User)
2017-11-19 16:02:20 +00:00
h1.page-title Soundtracks
2018-03-13 00:49:54 +00:00
SoundTracksTabs(tag)
2017-06-27 12:56:22 +00:00
2017-11-18 23:42:22 +00:00
.corner-buttons
2017-10-15 19:11:12 +00:00
if user != nil
if user.DraftIndex().SoundTrackID == ""
2017-10-17 21:17:04 +00:00
button.action(data-action="newObject", data-trigger="click", data-type="soundtrack")
2017-10-15 19:11:12 +00:00
Icon("plus")
span Add soundtrack
else
a.button(href="/soundtrack/" + user.DraftIndex().SoundTrackID + "/edit")
2017-10-15 19:11:12 +00:00
Icon("pencil")
span Edit draft
2017-06-27 11:06:19 +00:00
2018-03-11 14:43:17 +00:00
#load-more-target.soundtracks
2017-10-16 09:53:47 +00:00
SoundTracksScrollable(tracks, user)
2018-03-13 21:38:26 +00:00
if nextIndex != -1
2017-10-16 10:56:46 +00:00
.buttons
2018-03-13 21:38:26 +00:00
LoadMore(nextIndex)
2017-10-16 09:53:47 +00:00
component SoundTracksScrollable(tracks []*arn.SoundTrack, user *arn.User)
each track in tracks
2017-11-19 16:02:20 +00:00
SoundTrack(track)
2018-03-13 00:49:54 +00:00
component SoundTracksTabs(tag string)
2018-03-13 01:31:01 +00:00
.tab-groups
.tabs
Tab("Latest", "music", "/soundtracks")
Tab("Best", "heart", "/soundtracks/best")
.tabs
Tab("opening", "tag", "/soundtracks/tag/opening")
Tab("ending", "tag", "/soundtracks/tag/ending")
2018-03-13 00:49:54 +00:00
2018-03-13 01:31:01 +00:00
if tag != "" && tag != "opening" && tag != "ending"
.tabs
Tab(tag, "tag", "/soundtracks/tag/" + tag)