zotan.pw-web/Pages/blog/BlogPost.cshtml

22 lines
537 B
Plaintext
Raw Normal View History

2022-11-20 03:06:41 +01:00
@page "/blog/{post}"
2022-11-26 17:17:38 +01:00
@model BlogPostModel
2022-11-26 13:23:58 +01:00
@using zotanpw.Backend
2022-11-20 03:06:41 +01:00
@{
2022-11-26 17:17:38 +01:00
if (Model.Post == null)
2022-11-20 03:06:41 +01:00
return;
2022-11-26 17:17:38 +01:00
2022-11-20 20:48:22 +01:00
ViewData["title"] = "blog";
2022-11-26 17:17:38 +01:00
ViewData["subtitle"] = Model.Post.Shorthand;
ViewData["desc"] = Model.Post.Title;
2022-11-20 03:06:41 +01:00
#if (DEBUG)
2022-11-26 17:17:38 +01:00
Model.Post.UpdateContentAndMetadata();
2022-11-20 03:06:41 +01:00
#endif
}
2022-11-26 17:17:38 +01:00
<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>
2022-11-21 00:27:32 +01:00
<div style="text-align: justify">
2022-11-26 17:17:38 +01:00
@Html.Raw(Model.Post.Content)
2022-11-20 23:34:41 +01:00
</div>