fix(ui): remove duplicate notification title
This commit is contained in:
@@ -10,6 +10,7 @@ type AnimeCardProps struct {
|
|||||||
Class string // override default wrapper class
|
Class string // override default wrapper class
|
||||||
ImgClass string // override default image class
|
ImgClass string // override default image class
|
||||||
TitleClass string // override default title 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)
|
CurrentNode bool // if true, renders a div instead of an anchor tag (useful for graph nodes)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -26,7 +27,7 @@ templ AnimeCard(props AnimeCardProps) {
|
|||||||
<a href={ templ.URL(fmt.Sprintf("/anime/%d", props.ID)) } class={ defaultString(props.Class, "flex flex-col bg-transparent text-inherit no-underline") }>
|
<a href={ templ.URL(fmt.Sprintf("/anime/%d", props.ID)) } class={ defaultString(props.Class, "flex flex-col bg-transparent text-inherit no-underline") }>
|
||||||
@animeCardPoster(props.ImageURL, props.Title, props.ImgClass)
|
@animeCardPoster(props.ImageURL, props.Title, props.ImgClass)
|
||||||
|
|
||||||
if props.Class != "notification-card" && props.Class != "schedule-card" {
|
if !props.HideTitle {
|
||||||
<div class={ defaultString(props.TitleClass, "mt-2 line-clamp-2 text-sm leading-snug text-(--text)") }>
|
<div class={ defaultString(props.TitleClass, "mt-2 line-clamp-2 text-sm leading-snug text-(--text)") }>
|
||||||
{ props.Title }
|
{ props.Title }
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ templ UpcomingSeasonCard(item database.GetUpcomingSeasonsRow) {
|
|||||||
Title: displaySeasonTitle(item),
|
Title: displaySeasonTitle(item),
|
||||||
ImageURL: item.ImageUrl,
|
ImageURL: item.ImageUrl,
|
||||||
Class: "notification-card min-w-0 flex flex-col bg-transparent text-inherit no-underline",
|
Class: "notification-card min-w-0 flex flex-col bg-transparent text-inherit no-underline",
|
||||||
|
HideTitle: true,
|
||||||
}) {
|
}) {
|
||||||
<div class="mt-2 grid gap-1 p-0" data-notification-content>
|
<div class="mt-2 grid gap-1 p-0" data-notification-content>
|
||||||
<div class="line-clamp-2 text-sm leading-snug text-(--text)">
|
<div class="line-clamp-2 text-sm leading-snug text-(--text)">
|
||||||
@@ -124,6 +125,7 @@ templ NotificationCard(item WatchingAnimeWithDetails) {
|
|||||||
Title: displayTitle(item.Entry),
|
Title: displayTitle(item.Entry),
|
||||||
ImageURL: item.Entry.ImageUrl,
|
ImageURL: item.Entry.ImageUrl,
|
||||||
Class: "notification-card min-w-0 flex flex-col bg-transparent text-inherit no-underline",
|
Class: "notification-card min-w-0 flex flex-col bg-transparent text-inherit no-underline",
|
||||||
|
HideTitle: true,
|
||||||
}) {
|
}) {
|
||||||
<div class="mt-2 grid gap-1 p-0" data-notification-content>
|
<div class="mt-2 grid gap-1 p-0" data-notification-content>
|
||||||
<div class="line-clamp-2 text-sm leading-snug text-(--text)">
|
<div class="line-clamp-2 text-sm leading-snug text-(--text)">
|
||||||
|
|||||||
Reference in New Issue
Block a user