Some style changes
This commit is contained in:
@ -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
|
.tabs
|
||||||
Tab("Soundtrack", "music", track.Link())
|
Tab("Soundtrack", "music", track.Link())
|
||||||
Tab("Edit", "pencil", track.Link() + "/edit")
|
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
|
color text-color
|
||||||
background-color tab-hover-background
|
background-color tab-hover-background
|
||||||
text-shadow none
|
text-shadow none
|
||||||
|
cursor pointer
|
||||||
|
|
||||||
:active
|
:active
|
||||||
transform none
|
transform none
|
||||||
|
Reference in New Issue
Block a user