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%; flex: 1 100%;
margin: 10px; margin: 10px;
border-radius: 8px; border-radius: 8px;
@ -670,13 +679,6 @@ select, .button {
background: var(--background-three); background: var(--background-three);
color: var(--text-two); 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 i18n %}
{% load custom_tags %} {% load custom_tags %}
<div class="announcement {{ announcement.type }}"> <div class="announcement {{ announcement.type }}">
<div class="announcement-header"> <details class="announcement" open>
<h1 class="announcement">{{ announcement.title }}</h1> <summary class="announcement-header">{{ announcement.title }}</summary>
</div> <p>
<p> {{ announcement.content | render_markdown }}
{{ announcement.content | render_markdown }} </p>
</p> </details>
</div> </div>