feat: Make announcement collapsable

This commit is contained in:
moanos [he/him] 2024-12-14 08:28:37 +01:00
parent a4f895de81
commit a04270718f
2 changed files with 17 additions and 14 deletions

View File

@ -662,7 +662,16 @@ select, .button {
}
}
.announcement {
.announcement-header {
font-size: 1.2rem;
margin: 0px;
padding: 0px;
color: var(--text-two);
text-shadow: none;
font-weight: bold;
}
div.announcement {
flex: 1 100%;
margin: 10px;
border-radius: 8px;
@ -670,13 +679,6 @@ select, .button {
background: var(--background-three);
color: var(--text-two);
h1 {
font-size: 1.2rem;
margin: 0px;
padding: 0px;
color: var(--text-two);
text-shadow: none;
}
}

View File

@ -1,10 +1,11 @@
{% load i18n %}
{% load custom_tags %}
<div class="announcement {{ announcement.type }}">
<div class="announcement-header">
<h1 class="announcement">{{ announcement.title }}</h1>
</div>
<details class="announcement" open>
<summary class="announcement-header">{{ announcement.title }}</summary>
<p>
{{ announcement.content | render_markdown }}
</p>
</details>
</div>