Fix page layout

This commit is contained in:
Edgar P. Burkhart 2024-01-03 15:13:54 +01:00
parent 6d14602dd2
commit b478286f47
Signed by: edpibu
GPG key ID: 9833D3C5A25BD227
3 changed files with 71 additions and 79 deletions

View file

@ -94,27 +94,21 @@ main {
grid-column: 2; grid-column: 2;
grid-row: 1; grid-row: 1;
overflow-x: hidden; overflow-x: hidden;
display: grid;
grid-template-columns: max-content 1fr;
grid-gap: var(--gap);
h2.new { h2.new {
opacity: 0.8; opacity: 0.8;
} }
& > * { .split {
grid-column: 1 / -1; 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 > :first-child {
& > section { margin-top: 0;
&.accounts {
grid-column: 1;
}
&.categories {
grid-column: 2;
}
} }
} }
} }
@ -159,7 +153,7 @@ nav {
} }
} }
:is(nav, main) > :first-child, :is(nav, main) > :first-child,
main > section > :first-child { main > section:first-child > :first-child {
margin-top: 0; margin-top: 0;
} }
footer { footer {
@ -231,7 +225,7 @@ h1,
h2, h2,
h3 { h3 {
font-weight: 300; font-weight: 300;
margin-top: var(--gap); margin-top: 1em;
margin-bottom: 0.5em; margin-bottom: 0.5em;
line-height: 1cap; line-height: 1cap;
} }

View file

@ -8,6 +8,7 @@
{% css "main/css/plot.css" %} {% css "main/css/plot.css" %}
{% endblock %} {% endblock %}
{% block body %} {% block body %}
<div class="split">
<section class="accounts"> <section class="accounts">
<h2>{% translate "Accounts" %}</h2> <h2>{% translate "Accounts" %}</h2>
<table> <table>
@ -55,6 +56,7 @@
{% endspaceless %} {% endspaceless %}
</section> </section>
{% endif %} {% endif %}
</div>
{% if history %} {% if history %}
<section> <section>
<h2>{% translate "History" %}</h2> <h2>{% translate "History" %}</h2>

View file

@ -19,8 +19,6 @@
<h2> <h2>
{% block h2 %}{% endblock %} {% block h2 %}{% endblock %}
</h2> </h2>
<div class="backlinks">
{% block backlinks %}
{% if account %} {% if account %}
<p> <p>
<a class="big-link" href="{{ account.get_absolute_url }}">{{ account.icon|remix }}{{ account }}</a> <a class="big-link" href="{{ account.get_absolute_url }}">{{ account.icon|remix }}{{ account }}</a>
@ -36,8 +34,6 @@
<a href="{% url "search" %}">{% translate "Search" %}</a> <a href="{% url "search" %}">{% translate "Search" %}</a>
</p> </p>
{% endif %} {% endif %}
{% endblock %}
</div>
{% include "main/pagination.html" %} {% include "main/pagination.html" %}
{% block table %}{% endblock %} {% block table %}{% endblock %}
{% include "main/pagination.html" %} {% include "main/pagination.html" %}