41 lines
969 B
Plaintext
41 lines
969 B
Plaintext
@page "/faqs"
|
|
|
|
@{
|
|
// Heading and intro come from the "faqs" page record; fall back to a sensible
|
|
// default only if that record is missing, so the page still renders.
|
|
var title = _page?.Title ?? "FAQs";
|
|
}
|
|
|
|
<PageTitle>@title</PageTitle>
|
|
|
|
<h1>@title</h1>
|
|
|
|
@if (_page is not null && !string.IsNullOrWhiteSpace(_page.Body))
|
|
{
|
|
<article>@Body</article>
|
|
}
|
|
|
|
@if (_unavailable)
|
|
{
|
|
<p>Die Fragen sind gerade nicht erreichbar. Bitte später erneut versuchen.</p>
|
|
}
|
|
else if (_topics.Count == 0)
|
|
{
|
|
<p>Zurzeit gibt es keine Fragen.</p>
|
|
}
|
|
else
|
|
{
|
|
<ul class="faq-topic-list">
|
|
@foreach (var topic in _topics)
|
|
{
|
|
<li>
|
|
<h2><a href="@($"/faqs/{topic.Slug}")">@topic.Title</a></h2>
|
|
@if (!string.IsNullOrWhiteSpace(topic.Intro))
|
|
{
|
|
<div class="faq-topic-intro">@((MarkupString)Markdown.ToHtml(topic.Intro))</div>
|
|
}
|
|
</li>
|
|
}
|
|
</ul>
|
|
}
|