feat: replace notifications with continue watching

This commit is contained in:
2026-04-18 23:42:22 +02:00
parent dea66f2f6a
commit ed73400b83
9 changed files with 137 additions and 292 deletions

View File

@@ -6,6 +6,7 @@ type AnimeCardProps struct {
ID int
Title string
ImageURL string
Href string
// Options to customize the card behavior
Class string // override default wrapper class
ImgClass string // override default image class
@@ -24,7 +25,7 @@ templ AnimeCard(props AnimeCardProps) {
{ children... }
</div>
} else {
<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(cardHref(props)) } class={ defaultString(props.Class, "flex flex-col bg-transparent text-inherit no-underline") }>
@animeCardPoster(props.ImageURL, props.Title, props.ImgClass)
if !props.HideTitle {
@@ -37,6 +38,14 @@ templ AnimeCard(props AnimeCardProps) {
}
}
func cardHref(props AnimeCardProps) string {
if props.Href != "" {
return props.Href
}
return fmt.Sprintf("/anime/%d", props.ID)
}
templ animeCardPoster(imageURL, title, imgClass string) {
<div class="flex w-full aspect-2/3 justify-center overflow-hidden">
if imageURL != "" {