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 { #categories > a {
margin-right: var(--gap);
margin-bottom: var(--gap);
display: inline-block; display: inline-block;
padding: 1em;
} }
#categories > a > i { #categories > a > i {
margin-right: .5rem; margin-right: .5rem;

View file

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