23 lines
610 B
Plaintext
23 lines
610 B
Plaintext
|
@page "/blog/{post}"
|
||
|
|
||
|
@{
|
||
|
if (string.IsNullOrWhiteSpace((string)RouteData.Values["post"]!)) {
|
||
|
return;
|
||
|
}
|
||
|
var post = BlogModel.Posts.FirstOrDefault(p => p.Shorthand == (string)RouteData.Values["post"]!);
|
||
|
if (post == null) {
|
||
|
Response.Redirect("/Error");
|
||
|
return;
|
||
|
}
|
||
|
ViewData["title"] = $"blog >> {post.Shorthand}";
|
||
|
#if (DEBUG)
|
||
|
post.UpdateContent();
|
||
|
#endif
|
||
|
}
|
||
|
|
||
|
<b>@post.PublishedOn.ToString("yyyy-MM-dd")</b> - @Utils.a_an(post.ReadTimeMinutes) @post.ReadTimeMinutes minute read (150 wpm)
|
||
|
<h1 id="post">IPv6-native networking: a project report</h1>
|
||
|
<div align="justify">
|
||
|
@Html.Raw(post.Content)
|
||
|
</div>
|