Update categories layout on homepage

This commit is contained in:
Edgar P. Burkhart 2022-12-25 16:33:41 +01:00
parent 16dba43810
commit 47b9d6a3fb
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
2 changed files with 12 additions and 8 deletions

View file

@ -13,9 +13,8 @@ h1 img {
}
#categories > a {
margin-right: var(--gap);
margin-bottom: var(--gap);
display: inline-block;
padding: 1em;
}
#categories > a > i {
margin-right: .5rem;

View file

@ -14,17 +14,22 @@
{% block body %}
{% if transactions %}
<h2>
{% translate "Transactions" %} <a href="{% url "transactions" %}"><i class="fa fa-magnifying-glass-plus"></i></a>
{% translate "Transactions" %}
<a href="{% url "transactions" %}">
<i class="fa fa-magnifying-glass-plus"></i>
</a>
</h2>
{% transaction_table transactions %}
{% endif %}
{% if categories %}
<h2>{% translate "Categories" %}</h2>
<div id="categories">
{% for cat in categories %}
<a href="{% url 'category' cat.id %}"><i class="fa fa-{{ cat.icon }}"></i>{{ cat }}</a>
{% endfor %}
</div>
{% spaceless %}
<div id="categories">
{% for cat in categories %}
<a href="{% url 'category' cat.id %}"><i class="fa fa-{{ cat.icon }}"></i>{{ cat }}</a>
{% endfor %}
</div>
{% endspaceless %}
{% endif %}
{% if snapshots %}
<h2>{% translate "Snapshots" %}</h2>