added table container
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Samuel Philipp 2021-06-13 02:17:25 +02:00
parent 8d2492e6c8
commit bd591594e7
Signed by: samuel-p
GPG key ID: 2AD495D17760CB4E
4 changed files with 111 additions and 102 deletions

View file

@ -1,35 +1,36 @@
{{locale}}
<table class="table">
<thead>
<tr>
<th>{{strings.date[locale]}}</th>
<th>{{strings.via[locale]}}</th>
<th>{{strings.from[locale]}}</th>
<th>{{strings.amount[locale]}}</th>
</tr>
</thead>
<tbody>
{% for donation in donations[0].donations %}
<tr>
<td>{{donation.date}}</td>
{% if donation.via == 'opencollective' %}
<td><a href="https://opencollective.com/sp-codes" rel="nofollow">Open Collective</a></td>
{% else %}
<td>{{strings[donation.via][locale]}}</td>
{% endif %}
{% if donation.from %}
<td>{{donation.from}}</td>
{% else %}
<td>***</td>
{% endif %}
<td>{{donation.amount | amount}} €</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<th colspan="3">{{strings.total[locale]}}</th>
<th>{{donations[0].donations | sum | amount}} €</th>
</tr>
</tfoot>
</table>
<div class="table-container">
<table class="table">
<thead>
<tr>
<th>{{strings.date[locale]}}</th>
<th>{{strings.via[locale]}}</th>
<th>{{strings.from[locale]}}</th>
<th>{{strings.amount[locale]}}</th>
</tr>
</thead>
<tbody>
{% for donation in donations[0].donations %}
<tr>
<td>{{donation.date}}</td>
{% if donation.via == 'opencollective' %}
<td><a href="https://opencollective.com/sp-codes" rel="nofollow">Open Collective</a></td>
{% else %}
<td>{{strings[donation.via][locale]}}</td>
{% endif %}
{% if donation.from %}
<td>{{donation.from}}</td>
{% else %}
<td>***</td>
{% endif %}
<td>{{donation.amount | amount}} €</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<th colspan="3">{{strings.total[locale]}}</th>
<th>{{donations[0].donations | sum | amount}} €</th>
</tr>
</tfoot>
</table>
</div>

View file

@ -1,38 +1,40 @@
{% for year in donations %}
<h2>{{year.year}}</h2>
<table class="table">
<thead>
<tr>
<th>{{strings.date[locale]}}</th>
<th>{{strings.via[locale]}}</th>
<th>{{strings.from[locale]}}</th>
<th>{{strings.amount[locale]}}</th>
</tr>
</thead>
<tbody>
{% for donation in year.donations %}
<tr>
<td>{{donation.date}}</td>
{% if donation.via == 'opencollective' %}
<td><a href="https://opencollective.com/sp-codes" rel="nofollow">Open Collective</a></td>
{% else %}
<td>{{strings[donation.via][locale]}}</td>
{% endif %}
{% if donation.from %}
<td>{{donation.from}}</td>
{% else %}
<td>***</td>
{% endif %}
<td>{{donation.amount | amount}} €</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<th colspan="3">{{strings.total[locale]}}</th>
<th>{{year.donations | sum | amount}} €</th>
</tr>
</tfoot>
</table>
<div class="table-container">
<table class="table">
<thead>
<tr>
<th>{{strings.date[locale]}}</th>
<th>{{strings.via[locale]}}</th>
<th>{{strings.from[locale]}}</th>
<th>{{strings.amount[locale]}}</th>
</tr>
</thead>
<tbody>
{% for donation in year.donations %}
<tr>
<td>{{donation.date}}</td>
{% if donation.via == 'opencollective' %}
<td><a href="https://opencollective.com/sp-codes" rel="nofollow">Open Collective</a></td>
{% else %}
<td>{{strings[donation.via][locale]}}</td>
{% endif %}
{% if donation.from %}
<td>{{donation.from}}</td>
{% else %}
<td>***</td>
{% endif %}
<td>{{donation.amount | amount}} €</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<th colspan="3">{{strings.total[locale]}}</th>
<th>{{year.donations | sum | amount}} €</th>
</tr>
</tfoot>
</table>
</div>
{% endfor %}

View file

@ -1,33 +1,35 @@
<table class="table">
<thead>
<tr>
<th>{{strings.name[locale]}}</th>
<th>{{strings.type[locale]}}</th>
<th>{{strings.provider[locale]}}</th>
<th>{{strings.amount[locale]}} / {{strings.month[locale]}}</th>
<th>{{strings.amount[locale]}} / {{strings.year[locale]}}</th>
</tr>
</thead>
<tbody>
{% for expense in expenses %}
<tr>
{% if expense.name[locale] %}
<td>{{expense.name[locale]}}</td>
{% else %}
<td>{{expense.name}}</td>
{% endif %}
<td>{{expense.type}}</td>
<td>{{expense.provider}}</td>
<td>{{expense.amount | amount}} €</td>
<td>{{expense.amount | year | amount}} €</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<th colspan="3">{{strings.total[locale]}}</th>
<th>{{expenses | sum | amount}} €</th>
<th>{{expenses | sum | year | amount}} €</th>
</tr>
</tfoot>
</table>
<div class="table-container">
<table class="table">
<thead>
<tr>
<th>{{strings.name[locale]}}</th>
<th>{{strings.type[locale]}}</th>
<th>{{strings.provider[locale]}}</th>
<th>{{strings.amount[locale]}} / {{strings.month[locale]}}</th>
<th>{{strings.amount[locale]}} / {{strings.year[locale]}}</th>
</tr>
</thead>
<tbody>
{% for expense in expenses %}
<tr>
{% if expense.name[locale] %}
<td>{{expense.name[locale]}}</td>
{% else %}
<td>{{expense.name}}</td>
{% endif %}
<td>{{expense.type}}</td>
<td>{{expense.provider}}</td>
<td>{{expense.amount | amount}} €</td>
<td>{{expense.amount | year | amount}} €</td>
</tr>
{% endfor %}
</tbody>
<tfoot>
<tr>
<th colspan="3">{{strings.total[locale]}}</th>
<th>{{expenses | sum | amount}} €</th>
<th>{{expenses | sum | year | amount}} €</th>
</tr>
</tfoot>
</table>
</div>

View file

@ -270,6 +270,10 @@ pre {
}
}
.table-container {
overflow-y: auto;
}
table.table {
width: 100%;
margin-bottom: 16px;