fix: remove top picks rationale badges
This commit is contained in:
@@ -109,7 +109,7 @@ func TestRenderWithNonStringFragment(t *testing.T) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestTopPicksTemplateRendersRecommendationRationale(t *testing.T) {
|
func TestTopPicksTemplateDoesNotRenderRecommendationRationale(t *testing.T) {
|
||||||
r, err := ProvideRenderer()
|
r, err := ProvideRenderer()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
@@ -134,8 +134,8 @@ func TestTopPicksTemplateRendersRecommendationRationale(t *testing.T) {
|
|||||||
|
|
||||||
body := buf.String()
|
body := buf.String()
|
||||||
for _, want := range []string{"Why this was picked", "Sports", "Production I.G"} {
|
for _, want := range []string{"Why this was picked", "Sports", "Production I.G"} {
|
||||||
if !strings.Contains(body, want) {
|
if strings.Contains(body, want) {
|
||||||
t.Fatalf("top picks template missing %q in output:\n%s", want, body)
|
t.Fatalf("top picks template should not render %q:\n%s", want, body)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,13 +24,6 @@
|
|||||||
<div class="flex flex-col gap-2">
|
<div class="flex flex-col gap-2">
|
||||||
{{template "anime_card" dict "Anime" . "WithActions" true "HideTitle" true "IsWatchlist" (index $.WatchlistMap .MalID)}}
|
{{template "anime_card" dict "Anime" . "WithActions" true "HideTitle" true "IsWatchlist" (index $.WatchlistMap .MalID)}}
|
||||||
<h3 class="line-clamp-2 text-sm font-normal text-foreground">{{.DisplayTitle}}</h3>
|
<h3 class="line-clamp-2 text-sm font-normal text-foreground">{{.DisplayTitle}}</h3>
|
||||||
{{if .RecommendationRationale}}
|
|
||||||
<div class="flex flex-wrap gap-1.5" aria-label="Why this was picked">
|
|
||||||
{{range .RecommendationRationale}}
|
|
||||||
<span class="rounded-full bg-background-button px-2 py-1 text-[0.68rem] leading-none text-foreground-muted">{{.}}</span>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
|
||||||
{{end}}
|
|
||||||
</div>
|
</div>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user