Add colour to score

This commit is contained in:
Dave Gallant
2022-12-23 21:43:04 -05:00
parent e69d0f632e
commit dd7e73b497
3 changed files with 17 additions and 2 deletions

View File

@@ -38,7 +38,15 @@
v-html="highlightMatches(topic.title)"
></a>
</td>
<td scope="col">{{ topic.score }}</td>
<td v-if="topic.score > 0" scope="col" class="green-score">
+{{ topic.score }}
</td>
<td v-if="topic.score < 0" scope="col" class="red-score">
{{ topic.score }}
</td>
<td v-if="topic.score == 0" scope="col">
{{ topic.score }}
</td>
<td scope="col">{{ topic.total_views }}</td>
<td scope="col">{{ formatDate(topic.last_post_time) }}</td>
</tr>

View File

@@ -199,3 +199,11 @@ footer {
.footer-right {
float: right;
}
.green-score {
color: rgb(22, 120, 63);
}
.red-score {
color: rgb(175, 21, 21);
}