Serve 503 when PocketBase is unavailable across all content pages
This commit is contained in:
1 parent
0f7e968c16
commit
e242eaf79a
25 files changed
+492
-253
No files matched your search
@@ -1,19 +1,25 @@
|
||||
@page "/posts/{Slug}"
|
||||
|
||||
@if (_post is null)
|
||||
@if (_unavailable)
|
||||
{
|
||||
<PageTitle>Nicht gefunden</PageTitle>
|
||||
<PageTitle>Vorübergehend nicht erreichbar</PageTitle>
|
||||
<p>Der Beitrag ist gerade nicht erreichbar. Bitte später erneut versuchen.</p>
|
||||
}
|
||||
else
|
||||
else if (_post is not null)
|
||||
{
|
||||
<PageTitle>@_post.Title</PageTitle>
|
||||
<nav>
|
||||
<a href="/posts">← Alle Beiträge</a>
|
||||
</nav>
|
||||
<article>
|
||||
<p class="post-meta">
|
||||
<a href="/posts">← Alle Beiträge</a>
|
||||
<time datetime="@_post.Date.ToString("yyyy-MM-dd")">
|
||||
@_post.Date.ToString("d. MMMM yyyy", German)
|
||||
<header>
|
||||
<h1>@_post.Title</h1>
|
||||
<time class="post-meta" datetime="@_post.Date.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture)">
|
||||
@_post.Date.ToString("d. MMMM yyyy", Cultures.German)
|
||||
</time>
|
||||
</p>
|
||||
</header>
|
||||
@Body
|
||||
</article>
|
||||
}
|
||||
@* No post and not unavailable: the slug was unknown; NavigationManager.NotFound()
|
||||
already ran in OnParametersSetAsync and renders the not-found page. *@
|
||||
Reference in new issue
Block a user