-<th class="centered{% if sort=='default_effort' %} desc{% endif %}">
-<a href="?sort=default_effort">effort</a>
-</th>
-<th {% if sort=='depth' %}class ="desc"{% endif %}>
-<a href="?sort=depth">depth</a>
-</th>
-<th {% if sort=='title' %}class="desc"{% endif %}>
-<a href="?sort=title">todo</a>
-</th>
+{{ macros.sort_head(sort, "default_effort", "effort") }}
+{{ macros.sort_head(sort, "weight", "weight") }}
+{{ macros.sort_head(sort, "title", "task") }}