Added more tooltip locations

This commit is contained in:
Eduard Urbach 2018-04-18 15:07:46 +02:00
parent d25ad77715
commit 976563ed60
4 changed files with 19 additions and 12 deletions

View File

@ -27,27 +27,27 @@ component Postable(post arn.Postable, user *arn.User, highlightAuthorID string)
.post-toolbar(id="toolbar-" + post.ID())
.spacer
.post-likes(id="likes-" + post.ID(), title="Likes")= len(post.Likes())
.post-likes.tip(id="likes-" + post.ID(), aria-label=arn.Plural(len(post.Likes()), "like"))= "+" + strconv.Itoa(len(post.Likes()))
if user != nil
if user.ID != post.Creator().ID
if post.LikedBy(user.ID)
a.post-tool.post-unlike.action(id="unlike-" + post.ID(), title="Unlike", data-action="unlike", data-trigger="click")
a.post-tool.post-unlike.tip.action(id="unlike-" + post.ID(), aria-label="Unlike", data-action="unlike", data-trigger="click")
Icon("thumbs-down")
else
a.post-tool.post-like.action(id="like-" + post.ID(), title="Like", data-action="like", data-trigger="click")
a.post-tool.post-like.tip.action(id="like-" + post.ID(), aria-label="Like", data-action="like", data-trigger="click")
Icon("thumbs-up")
if user.ID == post.Creator().ID
a.post-tool.post-edit.action(data-action="editPost", data-trigger="click", data-id=post.ID(), title="Edit")
a.post-tool.post-edit.tip.action(data-action="editPost", data-trigger="click", data-id=post.ID(), aria-label="Edit")
Icon("pencil")
if post.Type() != "Thread"
if user != nil && (user.Role == "admin" || user.Role == "editor")
a.post-tool.post-delete.action(data-action="deletePost", data-trigger="click", data-id=post.ID(), title="Delete")
a.post-tool.post-delete.tip.action(data-action="deletePost", data-trigger="click", data-id=post.ID(), aria-label="Delete")
Icon("trash")
a.post-tool.post-permalink(href=post.Link(), title="Permalink")
a.post-tool.post-permalink.tip(href=post.Link(), aria-label="Link")
Icon("link")
//- if type === "Messages" && user && (user.ID === post.authorId || user.ID === post.recipientId)

View File

@ -6,8 +6,8 @@ component SoundTrack(track *arn.SoundTrack)
component SoundTrackContent(track *arn.SoundTrack)
.soundtrack-content
if track.MainAnime() != nil
a.soundtrack-anime-link(href="/anime/" + track.MainAnime().ID)
img.soundtrack-anime-image.lazy(data-src=track.MainAnime().ImageLink("medium"), data-webp="true", data-color=track.MainAnime().AverageColor(), alt=track.MainAnime().Title.Canonical, title=track.MainAnime().Title.Canonical)
a.soundtrack-anime-link.tip(href="/anime/" + track.MainAnime().ID, aria-label=track.MainAnime().Title.ByUser(nil))
img.soundtrack-anime-image.lazy(data-src=track.MainAnime().ImageLink("medium"), data-webp="true", data-color=track.MainAnime().AverageColor(), alt=track.MainAnime().Title.Canonical)
SoundTrackMedia(track)

View File

@ -11,7 +11,6 @@
.soundtrack-content
horizontal
border-radius ui-element-border-radius
overflow hidden
box-shadow shadow-light
min-height 200px
@ -22,6 +21,7 @@
object-fit cover
width 100%
height 100%
border-radius ui-element-border-radius
filter brightness(100%)
transition filter transition-speed ease
@ -124,7 +124,16 @@ animation change-color
.soundtrack-anime-link
display block
.soundtrack-anime-image
border-bottom-right-radius 0
border-top-right-radius 0
.soundtrack-image
border-bottom-left-radius 0
border-top-left-radius 0
.soundtrack-anime-image
width anime-image-medium-width
height anime-image-medium-height
border-radius ui-element-border-radius
object-fit cover

View File

@ -100,10 +100,8 @@ post-content-padding-y = 0.75rem
opacity 1
.post-likes
opacity 0.4
color hsla(text-color-h, text-color-s, text-color-l, 0.4)
margin-right 0.4em
&:before
content "+"
.post-permalink
color post-permalink-color