zotan.pw-web/Pages/BlogPost.cshtml

22 lines
509 B
Plaintext
Raw Normal View History

2022-11-20 03:06:41 +01:00
@page "/blog/{post}"
2022-11-26 13:23:58 +01:00
@using zotanpw.Backend
2022-12-02 04:19:01 +01:00
@model BlogPostModel
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>
<div>
2022-11-26 17:17:38 +01:00
@Html.Raw(Model.Post.Content)
2022-11-20 23:34:41 +01:00
</div>