Added webp

This commit is contained in:
Eduard Urbach 2017-11-09 19:24:29 +01:00
parent 3e9c2dc746
commit 06da1b9455
6 changed files with 6 additions and 6 deletions

View File

@ -2,4 +2,4 @@ component AnimeGrid(animeList []*arn.Anime)
.anime-grid .anime-grid
each anime in animeList each anime in animeList
a.anime-grid-cell.ajax(href="/anime/" + toString(anime.ID)) a.anime-grid-cell.ajax(href="/anime/" + toString(anime.ID))
img.anime-grid-image.lazy(data-src=anime.Image("medium"), alt=anime.Title.Romaji, title=anime.Title.Romaji) img.anime-grid-image.lazy(data-src=anime.Image("medium"), data-webp="true", alt=anime.Title.Romaji, title=anime.Title.Romaji)

View File

@ -149,7 +149,7 @@ component AnimeRelations(anime *arn.Anime, user *arn.User)
.anime-relations .anime-relations
each relation in anime.Relations().Items each relation in anime.Relations().Items
a.anime-relation.mountable.ajax(href=relation.Anime().Link(), title=relation.Anime().Title.ByUser(user), data-mountable-type="relation") a.anime-relation.mountable.ajax(href=relation.Anime().Link(), title=relation.Anime().Title.ByUser(user), data-mountable-type="relation")
img.anime-relation-image.lazy(data-src=relation.Anime().Image("small"), alt=relation.Anime().Title.ByUser(user)) img.anime-relation-image.lazy(data-src=relation.Anime().Image("small"), , data-webp="true", alt=relation.Anime().Title.ByUser(user))
.anime-relation-type= relation.HumanReadableType() .anime-relation-type= relation.HumanReadableType()
.anime-relation-year .anime-relation-year
if relation.Anime().StartDate != "" if relation.Anime().StartDate != ""

View File

@ -45,7 +45,7 @@ component AnimeList(animeList *arn.AnimeList, viewUser *arn.User, user *arn.User
tr.anime-list-item.mountable(title=item.Notes, data-api="/api/animelist/" + animeList.UserID + "/field/Items[AnimeID=\"" + item.AnimeID + "\"]") tr.anime-list-item.mountable(title=item.Notes, data-api="/api/animelist/" + animeList.UserID + "/field/Items[AnimeID=\"" + item.AnimeID + "\"]")
td.anime-list-item-image-container td.anime-list-item-image-container
a.ajax(href=item.Anime().Link()) a.ajax(href=item.Anime().Link())
img.anime-list-item-image.lazy(data-src=item.Anime().Image("small"), alt=item.Anime().Title.ByUser(user)) img.anime-list-item-image.lazy(data-src=item.Anime().Image("small"), , data-webp="true", alt=item.Anime().Title.ByUser(user))
td.anime-list-item-name td.anime-list-item-name
a.ajax(href=item.Link(animeList.User().Nick))= item.Anime().Title.ByUser(user) a.ajax(href=item.Link(animeList.User().Nick))= item.Anime().Title.ByUser(user)

View File

@ -20,7 +20,7 @@ component CompareAnimeList(a *arn.User, b *arn.User, countA int, countB int, com
tr.anime-list-item.mountable tr.anime-list-item.mountable
td.anime-list-item-image-container td.anime-list-item-image-container
a.ajax(href=comparison.Anime.Link()) a.ajax(href=comparison.Anime.Link())
img.anime-list-item-image.lazy(data-src=comparison.Anime.Image("small"), alt=comparison.Anime.Title.ByUser(user)) img.anime-list-item-image.lazy(data-src=comparison.Anime.Image("small"), data-webp="true", alt=comparison.Anime.Title.ByUser(user))
td.anime-list-item-name td.anime-list-item-name
a.ajax(href=comparison.Anime.Link())= comparison.Anime.Title.ByUser(user) a.ajax(href=comparison.Anime.Link())= comparison.Anime.Title.ByUser(user)

View File

@ -111,7 +111,7 @@ component Profile(viewUser *arn.User, user *arn.User, animeList *arn.AnimeList,
each item in animeList.Items each item in animeList.Items
if item.Status == arn.AnimeListStatusWatching || item.Status == arn.AnimeListStatusCompleted if item.Status == arn.AnimeListStatusWatching || item.Status == arn.AnimeListStatusCompleted
a.profile-watching-list-item.ajax(href=item.Anime().Link(), title=item.Anime().Title.ByUser(user) + " (" + toString(item.Episodes) + " / " + arn.EpisodesToString(item.Anime().EpisodeCount) + ")") a.profile-watching-list-item.ajax(href=item.Anime().Link(), title=item.Anime().Title.ByUser(user) + " (" + toString(item.Episodes) + " / " + arn.EpisodesToString(item.Anime().EpisodeCount) + ")")
img.profile-watching-list-item-image.lazy(data-src=item.Anime().Image("small"), alt=item.Anime().Title.ByUser(user)) img.profile-watching-list-item-image.lazy(data-src=item.Anime().Image("small"), data-webp="true", alt=item.Anime().Title.ByUser(user))
if user != nil && (user.Role == "admin" || user.Role == "editor") if user != nil && (user.Role == "admin" || user.Role == "editor")
.footer .footer

View File

@ -20,7 +20,7 @@ component Track(track *arn.SoundTrack, user *arn.User)
.sound-track-anime-list .sound-track-anime-list
each anime in track.Anime() each anime in track.Anime()
a.sound-track-anime-list-item.ajax(href=anime.Link(), title=anime.Title.Canonical) a.sound-track-anime-list-item.ajax(href=anime.Link(), title=anime.Title.Canonical)
img.sound-track-anime-list-item-image.lazy(data-src=anime.Image("small"), alt=anime.Title.Canonical) img.sound-track-anime-list-item-image.lazy(data-src=anime.Image("small"), data-webp="true", alt=anime.Title.Canonical)
if len(track.Beatmaps()) > 0 if len(track.Beatmaps()) > 0
.widget.mountable .widget.mountable