2023-08-08 21:01:13 +01:00
|
|
|
@page
|
2024-05-05 18:13:06 +01:00
|
|
|
@using OliverBooth.Common.Data
|
|
|
|
@using OliverBooth.Common.Data.Blog
|
2024-05-05 02:18:20 +01:00
|
|
|
@using OliverBooth.Common.Services
|
2023-08-12 20:13:47 +01:00
|
|
|
@model Index
|
2024-05-05 18:13:06 +01:00
|
|
|
@inject IBlogPostService BlogPostService
|
2023-08-06 15:57:23 +01:00
|
|
|
|
2023-08-11 02:08:03 +01:00
|
|
|
@{
|
|
|
|
ViewData["Title"] = "Blog";
|
|
|
|
}
|
|
|
|
|
2024-05-05 13:48:01 +01:00
|
|
|
@await Html.PartialAsync("Partials/_MastodonStatus")
|
2023-08-10 04:56:12 +01:00
|
|
|
|
2024-04-27 16:03:06 +01:00
|
|
|
<div id="all-blog-posts">
|
2024-05-05 18:13:06 +01:00
|
|
|
@foreach (IBlogPost post in BlogPostService.GetBlogPosts(0))
|
|
|
|
{
|
|
|
|
@await Html.PartialAsync("Partials/_BlogCard", post)
|
|
|
|
}
|
2024-04-27 16:03:06 +01:00
|
|
|
</div>
|
|
|
|
|
2024-05-05 18:13:06 +01:00
|
|
|
@await Html.PartialAsync("Partials/_PageTabs", new ViewDataDictionary(ViewData)
|
|
|
|
{
|
|
|
|
["UrlRoot"] = "/blog",
|
2024-05-05 18:16:17 +01:00
|
|
|
["Page"] = 1,
|
2024-05-05 18:13:06 +01:00
|
|
|
["PageCount"] = BlogPostService.GetPageCount(visibility: Visibility.Published)
|
|
|
|
})
|