Improve history plot with empty segments

This commit is contained in:
Edgar P. Burkhart 2023-12-30 10:10:53 +01:00
parent 55923e7709
commit ee4e6b7ceb
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
3 changed files with 50 additions and 45 deletions

View file

@ -21,8 +21,9 @@
{% spaceless %}
{% for y in history.years reversed %}
{% for date in y.d reversed %}
{% ifchanged %}
{% if date %}
<tr>
<tr {% if not date.month.month|divisibleby:"2" %}class="even"{% endif %}>
<td class="icon">
<span class="ri-{% if date.sum > 0 %}arrow-up-s-line green{% elif date.sum < 0 %}arrow-down-s-line red{% endif %}"></span>
</td>
@ -67,6 +68,7 @@
<td colspan="6" class="empty"></td>
</tr>
{% endif %}
{% endifchanged %}
{% endfor %}
{% endfor %}
{% endspaceless %}

View file

@ -66,6 +66,9 @@ table.full-width col.bar {
.plot tr.empty {
height: 0.5rem;
}
.plot tr.even {
background: #eeeeff;
}
@media (width < 720px) {
.plot .bar {

View file

@ -25,7 +25,7 @@ tr {
height: 2rem;
line-height: 2rem;
}
tbody tr:nth-of-type(even) {
.table tbody tr:nth-of-type(even) {
background: #eeeeff;
}
td,