diff --git a/OliverBooth/Pages/Blog/Article.cshtml b/OliverBooth/Pages/Blog/Article.cshtml index 7e3435a..1227679 100644 --- a/OliverBooth/Pages/Blog/Article.cshtml +++ b/OliverBooth/Pages/Blog/Article.cshtml @@ -29,8 +29,15 @@ @Model.Author?.Name • - @post.Published.Humanize() + Published @post.Published.Humanize() + @if (post.Updated is { } updated) + { + + + Updated @updated.Humanize() + + } @if (post.EnableComments) { @@ -75,4 +82,4 @@ else {

Comments are not enabled for this post.

-} +} \ No newline at end of file diff --git a/OliverBooth/Pages/Blog/Index.cshtml b/OliverBooth/Pages/Blog/Index.cshtml index 565a365..c968455 100644 --- a/OliverBooth/Pages/Blog/Index.cshtml +++ b/OliverBooth/Pages/Blog/Index.cshtml @@ -9,6 +9,8 @@ { Author? author = Model.GetAuthor(post); DateTimeOffset published = post.Published; + DateTimeOffset timestamp = post.Updated ?? published; + bool isUpdated = post.Updated.HasValue; var year = published.ToString("yyyy"); var month = published.ToString("MM"); var day = published.ToString("dd"); @@ -33,8 +35,8 @@ @author?.Name • - - @post.Published.Humanize() + + @(isUpdated ? "Updated" : "Published") @timestamp.Humanize() @if (post.EnableComments) {