package templates import ( "fmt" "strings" "mal/integrations/jikan" animecomponents "mal/web/components/anime" "mal/web/components" watchlistcomponents "mal/web/components/watchlist" "mal/web/shared" ) templ AnimeDetails(anime jikan.Anime, currentStatus string, nextEpisode int) { @Layout("mal - " + anime.DisplayTitle(), true) {
if anime.ImageURL() != "" { { } else {
No image
}

{ anime.DisplayTitle() }

if anime.TitleJapanese != "" {

{ anime.TitleJapanese }

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

{ anime.Synopsis }

} else {

No synopsis available.

}

Related

@components.LoadingIndicator("Loading relations")

Recommendations

@components.LoadingIndicator("Loading recommendations")
} }