Reintroduce time to blog post published date

This commit is contained in:
pancakes 2025-09-16 13:34:55 +10:00
parent daf13e5180
commit cbc4b4cb73
Signed by: pancakes
SSH key fingerprint: SHA256:yrp4c4hhaPoPG07fb4QyQIgAdlbUdsJvUAydJEWnfTw
5 changed files with 9 additions and 9 deletions

View file

@ -1,7 +1,7 @@
--- ---
title: "Minecraft: Bedrock Edition on Waydroid" title: "Minecraft: Bedrock Edition on Waydroid"
description: "A guide to running Minecraft: Bedrock Edition on Linux with Waydroid" description: "A guide to running Minecraft: Bedrock Edition on Linux with Waydroid"
published: 2024-02-29 published: 2024-02-29T21:00:00.000+10:00
edited: 2024-04-24T15:03:00.000+10:00 edited: 2024-04-24T15:03:00.000+10:00
footer: cc_by footer: cc_by
header: header.webp header: header.webp

View file

@ -1,7 +1,7 @@
--- ---
title: Comparison of Misskey Forks title: Comparison of Misskey Forks
description: The Misskey family of Fediverse servers is quite large. While they all share a common origin there are some notable feature differences between them. description: The Misskey family of Fediverse servers is quite large. While they all share a common origin there are some notable feature differences between them.
published: 2024-02-02 published: 2024-02-02T21:47:00.000+10:00
edited: 2025-02-10T19:24:00.000+10:00 edited: 2025-02-10T19:24:00.000+10:00
footer: cc_by footer: cc_by
header: banner.webp header: banner.webp

View file

@ -26,16 +26,16 @@
var edited = Post.Edited ?? DateTime.Now; // this null check should never happen var edited = Post.Edited ?? DateTime.Now; // this null check should never happen
<small> <small>
Posted: Posted:
<RenderDateOnly Dateonly="Post.Published"/> <RenderDateTime Datetime="@Post.Published"/>
&bull; &bull;
Latest edit: Latest edit:
<RenderDateTime Datetime="@(edited)"/> <RenderDateTime Datetime="@edited"/>
</small> </small>
} }
else else
{ {
<small>Posted: <small>Posted:
<RenderDateOnly Dateonly="Post.Published"/> <RenderDateTime Datetime="@Post.Published"/>
</small> </small>
} }
<hr> <hr>

View file

@ -8,14 +8,14 @@
{ {
var edited = post.Edited ?? DateTime.Now; // this null check should never happen var edited = post.Edited ?? DateTime.Now; // this null check should never happen
<small> <small>
Posted: <RenderDateOnly Dateonly="post.Published"/> Posted: <RenderDateTime Datetime="post.Published"/>
&bull; &bull;
Edited: <RenderDateTime Datetime="@(edited)"/> Edited: <RenderDateTime Datetime="@(edited)"/>
</small> </small>
} }
else else
{ {
<small>Posted: <RenderDateOnly Dateonly="post.Published"/></small> <small>Posted: <RenderDateTime Datetime="post.Published"/></small>
} }
</li> </li>
} }

View file

@ -33,7 +33,7 @@ public partial class BlogPosts : ComponentBase
public string Title = null!; public string Title = null!;
public string Description = null!; public string Description = null!;
public DateOnly Published = DateOnly.MinValue; public DateTime Published = DateTime.Today;
public DateTime? Edited; public DateTime? Edited;
public PostFooter? Footer; public PostFooter? Footer;
public string? HeaderFilename; public string? HeaderFilename;
@ -98,7 +98,7 @@ public partial class BlogPosts : ComponentBase
public string? HeaderAlt { get; set; } public string? HeaderAlt { get; set; }
public string? HeaderCaption { get; set; } public string? HeaderCaption { get; set; }
public PostFooter? Footer { get; set; } public PostFooter? Footer { get; set; }
public DateOnly Published { get; set; } public DateTime Published { get; set; }
public DateTime? Edited { get; set; } public DateTime? Edited { get; set; }
} }