Add UI for displaying the user's average score for a genre

This commit is contained in:
Ashley Allen 2018-07-26 15:34:08 +01:00
parent f0625aabe5
commit 6a83042953
2 changed files with 5 additions and 2 deletions

View File

@ -1,8 +1,9 @@
component Genre(genre string, animes []*arn.Anime, user *arn.User, userScore float64)
h1(title=fmt.Sprint(len(animes)) + " anime")= strings.Title(genre)
//- if user != nil
//- h2= fmt.Sprintf("%.1f", userScore)
.average-score
if user != nil
p= fmt.Sprintf("Average Score: %.1f", userScore)
.corner-buttons-hide-on-mobile
if user != nil

View File

@ -0,0 +1,2 @@
.average-score
text-align center