refactor: simplify current relation marker

This commit is contained in:
2026-04-18 18:44:00 +02:00
parent c74c85b940
commit 0e24dab236

View File

@@ -283,6 +283,9 @@ templ AnimeRelationsList(relations []jikan.RelationEntry) {
TitleClass: "relation-title", TitleClass: "relation-title",
CurrentNode: rel.IsCurrent, CurrentNode: rel.IsCurrent,
}) { }) {
if rel.IsCurrent {
<div class="mt-2 h-0.5 w-10 bg-white"></div>
}
if rel.Relation != "" && rel.Relation != "Current" { if rel.Relation != "" && rel.Relation != "Current" {
<div class="mt-1 text-xs text-(--text-faint)">{ rel.Relation }</div> <div class="mt-1 text-xs text-(--text-faint)">{ rel.Relation }</div>
} }
@@ -295,11 +298,7 @@ templ AnimeRelationsList(relations []jikan.RelationEntry) {
} }
func relationCardClass(rel jikan.RelationEntry) string { func relationCardClass(rel jikan.RelationEntry) string {
base := "relation-card" return "relation-card min-w-0 flex flex-col bg-transparent text-inherit no-underline"
if rel.IsCurrent {
base += " current"
}
return base
} }
templ AnimeRecommendations(recs []jikan.Anime) { templ AnimeRecommendations(recs []jikan.Anime) {