feat: add spoiler warning

This commit is contained in:
Devin Haska 2025-02-01 22:50:46 -08:00
parent 307f1fdedf
commit 3a351af2a8
5 changed files with 33 additions and 2 deletions

View file

@ -10,6 +10,13 @@ layout: "layouts/base"
<h1>{{ title }}</h1>
{% if pullquote %}<p class="text-fadeText flow-space-0.25">{{ pullquote }}</p>{% endif %}
</header>
{% if hasSpoilers %}
<section class="bg-surface radius-0.5 p-1">
<span class="text-secondary">{% include "svgs/triangle-exclamation.svg" %}</span>
<strong>Warning!</strong>
The following may contain spoilers!
</section>
{% endif %}
{% if content %}
<section class="flow">
{{ content | safe }}