@page
@using OliverBooth.Common.Data
@using OliverBooth.Common.Data.Blog
@using OliverBooth.Common.Services
@model Index
@inject IBlogPostService BlogPostService
@{
ViewData["Title"] = "Blog";
}
@await Html.PartialAsync("Partials/_MastodonStatus")
@foreach (IBlogPost post in BlogPostService.GetBlogPosts(0))
{
@await Html.PartialAsync("Partials/_BlogCard", post)
}
@await Html.PartialAsync("Partials/_PageTabs", new ViewDataDictionary(ViewData)
{
["UrlRoot"] = "/blog",
["Page"] = 1,
["PageCount"] = BlogPostService.GetPageCount(visibility: Visibility.Published)
})