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()) .post-toolbar(id="toolbar-" + post.ID())
.spacer .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 != nil
if user.ID != post.Creator().ID if user.ID != post.Creator().ID
if post.LikedBy(user.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") Icon("thumbs-down")
else 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") Icon("thumbs-up")
if user.ID == post.Creator().ID 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") Icon("pencil")
if post.Type() != "Thread" if post.Type() != "Thread"
if user != nil && (user.Role == "admin" || user.Role == "editor") 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") 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") Icon("link")
//- if type === "Messages" && user && (user.ID === post.authorId || user.ID === post.recipientId) //- 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) component SoundTrackContent(track *arn.SoundTrack)
.soundtrack-content .soundtrack-content
if track.MainAnime() != nil if track.MainAnime() != nil
a.soundtrack-anime-link(href="/anime/" + track.MainAnime().ID) 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, title=track.MainAnime().Title.Canonical) 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) SoundTrackMedia(track)

View File

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

View File

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