Update category list css

This commit is contained in:
Edgar P. Burkhart 2022-05-20 18:39:50 +02:00
parent 1acf27cac2
commit df49afb5a4
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
2 changed files with 28 additions and 20 deletions

View file

@ -38,3 +38,11 @@
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
ul#categories {
list-style-type: " ";
}
#categories ul {
list-style-type: "↳ ";
padding-left: 1.5em;
}

View file

@ -13,30 +13,30 @@
<a href="{% url 'transaction' %}">Add transaction</a> <a href="{% url 'transaction' %}">Add transaction</a>
{% if transactions %} {% if transactions %}
<div id="transactions"> <div id="transactions">
<div class="header"> <div class="header">
<strong class="date">Date</strong> <strong class="date">Date</strong>
<strong class="name">Nom</strong> <strong class="name">Nom</strong>
<strong class="value">Valeur</strong> <strong class="value">Valeur</strong>
<strong class="trader">Commerçant</strong> <strong class="trader">Commerçant</strong>
<strong class="category">Catégorie</strong> <strong class="category">Catégorie</strong>
<strong class="description">Description</strong> <strong class="description">Description</strong>
</div>
{% for trans in transactions %}
<div class="transaction {% cycle 'w' 'g' %}">
<span class="date num center">{{ trans.date|date:"Y-m-d" }}</span>
<span class="name text"><a href="{% url 'transaction' trans.id %}">{{ trans.name }}</a></span>
<span class="value num">{{ trans.value|floatformat:"2g" }} €</span>
<span class="trader text center">{{ trans.trader|default_if_none:"" }}</span>
<span class="category text center">{% if trans.category %}{{ trans.category.tree|join:" → " }}{% else %}{% endif %}</span>
<span class="description text">{{ trans.description }}</span>
</div> </div>
{% endfor %} {% for trans in transactions %}
</div> <div class="transaction {% cycle 'w' 'g' %}">
<span class="date num center">{{ trans.date|date:"Y-m-d" }}</span>
<span class="name text"><a href="{% url 'transaction' trans.id %}">{{ trans.name }}</a></span>
<span class="value num">{{ trans.value|floatformat:"2g" }} €</span>
<span class="trader text center">{{ trans.trader|default_if_none:"" }}</span>
<span class="category text center">{% if trans.category %}{{ trans.category.tree|join:" → " }}{% else %}{% endif %}</span>
<span class="description text">{{ trans.description }}</span>
</div>
{% endfor %}
</div>
{% endif %} {% endif %}
{% if categories %} {% if categories %}
<ul> <ul id="categories">
{{ categories|unordered_list }} {{ categories|unordered_list }}
</ul> </ul>
{% endif %} {% endif %}