2024-05-05 18:13:06 +01:00
|
|
|
@page "/blog/page/{pageNumber:int}"
|
|
|
|
@model List
|
|
|
|
@using OliverBooth.Common.Data
|
|
|
|
@using OliverBooth.Common.Data.Blog
|
|
|
|
@using OliverBooth.Common.Services
|
|
|
|
|
|
|
|
@inject IBlogPostService BlogPostService
|
|
|
|
|
|
|
|
@await Html.PartialAsync("Partials/_MastodonStatus")
|
|
|
|
|
|
|
|
<div id="all-blog-posts">
|
2024-07-15 19:38:56 +01:00
|
|
|
@foreach (IBlogPost post in BlogPostService.GetBlogPosts(Model.PageNumber - 1, tags: Model.Tag))
|
2024-05-05 18:13:06 +01:00
|
|
|
{
|
|
|
|
@await Html.PartialAsync("Partials/_BlogCard", post)
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@await Html.PartialAsync("Partials/_PageTabs", new ViewDataDictionary(ViewData)
|
|
|
|
{
|
|
|
|
["UrlRoot"] = "/blog",
|
|
|
|
["Page"] = Model.PageNumber,
|
2024-07-15 19:38:56 +01:00
|
|
|
["Tags"] = Model.Tag,
|
|
|
|
["PageCount"] = BlogPostService.GetPageCount(visibility: Visibility.Published, tags: Model.Tag)
|
2024-05-05 18:13:06 +01:00
|
|
|
})
|