Skip to content

Commit

Permalink
Slightly better UI for page manager.
Browse files Browse the repository at this point in the history
  • Loading branch information
BurnyLlama committed Nov 18, 2024
1 parent 91c61da commit 47ff797
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 19 deletions.
8 changes: 8 additions & 0 deletions scss/control_panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@
}
}

.page-box {
width: 45%;
}

@container (width < 60ch) {
.profile {
grid-template-areas: 'pfp' 'name' 'info';
Expand All @@ -120,4 +124,8 @@
grid-template-columns: auto;
grid-template-rows: repeat(auto, 5);
}

.page-box {
width: 100%;
}
}
38 changes: 19 additions & 19 deletions templates/control_panel/page_manager.html.tera
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,30 @@
</div>
{% endif %}

<div class="box pad margin-bottom">
<h2 icon="handyman">Verktyg</h2>
<div class="box pad">
<h2 icon="pages">Alla sidor:</h2>
<div class="flex wrap gap center">
{% if pages | length > 0 %}
{% for page in pages %}
<div class="box pad margin-bottom page-box">
<h3 class="title">{{ page.title }}</h3>
<p class="path">{{ page.path }}</p>
<div class="actions flex wrap gap">
<a class="btn icon-only" icon="edit_note"
href="/control-panel/pages/edit?path={{ page.path | urlencode }}"></a>
<a class="btn icon-only" icon="open_in_new" href="/{{ page.path }}" target="_blank"></a>
</div>
</div>
{% endfor %}
{% else %}
<p>Det finns inga skapade sidor!</p>
{% endif %}
</div>

<div class="flex wrap gap">
<a href="/control-panel/pages/new" class="btn" icon="post_add">Skapa ny sida</a>
</div>
</div>

<div class="box pad">
<h2 icon="pages">Alla sidor:</h2>
{% if pages | length > 0 %}
{% for page in pages %}
<div class="box pad flex wrap gap">
<p>{{ page.title }}</p>
<p>{{ page.path }}</p>
<a class="btn icon-only" icon="edit_note" href="/control-panel/pages/edit?path={{ page.path | urlencode }}"></a>
<a class="btn icon-only" icon="open_in_new" href="/{{ page.path }}"
target="_blank"></a>
</div>
{% endfor %}
{% else %}
<p>Det finns inga skapade sidor!</p>
{% endif %}
</div>
{% endblock main %}

{% block aside %}
Expand Down

0 comments on commit 47ff797

Please sign in to comment.