Skip to content

Commit

Permalink
More cleanups.
Browse files Browse the repository at this point in the history
  • Loading branch information
BurnyLlama committed Apr 28, 2024
1 parent 1f72056 commit 6af5de0
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
15 changes: 7 additions & 8 deletions scss/box.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@

.box {
background-color: palette.$standout;
margin-bottom: settings.$pad-fixed-xl;
container-type: inline-size;
width: 100%;
border: 1px solid palette.$grey100;
border-radius: 1rem;

// > :not(:last-child) {
// margin-bottom: settings.$pad-fixed-m;
// }
&.pad {
padding: settings.$pad-fixed-m
}

&.margin-bottom {
margin-bottom: settings.$pad-fixed-xl;
}

> h2 {
margin-top: 0;
Expand Down Expand Up @@ -54,8 +57,4 @@
color: palette.$red400;
}
}

&.pad {
padding: settings.$pad-fixed-m
}
}
5 changes: 4 additions & 1 deletion scss/control_panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,13 @@
grid-template-columns: 1fr auto;
grid-template-rows: auto auto;
place-items: start;
background-color: palette.$surface;
padding: settings.$pad-fixed-m;
margin-bottom: settings.$pad-fixed-m;

&:last-child {
margin-bottom: 0;
}

.title {
grid-area: title;
font-family: settings.$font-family-default;
Expand Down
8 changes: 4 additions & 4 deletions templates/control_panel/main.html.tera
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
{% endif %}

{% if creator.role == "Publisher" %}
<div class="box pad">
<div class="box pad margin-bottom">
<h2 icon="admin_panel_settings">Administrativa verktyg</h2>
<div class="flex wrap gap">
<button class="btn" icon="person_add" data-dialog-button="create-user">Skapa ny användare</button>
Expand All @@ -46,7 +46,7 @@
{% if unpublished_texts | length > 0 %}
{% for text in unpublished_texts %}
{% if not text.marked_as_done %}
<div class="article-box">
<div class="article-box box pad">
<p class="title">{{ text.title }} </p>
<p class="date">{{ text.created_at | date(format="%F %T") }}</p>
<div class="flex wrap gap actions">
Expand All @@ -72,7 +72,7 @@
{% if unpublished_texts | length > 0 %}
{% for text in unpublished_texts %}
{% if text.marked_as_done %}
<div class="article-box">
<div class="article-box box pad">
<p class="title">{{ text.title }} </p>
<p class="date">{{ text.created_at | date(format="%F %T") }}</p>
<div class="flex wrap gap actions">
Expand All @@ -94,7 +94,7 @@
<h3>Publicerade texter</h3>
{% if published_texts | length > 0 %}
{% for text in published_texts %}
<div class="article-box">
<div class="article-box box pad">
<p class="title">{{ text.title }} </p>
<p class="date">{{ text.created_at | date(format="%F %T") }}</p>
<div class="flex wrap gap actions">
Expand Down

0 comments on commit 6af5de0

Please sign in to comment.