refactor: use posterURL in templates

This commit is contained in:
2026-06-09 19:10:16 +02:00
parent ea518a7d0a
commit 470039d9e9
5 changed files with 37 additions and 50 deletions

View File

@@ -7,12 +7,7 @@
{{$hasTopBadge := .HasTopBadge}}
{{$dataId := printf "id-%d" $anime.MalID}}
{{$imageUrl := "https://placehold.co/400x600?text=No+Image"}}
{{if $anime.Images.Webp.LargeImageURL}}
{{$imageUrl = $anime.Images.Webp.LargeImageURL}}
{{else if $anime.Images.Jpg.LargeImageURL}}
{{$imageUrl = $anime.Images.Jpg.LargeImageURL}}
{{end}}
{{$imageUrl := posterURL $anime.Images.Webp.LargeImageURL $anime.Images.Jpg.LargeImageURL 400 600}}
{{$displayTitle := $anime.DisplayTitle}}