mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 05:29:38 -04:00
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:
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user