oliverbooth.dev/OliverBooth/Pages/Blog/Article.cshtml

32 lines
908 B
Plaintext
Raw Normal View History

2023-08-08 00:21:22 +01:00
@page "/blog/{year:int}/{month:int}/{day:int}/{slug}"
2023-08-08 00:28:33 +01:00
@using Humanizer
@model OliverBooth.Pages.Blog.Article
@if (Model.Post is { } post)
{
2023-08-08 00:28:33 +01:00
<nav style="--bs-breadcrumb-divider: '>';" aria-label="breadcrumb">
<ol class="breadcrumb">
<li class="breadcrumb-item">
<a asp-page="/blog/index">Blog</a>
</li>
<li class="breadcrumb-item active" aria-current="page">@post.Title</li>
</ol>
</nav>
<h1>@post.Title</h1>
2023-08-08 00:28:33 +01:00
<p class="text-muted">
<img class="blog-author-icon" src="https://gravatar.com/avatar/@Model.Author?.AvatarHash?s=28">
@Model.Author?.Name
&bull;
<abbr data-bs-toggle="tooltip" data-bs-title="@post.Published.ToString("f")">
@post.Published.Humanize()
</abbr>
</p>
<article>
@Html.Raw(Model.SanitizeContent(post.Body))
</article>
<hr>
}