Render FAQ topics as cards, drop dead scoped CSS

This commit is contained in:
tleininger committed 2026-09-30 14:58:12 +02:00
1 parent 2ea8856d65
commit e38ebf078d
11 files changed
+260 -46

No files matched your search

@@ -0,0 +1,30 @@
@page "/faqs/{Slug}"
@if (_unavailable)
{
<PageTitle>Vorübergehend nicht erreichbar</PageTitle>
<p>Das Thema ist gerade nicht erreichbar. Bitte später erneut versuchen.</p>
}
else if (_topic is not null)
{
<PageTitle>@_topic.Title</PageTitle>
<nav>
<a href="/faqs">&larr; Alle Themen</a>
</nav>
<h1>@_topic.Title</h1>
@if (!string.IsNullOrWhiteSpace(_topic.Intro))
{
<div class="faq-topic-intro">@((MarkupString)Markdown.ToHtml(_topic.Intro))</div>
}
@foreach (var faq in _topic.Faqs)
{
<details class="faq-item">
<summary>@faq.Question</summary>
<div class="faq-answer">
@((MarkupString)Markdown.ToHtml(faq.Answer))
</div>
</details>
}
}
@* No topic and not unavailable: the slug was unknown; NavigationManager.NotFound()
already ran in OnParametersSetAsync and renders the not-found page. *@