diff --git a/nummi/main/static/main/css/main.css b/nummi/main/static/main/css/main.css index e5b4b07..d094d26 100644 --- a/nummi/main/static/main/css/main.css +++ b/nummi/main/static/main/css/main.css @@ -94,27 +94,21 @@ main { grid-column: 2; grid-row: 1; overflow-x: hidden; - - display: grid; - grid-template-columns: max-content 1fr; - grid-gap: var(--gap); - h2.new { opacity: 0.8; } - & > * { - grid-column: 1 / -1; - } + .split { + display: grid; + column-gap: var(--gap); + row-gap: var(--gap); + grid-template-columns: 1fr; + @media (width > 720px) { + grid-template-columns: max-content 1fr; + } - @media (width > 720px) { - & > section { - &.accounts { - grid-column: 1; - } - &.categories { - grid-column: 2; - } + & > section > :first-child { + margin-top: 0; } } } @@ -159,7 +153,7 @@ nav { } } :is(nav, main) > :first-child, -main > section > :first-child { +main > section:first-child > :first-child { margin-top: 0; } footer { @@ -231,7 +225,7 @@ h1, h2, h3 { font-weight: 300; - margin-top: var(--gap); + margin-top: 1em; margin-bottom: 0.5em; line-height: 1cap; } diff --git a/nummi/main/templates/main/index.html b/nummi/main/templates/main/index.html index 0fe5318..f88b5b0 100644 --- a/nummi/main/templates/main/index.html +++ b/nummi/main/templates/main/index.html @@ -8,53 +8,55 @@ {% css "main/css/plot.css" %} {% endblock %} {% block body %} -
-

{% translate "Accounts" %}

- - - - - - - - - {% for acc in accounts %} +
+
+

{% translate "Accounts" %}

+
{% translate "Account" %}{% translate "Balance" %}
+ - - - + + - {% empty %} - - - - {% endfor %} - - - - - - -
{{ acc.icon|remix }} - {{ acc }} - {{ acc.statement_set.first.value|value }}{% translate "Account" %}{% translate "Balance" %}
{% translate "No account" %}
- {% translate "Create account" %} -
-
- {% if categories %} -
-

{% translate "Categories" %}

- {% spaceless %} -

- {% for cat in categories %} - {{ cat.icon|remix }}{{ cat }} + + + {% for acc in accounts %} + + {{ acc.icon|remix }} + + {{ acc }} + + {{ acc.statement_set.first.value|value }} + {% empty %} - {% translate "No category" %} + + {% translate "No account" %} + {% endfor %} -

- {% endspaceless %} + + + + + {% translate "Create account" %} + + + +
- {% endif %} + {% if categories %} +
+

{% translate "Categories" %}

+ {% spaceless %} +

+ {% for cat in categories %} + {{ cat.icon|remix }}{{ cat }} + {% empty %} + {% translate "No category" %} + {% endfor %} +

+ {% endspaceless %} +
+ {% endif %} + {% if history %}

{% translate "History" %}

diff --git a/nummi/main/templates/main/list.html b/nummi/main/templates/main/list.html index 57adec0..ee3050e 100644 --- a/nummi/main/templates/main/list.html +++ b/nummi/main/templates/main/list.html @@ -19,25 +19,21 @@

{% block h2 %}{% endblock %}

- + {% if account %} +

+ {{ account.icon|remix }}{{ account }} +

+ {% endif %} + {% if category %} +

+ {{ category.icon|remix }}{{ category }} +

+ {% endif %} + {% if search %} +

+ {% translate "Search" %} +

+ {% endif %} {% include "main/pagination.html" %} {% block table %}{% endblock %} {% include "main/pagination.html" %}