Some style changes
This commit is contained in:
parent
a423e64841
commit
4cdc23d8f7
@ -1,14 +0,0 @@
|
||||
component TabLike(label string, icon string, track *arn.SoundTrack, user *arn.User)
|
||||
if user == nil
|
||||
a.tab.action(aria-label=label)
|
||||
Icon(icon)
|
||||
span.tab-text= label
|
||||
else
|
||||
if track.LikedBy(user.ID)
|
||||
a.tab.action(data-api="/api" + track.Link(), data-action="unlike", data-trigger="click", aria-label=label)
|
||||
Icon(icon)
|
||||
span.tab-text= label
|
||||
else
|
||||
a.tab.action(data-api="/api" + track.Link(), data-action="like", data-trigger="click", aria-label=label)
|
||||
Icon(icon)
|
||||
span.tab-text= label
|
14
mixins/TabLikeTrack.pixy
Normal file
14
mixins/TabLikeTrack.pixy
Normal file
@ -0,0 +1,14 @@
|
||||
component TabLikeTrack(label string, icon string, track *arn.SoundTrack, user *arn.User)
|
||||
if user == nil
|
||||
.tab.action(aria-label=label, title="Login to like this track")
|
||||
Icon(icon)
|
||||
span.tab-text= label
|
||||
else
|
||||
if track.LikedBy(user.ID)
|
||||
.tab.action(data-api="/api" + track.Link(), data-action="unlike", data-trigger="click", aria-label=label, title="Click to unlike this track")
|
||||
Icon(icon)
|
||||
span.tab-text= label
|
||||
else
|
||||
.tab.action(data-api="/api" + track.Link(), data-action="like", data-trigger="click", aria-label=label, title="Click to like this track")
|
||||
Icon(icon + "-o")
|
||||
span.tab-text= label
|
@ -52,4 +52,4 @@ component SoundTrackTabs(track *arn.SoundTrack, user *arn.User)
|
||||
.tabs
|
||||
Tab("Soundtrack", "music", track.Link())
|
||||
Tab("Edit", "pencil", track.Link() + "/edit")
|
||||
TabLike(strconv.Itoa(len(track.Likes)), "heart", track, user)
|
||||
TabLikeTrack(strconv.Itoa(len(track.Likes)), "heart", track, user)
|
||||
|
@ -10,6 +10,7 @@
|
||||
color text-color
|
||||
background-color tab-hover-background
|
||||
text-shadow none
|
||||
cursor pointer
|
||||
|
||||
:active
|
||||
transform none
|
||||
|
Loading…
Reference in New Issue
Block a user