refactor: simplify current relation marker
This commit is contained in:
@@ -283,6 +283,9 @@ templ AnimeRelationsList(relations []jikan.RelationEntry) {
|
||||
TitleClass: "relation-title",
|
||||
CurrentNode: rel.IsCurrent,
|
||||
}) {
|
||||
if rel.IsCurrent {
|
||||
<div class="mt-2 h-0.5 w-10 bg-white"></div>
|
||||
}
|
||||
if rel.Relation != "" && rel.Relation != "Current" {
|
||||
<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 {
|
||||
base := "relation-card"
|
||||
if rel.IsCurrent {
|
||||
base += " current"
|
||||
}
|
||||
return base
|
||||
return "relation-card min-w-0 flex flex-col bg-transparent text-inherit no-underline"
|
||||
}
|
||||
|
||||
templ AnimeRecommendations(recs []jikan.Anime) {
|
||||
|
||||
Reference in New Issue
Block a user