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
|
2018-03-22 02:44:18 +00:00
|
|
|
.anime-rating(title="Rated by " + arn.Plural(userCount, "user"))= fmt.Sprintf("%.1f", value)
|
2017-10-20 16:26:23 +00:00
|
|
|
else
|
2018-03-22 02:44:18 +00:00
|
|
|
.anime-rating(title="Rated by " + arn.Plural(userCount, "user"))= fmt.Sprintf("%." + strconv.Itoa(user.Settings().Format.RatingsPrecision) + "f", value)
|