Compare commits

..

No commits in common. "0e5b8ea85d4fad42f9dc1df606ae105afb050112" and "ee4e6b7ceb3a1a2edfe10644a42ffb08570c2f42" have entirely different histories.

3 changed files with 84 additions and 74 deletions

View File

@ -18,58 +18,60 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for y in history.years reversed %} {% spaceless %}
{% for date in y.d reversed %} {% for y in history.years reversed %}
{% ifchanged %} {% for date in y.d reversed %}
{% if date %} {% ifchanged %}
<tr {% if not date.month.month|divisibleby:"2" %}class="even"{% endif %}> {% if date %}
<td class="icon"> <tr {% if not date.month.month|divisibleby:"2" %}class="even"{% endif %}>
<span class="ri-{% if date.sum > 0 %}arrow-up-s-line green{% elif date.sum < 0 %}arrow-down-s-line red{% endif %}"></span> <td class="icon">
</td> <span class="ri-{% if date.sum > 0 %}arrow-up-s-line green{% elif date.sum < 0 %}arrow-down-s-line red{% endif %}"></span>
<th class="date" scope="row"> </td>
{% if date.has_transactions %} <th class="date" scope="row">
{% if account %} {% if date.has_transactions %}
<a href="{% url "account_transaction_month" account=account.pk year=date.month.year month=date.month.month %}">{{ date.month|date:"Y-m" }}</a> {% if account %}
{% elif category %} <a href="{% url "account_transaction_month" account=account.pk year=date.month.year month=date.month.month %}">{{ date.month|date:"Y-m" }}</a>
<a href="{% url "category_transaction_month" category=category.pk year=date.month.year month=date.month.month %}">{{ date.month|date:"Y-m" }}</a> {% elif category %}
<a href="{% url "category_transaction_month" category=category.pk year=date.month.year month=date.month.month %}">{{ date.month|date:"Y-m" }}</a>
{% else %}
<a href="{% url "transaction_month" year=date.month.year month=date.month.month %}">{{ date.month|date:"Y-m" }}</a>
{% endif %}
{% else %} {% else %}
<a href="{% url "transaction_month" year=date.month.year month=date.month.month %}">{{ date.month|date:"Y-m" }}</a> {{ date.month|date:"Y-m" }}
{% endif %} {% endif %}
{% else %} </th>
{{ date.month|date:"Y-m" }} <td class="value">{{ date.sum_m|pmrvalue }}</td>
{% endif %} <td class="bar m">
</th> {% if date.sum_m %}
<td class="value">{{ date.sum_m|pmrvalue }}</td> <div style="width: {% widthratio date.sum_m history.max -100 %}%"></div>
<td class="bar m"> {% endif %}
{% if date.sum_m %} {% if date.sum < 0 %}
<div style="width: {% widthratio date.sum_m history.max -100 %}%"></div> <div class="tot" style="width:{% widthratio date.sum history.max -100 %}%">
{% endif %} <span>{{ date.sum|pmrvalue }}</span>
{% if date.sum < 0 %} </div>
<div class="tot" style="width:{% widthratio date.sum history.max -100 %}%"> {% endif %}
<span>{{ date.sum|pmrvalue }}</span> </td>
</div> <td class="bar p">
{% endif %} {% if date.sum_p %}
</td> <div style="width: {% widthratio date.sum_p history.max 100 %}%"></div>
<td class="bar p"> {% endif %}
{% if date.sum_p %} {% if date.sum > 0 %}
<div style="width: {% widthratio date.sum_p history.max 100 %}%"></div> <div class="tot" style="width:{% widthratio date.sum history.max 100 %}%">
{% endif %} <span>{{ date.sum|pmrvalue }}</span>
{% if date.sum > 0 %} </div>
<div class="tot" style="width:{% widthratio date.sum history.max 100 %}%"> {% endif %}
<span>{{ date.sum|pmrvalue }}</span> </td>
</div> <td class="value">{{ date.sum_p|pmrvalue }}</td>
{% endif %} </tr>
</td> {% else %}
<td class="value">{{ date.sum_p|pmrvalue }}</td> <tr class="empty">
</tr> <td colspan="6" class="empty"></td>
{% else %} </tr>
<tr class="empty"> {% endif %}
<td colspan="6" class="empty"></td> {% endifchanged %}
</tr> {% endfor %}
{% endif %}
{% endifchanged %}
{% endfor %} {% endfor %}
{% endfor %} {% endspaceless %}
</tbody> </tbody>
</table> </table>
</div> </div>
@ -93,26 +95,28 @@
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
{% for year in history.years reversed %} {% spaceless %}
<tr> {% for year in history.years reversed %}
<th>{{ year.y }}</th> <tr>
{% for m in year.d %} <th>{{ year.y }}</th>
{% if forloop.parentloop.last and forloop.first %} {% for m in year.d %}
{% for _ in history.offset.0 %}<td></td>{% endfor %} {% if forloop.parentloop.last and forloop.first %}
{% endif %} {% for _ in history.offset.0 %}<td></td>{% endfor %}
{% if m %} {% endif %}
<td class="{% if m.sum > 0 %}p{% else %}m{% endif %}" {% if m %}
style="opacity: calc( sin( abs({% widthratio m.sum history.years_max 100 %}) / 400 * 1turn ) )"> <td class="{% if m.sum > 0 %}p{% else %}m{% endif %}"
</td> style="opacity: calc( sin( abs({% widthratio m.sum history.years_max 100 %}) / 400 * 1turn ) )">
{% else %} </td>
<td></td> {% else %}
{% endif %} <td></td>
{% if forloop.parentloop.first and forloop.last %} {% endif %}
{% for _ in history.offset.1 %}<td></td>{% endfor %} {% if forloop.parentloop.first and forloop.last %}
{% endif %} {% for _ in history.offset.1 %}<td></td>{% endfor %}
{% endfor %} {% endif %}
</tr> {% endfor %}
{% endfor %} </tr>
{% endfor %}
{% endspaceless %}
</tbody> </tbody>
</table> </table>
</div> </div>

View File

@ -9,7 +9,9 @@ form > table > tbody > tr > th {
background: var(--bg-01); background: var(--bg-01);
background-clip: padding-box; background-clip: padding-box;
} }
form tbody :is(input, select, textarea) { form tbody input,
form tbody select,
form tbody textarea {
font: inherit; font: inherit;
border: none; border: none;
background: transparent; background: transparent;

View File

@ -61,7 +61,8 @@ a {
text-decoration: none; text-decoration: none;
display: inline-block; display: inline-block;
} }
a:is(:hover, :focus) { a:hover,
a:focus {
text-decoration: underline; text-decoration: underline;
} }
@ -108,7 +109,8 @@ nav ul {
nav .skip-link { nav .skip-link {
font-weight: 300; font-weight: 300;
} }
nav .skip-link:is(:active, :focus) { nav .skip-link:active,
nav .skip-link:focus {
font-weight: 500; font-weight: 500;
} }
nav a { nav a {
@ -122,7 +124,8 @@ nav a.cur::after {
position: absolute; position: absolute;
right: 0; right: 0;
} }
:is(nav, main) > :first-child { nav > :first-child,
main > :first-child {
margin-top: 0; margin-top: 0;
} }
footer { footer {
@ -143,7 +146,8 @@ footer {
font-weight: 650; font-weight: 650;
text-decoration: underline dotted; text-decoration: underline dotted;
} }
.pagination a.cur:is(:hover, :focus) { .pagination a.cur:hover,
.pagination a.cur:focus {
text-decoration: underline; text-decoration: underline;
} }