2018-07-30 12:06:31 +00:00
|
|
|
component Genre(genre string, animes []*arn.Anime, user *arn.User, userScore float64, userCompleted int, globalScore float64)
|
2018-10-10 09:37:31 +00:00
|
|
|
h1.genre-title(title=fmt.Sprint(len(animes)) + " anime")= strings.Title(genre)
|
2018-07-03 13:33:35 +00:00
|
|
|
|
2018-10-10 09:37:31 +00:00
|
|
|
if user != nil
|
|
|
|
GenreStatistics(user, userScore, userCompleted, globalScore)
|
2018-07-03 10:13:38 +00:00
|
|
|
|
2017-12-02 20:06:15 +00:00
|
|
|
.corner-buttons-hide-on-mobile
|
2018-03-17 21:09:17 +00:00
|
|
|
if user != nil
|
2018-07-05 16:52:05 +00:00
|
|
|
button.action(data-trigger="click", data-action="toggleHideAddedAnime", title="Hide anime in my collection")
|
2018-03-17 21:09:17 +00:00
|
|
|
RawIcon("eye-slash")
|
2017-12-02 20:06:15 +00:00
|
|
|
|
2018-03-23 20:33:19 +00:00
|
|
|
a.button(href="/genres", title="View genres")
|
2018-03-07 19:40:41 +00:00
|
|
|
RawIcon("clone")
|
|
|
|
|
2018-07-28 14:47:25 +00:00
|
|
|
AnimeGrid(animes, user)
|
|
|
|
|
2018-07-30 12:06:31 +00:00
|
|
|
component GenreStatistics(user *arn.User, userScore float64, userCompleted int, globalScore float64)
|
2018-10-10 09:37:31 +00:00
|
|
|
.genre-statistics
|
|
|
|
p= fmt.Sprintf("Your average rating: %." + strconv.Itoa(user.Settings().Format.RatingsPrecision) + "f | Total completed: %d", userScore, userCompleted)
|