Improve category style

This commit is contained in:
Edgar P. Burkhart 2025-01-01 18:53:56 +01:00
parent 744ea277f5
commit 08551a865d
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
3 changed files with 16 additions and 20 deletions

1
.prettierrc.toml Normal file
View file

@ -0,0 +1 @@
end_of_line = "auto"

View file

@ -67,22 +67,6 @@ a {
&:is(:hover, :focus) { &:is(:hover, :focus) {
text-decoration: underline; text-decoration: underline;
} }
&.big-link {
margin-right: 1em;
padding: 0 0.5em;
color: white;
background: var(--green);
border-radius: var(--radius);
height: 1.5rem;
line-height: 1.5rem;
&.add {
color: var(--text-link);
background: var(--bg-01);
}
}
} }
.red { .red {
@ -500,3 +484,14 @@ ul.statements {
padding: var(--gap); padding: var(--gap);
} }
} }
.category {
padding: 0 var(--gap);
border: var(--gray) 1px solid;
margin-right: var(--gap);
margin-bottom: var(--gap);
&.add {
border-style: dashed;
}
}

View file

@ -7,7 +7,7 @@
{% css "main/css/table.css" %} {% css "main/css/table.css" %}
{% css "main/css/plot.css" %} {% css "main/css/plot.css" %}
{% js "main/js/index.js" %} {% js "main/js/index.js" %}
{% endblock %} {% endblock link %}
{% block body %} {% block body %}
<div class="split"> <div class="split">
<section class="accounts"> <section class="accounts">
@ -50,9 +50,9 @@
{% spaceless %} {% spaceless %}
<p> <p>
{% for cat in categories %} {% for cat in categories %}
<a class="big-link" href="{{ cat.get_absolute_url }}">{{ cat.icon|remix }}{{ cat }}</a> <a class="category" href="{{ cat.get_absolute_url }}">{{ cat.icon|remix }}{{ cat }}</a>
{% endfor %} {% endfor %}
<a class="big-link add" href="{% url "new_category" %}">{{ "add"|remix }}{% translate "Create category" %}</a> <a class="category add" href="{% url "new_category" %}">{{ "add"|remix }}{% translate "Create category" %}</a>
</p> </p>
{% endspaceless %} {% endspaceless %}
</section> </section>
@ -62,4 +62,4 @@
{% include "history/plot.html" %} {% include "history/plot.html" %}
</section> </section>
{% endif %} {% endif %}
{% endblock %} {% endblock body %}