diff --git a/backend/app.go b/backend/app.go index 10d8b56..bf9d21f 100644 --- a/backend/app.go +++ b/backend/app.go @@ -100,7 +100,6 @@ func (a *App) refreshTopics() { func (a *App) updateScores(t []Topic) []Topic { for i := range t { t[i].Score = t[i].Votes.Up - t[i].Votes.Down - log.Debug().Msgf("Added score: %d", t[i].Score) } return t } diff --git a/src/App.vue b/src/App.vue index 7e61bad..c886131 100644 --- a/src/App.vue +++ b/src/App.vue @@ -38,7 +38,15 @@ v-html="highlightMatches(topic.title)" > - {{ topic.score }} + + +{{ topic.score }} + + + {{ topic.score }} + + + {{ topic.score }} + {{ topic.total_views }} {{ formatDate(topic.last_post_time) }} diff --git a/src/theme.css b/src/theme.css index dcd8165..a133279 100644 --- a/src/theme.css +++ b/src/theme.css @@ -199,3 +199,11 @@ footer { .footer-right { float: right; } + +.green-score { + color: rgb(22, 120, 63); +} + +.red-score { + color: rgb(175, 21, 21); +}