Improved tooltips
This commit is contained in:
parent
976563ed60
commit
334be053fe
@ -23,7 +23,7 @@ component Postable(post arn.Postable, user *arn.User, highlightAuthorID string)
|
|||||||
Icon("close")
|
Icon("close")
|
||||||
span Cancel
|
span Cancel
|
||||||
|
|
||||||
.post-date.utc-date(data-date=post.Created())
|
.post-date.utc-date.no-tip(data-date=post.Created())
|
||||||
|
|
||||||
.post-toolbar(id="toolbar-" + post.ID())
|
.post-toolbar(id="toolbar-" + post.ID())
|
||||||
.spacer
|
.spacer
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
component Rating(value float64, userCount int, user *arn.User)
|
component Rating(value float64, userCount int, user *arn.User)
|
||||||
if user == nil
|
if user == nil
|
||||||
.anime-rating(title="Rated by " + arn.Plural(userCount, "user"))= fmt.Sprintf("%.1f", value)
|
.anime-rating.tip(aria-label="Rated by " + arn.Plural(userCount, "user"))= fmt.Sprintf("%.1f", value)
|
||||||
else
|
else
|
||||||
.anime-rating(title="Rated by " + arn.Plural(userCount, "user"))= fmt.Sprintf("%." + strconv.Itoa(user.Settings().Format.RatingsPrecision) + "f", value)
|
.anime-rating.tip(aria-label="Rated by " + arn.Plural(userCount, "user"))= fmt.Sprintf("%." + strconv.Itoa(user.Settings().Format.RatingsPrecision) + "f", value)
|
@ -78,6 +78,7 @@ component AnimeRatings(anime *arn.Anime, user *arn.User)
|
|||||||
h3.anime-section-name Ratings
|
h3.anime-section-name Ratings
|
||||||
|
|
||||||
table.anime-info-table
|
table.anime-info-table
|
||||||
|
tbody
|
||||||
tr.mountable(data-mountable-type="info")
|
tr.mountable(data-mountable-type="info")
|
||||||
td.anime-info-key
|
td.anime-info-key
|
||||||
if anime.Status == "upcoming"
|
if anime.Status == "upcoming"
|
||||||
|
@ -58,8 +58,15 @@
|
|||||||
margin 0.25rem
|
margin 0.25rem
|
||||||
|
|
||||||
.anime-info-table
|
.anime-info-table
|
||||||
|
vertical
|
||||||
margin 0
|
margin 0
|
||||||
|
|
||||||
|
tr
|
||||||
|
horizontal
|
||||||
|
|
||||||
|
.anime-info-key
|
||||||
|
flex 1
|
||||||
|
|
||||||
.anime-info-value
|
.anime-info-value
|
||||||
text-align right
|
text-align right
|
||||||
|
|
||||||
@ -152,9 +159,8 @@
|
|||||||
margin-top 0.6rem
|
margin-top 0.6rem
|
||||||
margin-bottom 0.4rem
|
margin-bottom 0.4rem
|
||||||
|
|
||||||
< 800px
|
.anime-rating
|
||||||
.anime-rating-categories
|
// ...
|
||||||
vertical
|
|
||||||
|
|
||||||
.anime-friends
|
.anime-friends
|
||||||
.user-avatars
|
.user-avatars
|
||||||
|
@ -3,7 +3,7 @@ component AnimeListPage(animeListItems []*arn.AnimeListItem, nextIndex int, view
|
|||||||
|
|
||||||
if user.ID != viewUser.ID
|
if user.ID != viewUser.ID
|
||||||
.anime-list-user-avatar
|
.anime-list-user-avatar
|
||||||
Avatar(viewUser)
|
AvatarNoTip(viewUser)
|
||||||
|
|
||||||
StatusTabs("/+" + viewUser.Nick + "/animelist")
|
StatusTabs("/+" + viewUser.Nick + "/animelist")
|
||||||
AnimeListItems(animeListItems, nextIndex, viewUser, user)
|
AnimeListItems(animeListItems, nextIndex, viewUser, user)
|
@ -70,8 +70,8 @@
|
|||||||
.edit-log-date
|
.edit-log-date
|
||||||
display flex
|
display flex
|
||||||
align-items center
|
align-items center
|
||||||
opacity 0.5
|
|
||||||
flex-basis 120px
|
flex-basis 120px
|
||||||
|
half-opacity-text
|
||||||
|
|
||||||
.edit-log-empty
|
.edit-log-empty
|
||||||
opacity 0.25
|
opacity 0.25
|
||||||
|
@ -23,13 +23,7 @@
|
|||||||
margin 0
|
margin 0
|
||||||
|
|
||||||
.quote-footer
|
.quote-footer
|
||||||
text-align center
|
media-footer
|
||||||
margin-bottom 1rem
|
|
||||||
margin-top 0.4rem
|
|
||||||
font-size 0.9em
|
|
||||||
|
|
||||||
span
|
|
||||||
opacity 0.65
|
|
||||||
|
|
||||||
blockquote
|
blockquote
|
||||||
flex-grow 1
|
flex-grow 1
|
||||||
|
@ -123,8 +123,14 @@ export function displayDate(element: HTMLElement, now: Date) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
element.innerText = remainingString
|
element.innerText = remainingString
|
||||||
|
let tooltip = dayNames[startDate.getDay()] + " " + startTime
|
||||||
|
|
||||||
element.title = dayNames[startDate.getDay()] + " " + startTime
|
if(element.classList.contains("no-tip")) {
|
||||||
|
element.title = tooltip
|
||||||
|
} else {
|
||||||
|
element.setAttribute("aria-label", tooltip)
|
||||||
|
element.classList.add("tip")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export function displayTime(element: HTMLElement, now: Date) {
|
export function displayTime(element: HTMLElement, now: Date) {
|
||||||
|
@ -5,4 +5,4 @@ mixin media-footer
|
|||||||
font-size 0.9em
|
font-size 0.9em
|
||||||
|
|
||||||
span
|
span
|
||||||
opacity 0.65
|
color hsla(text-color-h, text-color-s, text-color-l, 0.65)
|
Loading…
Reference in New Issue
Block a user