package templates
import (
"fmt"
"mal/internal/jikan"
"net/url"
)
templ Search(q string) {
@Layout("mal - search") {
if q != "" {
} else {
search for anime
use the search bar above to find anime to add to your watchlist
}
}
}
templ SearchResultsWrapper(query string, animes []jikan.Anime, nextPage int, hasNext bool) {
if len(animes) == 0 {
no results found
try a different search term
} else {
@SearchItems(query, animes, nextPage, hasNext)
}
}
templ SearchItems(query string, animes []jikan.Anime, nextPage int, hasNext bool) {
for _, anime := range animes {
@CatalogItem(anime)
}
if hasNext {
}
}