From c9d3ca5cc6e4fbe548ca0b5c74dc3202362bfb7b Mon Sep 17 00:00:00 2001 From: mkelvers Date: Wed, 15 Apr 2026 01:19:31 +0200 Subject: [PATCH] refactor(ui): standardize tailwind classes --- internal/shared/ui/anime_card.templ | 8 +- internal/shared/ui/empty_state.templ | 2 +- internal/shared/ui/loading.templ | 8 +- internal/shared/ui/sort_filter.templ | 10 +- internal/templates/anime.templ | 112 +++++++++--------- internal/templates/auth.templ | 152 ++++++++++++------------- internal/templates/catalog.templ | 6 +- internal/templates/discovery.templ | 18 +-- internal/templates/index.templ | 2 +- internal/templates/layout.templ | 30 ++--- internal/templates/not_found.templ | 10 +- internal/templates/notifications.templ | 42 +++---- internal/templates/watchlist.templ | 42 +++---- static/search.ts | 14 +-- 14 files changed, 228 insertions(+), 228 deletions(-) diff --git a/internal/shared/ui/anime_card.templ b/internal/shared/ui/anime_card.templ index 1d8e5b2..a19fd0a 100644 --- a/internal/shared/ui/anime_card.templ +++ b/internal/shared/ui/anime_card.templ @@ -17,7 +17,7 @@ templ AnimeCard(props AnimeCardProps) { if props.CurrentNode {
@animeCardPoster(props.ImageURL, props.Title, props.ImgClass) -
+
{ props.Title }
{ children... } @@ -27,7 +27,7 @@ templ AnimeCard(props AnimeCardProps) { @animeCardPoster(props.ImageURL, props.Title, props.ImgClass) if props.Class != "notification-card" && props.Class != "schedule-card" { -
+
{ props.Title }
} @@ -37,11 +37,11 @@ templ AnimeCard(props AnimeCardProps) { } templ animeCardPoster(imageURL, title, imgClass string) { -
+
if imageURL != "" { { } else { -
No image
+
No image
}
} diff --git a/internal/shared/ui/empty_state.templ b/internal/shared/ui/empty_state.templ index 0c78604..be4a38a 100644 --- a/internal/shared/ui/empty_state.templ +++ b/internal/shared/ui/empty_state.templ @@ -3,7 +3,7 @@ package ui templ EmptyState(title string) {
{ title }
-
+
{ children... }
diff --git a/internal/shared/ui/loading.templ b/internal/shared/ui/loading.templ index 79631d6..28c3067 100644 --- a/internal/shared/ui/loading.templ +++ b/internal/shared/ui/loading.templ @@ -1,10 +1,10 @@ package ui templ LoadingIndicator(text string) { -
-
-
-
+
+
+
+
{ text }
} diff --git a/internal/shared/ui/sort_filter.templ b/internal/shared/ui/sort_filter.templ index 10c0f1f..cda2463 100644 --- a/internal/shared/ui/sort_filter.templ +++ b/internal/shared/ui/sort_filter.templ @@ -8,17 +8,17 @@ type SortFilterOptions struct { } templ SortFilter(opts SortFilterOptions) { -
+
- -
- - diff --git a/internal/templates/anime.templ b/internal/templates/anime.templ index 9247c81..9573088 100644 --- a/internal/templates/anime.templ +++ b/internal/templates/anime.templ @@ -7,43 +7,43 @@ import "strings" templ AnimeDetails(anime jikan.Anime, currentStatus string) { @Layout("mal - " + anime.DisplayTitle(), true) { -
+
-
-
+
+
if anime.ImageURL() != "" { { } else { -
No image
+
No image
}

{ anime.DisplayTitle() }

if anime.TitleJapanese != "" { -

{ anime.TitleJapanese }

+

{ anime.TitleJapanese }

}
if anime.ShortRating() != "" { - { anime.ShortRating() } + { anime.ShortRating() } } if anime.Type != "" { - { anime.Type } + { anime.Type } } if anime.Episodes > 0 { - { fmt.Sprintf("%d ep", anime.Episodes) } + { fmt.Sprintf("%d ep", anime.Episodes) } } if anime.ShortDuration() != "" { - { anime.ShortDuration() } + { anime.ShortDuration() } }
@WatchlistDropdown(anime.MalID, anime.Title, anime.TitleEnglish, anime.TitleJapanese, anime.ImageURL(), currentStatus, anime.Airing)
-
+
if anime.Synopsis != "" {

{ anime.Synopsis }

} else { -

No synopsis available.

+

No synopsis available.

}
@@ -61,95 +61,95 @@ templ AnimeDetails(anime jikan.Anime, currentStatus string) {
-