feat: display private/unlisted alert for article

This commit is contained in:
Oliver Booth 2023-09-20 14:49:02 +01:00
parent 73f5e4e4a2
commit 9885bfaed9
Signed by: oliverbooth
GPG Key ID: E60B570D1B7557B5
1 changed files with 15 additions and 0 deletions

View File

@ -26,6 +26,21 @@
</ol>
</nav>
@switch (post.Visibility)
{
case BlogPostVisibility.Private:
<div class="alert alert-danger" role="alert">
This post is private and can only be viewed by those with the password.
</div>
break;
case BlogPostVisibility.Unlisted:
<div class="alert alert-warning" role="alert">
This post is unlisted and can only be viewed by those with the link.
</div>
break;
}
<h1>@post.Title</h1>
<p class="text-muted">
<img class="blog-author-icon" src="@author.AvatarUrl" alt="@author.DisplayName">