From 4eae5d55be289e6bd081ac0d3a885ac6a5055e95 Mon Sep 17 00:00:00 2001 From: mkelvers Date: Tue, 21 Apr 2026 12:23:17 +0200 Subject: [PATCH] fix: make anime poster fully clickable --- web/components/anime_card.templ | 45 +++++++++++++-------------------- 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/web/components/anime_card.templ b/web/components/anime_card.templ index 734ef06..4414a82 100644 --- a/web/components/anime_card.templ +++ b/web/components/anime_card.templ @@ -11,20 +11,18 @@ type AnimeCardProps struct { Title string ImageURL string Href string - // Options to customize the card behavior - Class string // override default wrapper class - ImgClass string // override default image class - TitleClass string // override default title class - HideTitle bool // if true, do not render the default title block - CurrentNode bool // if true, renders a div instead of an anchor tag (useful for graph nodes) - Synopsis string // optional synopsis for hover detail - PlayHref string // optional play button href (anchored to poster) - // Watchlist integration + Class string + ImgClass string + TitleClass string + HideTitle bool + CurrentNode bool + Synopsis string + PlayHref string TitleEnglish string TitleJapanese string Airing bool - WatchlistStatus string // empty if not in watchlist - DisableWatchlist bool // if true, don't render the watchlist button + WatchlistStatus string + DisableWatchlist bool } templ AnimeCard(props AnimeCardProps) { @@ -55,20 +53,11 @@ func cardHref(props AnimeCardProps) string { } templ animeCardPoster(props AnimeCardProps) { -
- - if !props.CurrentNode { - - @animeCardImage(props) - - } else { -
- @animeCardImage(props) -
- } - +
+
+ @animeCardImage(props) +
- if props.Synopsis != "" {
@@ -77,10 +66,12 @@ templ animeCardPoster(props AnimeCardProps) {
} - + if !props.CurrentNode { + + } if props.PlayHref != "" || !props.CurrentNode && !props.DisableWatchlist { -
-
+
+
if props.PlayHref != "" {