2018-03-22 02:44:18 +00:00
|
|
|
component Rating(value float64, userCount int, user *arn.User)
|
2017-10-20 16:26:23 +00:00
|
|
|
if user == nil
|
2020-10-23 00:28:11 +00:00
|
|
|
.anime-rating.tip(aria-label="Rated by " + stringutils.Plural(userCount, "user"))= fmt.Sprintf("%.1f", value)
|
2017-10-20 16:26:23 +00:00
|
|
|
else
|
2020-10-23 00:28:11 +00:00
|
|
|
.anime-rating.tip(aria-label="Rated by " + stringutils.Plural(userCount, "user"))= fmt.Sprintf("%." + strconv.Itoa(user.Settings().Format.RatingsPrecision) + "f", value)
|
|
|
|
|
|
|
|
component CompanyRating(value float64, ratingCount int, user *arn.User)
|
|
|
|
if user == nil
|
|
|
|
.anime-rating.tip(aria-label="Based on " + stringutils.Plural(ratingCount, "rating"))= fmt.Sprintf("%.1f", value)
|
|
|
|
else
|
|
|
|
.anime-rating.tip(aria-label="Based on " + stringutils.Plural(ratingCount, "rating"))= fmt.Sprintf("%." + strconv.Itoa(user.Settings().Format.RatingsPrecision) + "f", value)
|