From 0385b0682d7acdf06001c6b5a603d5b45085be44 Mon Sep 17 00:00:00 2001 From: mkelvers Date: Mon, 20 Apr 2026 16:03:44 +0200 Subject: [PATCH] feat(components): extract anime recommendations component --- web/components/anime/recommendations.templ | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 web/components/anime/recommendations.templ diff --git a/web/components/anime/recommendations.templ b/web/components/anime/recommendations.templ new file mode 100644 index 0000000..0b8c670 --- /dev/null +++ b/web/components/anime/recommendations.templ @@ -0,0 +1,25 @@ +package anime + +import ( + "mal/integrations/jikan" + "mal/web/components" +) + +templ Recommendations(recs []jikan.Anime) { + if len(recs) > 0 { +
+ for _, anime := range recs { + @components.AnimeCard(components.AnimeCardProps{ + ID: anime.MalID, + Title: anime.DisplayTitle(), + ImageURL: anime.ImageURL(), + Class: "relation-card", + ImgClass: "relation-thumb", + TitleClass: "relation-title", + }) + } +
+ } else { +

No recommendations available.

+ } +}