diff --git a/files/templates/home.html b/files/templates/home.html
index ca1d08968..ebefa65a2 100644
--- a/files/templates/home.html
+++ b/files/templates/home.html
@@ -63,21 +63,11 @@
{% block navbar %}
- {% if pins %}
- {% set pcolor = "primary" %}
- {% else %}
- {% set pcolor = "secondary" %}
- {% endif %}
-
+ {% set pcolor = "primary" if pins else "secondary" %}
Pins
{% if SITE_NAME != 'WPD' and not sub %}
- {% if holes %}
- {% set hcolor = "primary" %}
- {% else %}
- {% set hcolor = "secondary" %}
- {% endif %}
-
+ {% set hcolor = "primary" if hcolor else "secondary" %}
Holes
{% endif %}