Give each row in a table a heading

The first columns of our tables are always headings for the
subsequent columns, even though they go horizontally.

HTML has the `<th>` tag, which doesn’t just have to be used for headings
along the top of a table. So this commit changes the first column to be
a `<th>`.

This then allows us to style these elements differently, specifically
making them 50% wide. This makes pages like the dashboard align more
nicely.
This commit is contained in:
Chris Hill-Scott
2016-06-08 13:41:02 +01:00
parent b1852f4b78
commit d213e2cc67
5 changed files with 41 additions and 15 deletions

View File

@@ -55,12 +55,24 @@
</td>
{%- endmacro %}
{% macro row_heading() -%}
<th class="table-field">
<span>{{ caller() }}</span>
</th>
{%- endmacro %}
{% macro index_field(text) -%}
<td class="table-field-index">
<span>{{ text }}</span>
</td>
{%- endmacro %}
{% macro date_field(text) -%}
<td class="table-field-date">
<span>{{ text }}</span>
</td>
{% endmacro %}
{% macro text_field(text) -%}
{% call field() %}
{{ text }}