Highlight added anime in search

This commit is contained in:
Eduard Urbach 2019-11-19 16:51:55 +09:00
parent 5ead082035
commit d5fc67e281
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0
2 changed files with 9 additions and 2 deletions

View File

@ -11,5 +11,12 @@
.profile-watching-list-item
anime-mini-item
[data-added="false"]
transition filter transition-speed ease
filter saturate(0)
:hover
filter saturate(1)
.profile-watching-list-item-image
anime-mini-item-image

View File

@ -80,7 +80,7 @@ component AnimeSearchResults(animes []*arn.Anime, user *arn.User)
else
.profile-watching-list.anime-search
each anime in animes
a.profile-watching-list-item.tip.mountable(href=anime.Link(), aria-label=anime.Title.ByUser(user), data-mountable-type="anime")
a.profile-watching-list-item.tip.mountable(href=anime.Link(), aria-label=anime.Title.ByUser(user), data-mountable-type="anime", data-added=(user != nil && user.AnimeList().Contains(anime.ID)))
img.anime-cover-image.anime-search-result.lazy(data-src=anime.ImageLink("small"), data-webp="true", data-color=anime.AverageColor(), alt=anime.Title.ByUser(user))
component CharacterSearchResults(characters []*arn.Character, user *arn.User)