zotan.pw-web/Pages/BlogPost.cshtml

22 lines
509 B
Plaintext

@page "/blog/{post}"
@using zotanpw.Backend
@model BlogPostModel
@{
if (Model.Post == null)
return;
ViewData["title"] = "blog";
ViewData["subtitle"] = Model.Post.Shorthand;
ViewData["desc"] = Model.Post.Title;
#if (DEBUG)
Model.Post.UpdateContentAndMetadata();
#endif
}
<b>@Model.Post.PublishedOn.ToString("yyyy-MM-dd")</b> - @Utils.a_an(Model.Post.ReadTimeMinutes) @Model.Post.ReadTimeMinutes minute read (150 wpm)
<h1 id="post">@Model.Post.Title</h1>
<div>
@Html.Raw(Model.Post.Content)
</div>