27 lines
699 B
Plaintext
27 lines
699 B
Plaintext
@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")
|
|
|
|
<div id="all-blog-posts">
|
|
@foreach (IBlogPost post in BlogPostService.GetBlogPosts(0, tags: Model.Tag))
|
|
{
|
|
@await Html.PartialAsync("Partials/_BlogCard", post)
|
|
}
|
|
</div>
|
|
|
|
@await Html.PartialAsync("Partials/_PageTabs", new ViewDataDictionary(ViewData)
|
|
{
|
|
["UrlRoot"] = "/blog",
|
|
["Page"] = 1,
|
|
["Tags"] = Model.Tag,
|
|
["PageCount"] = BlogPostService.GetPageCount(visibility: Visibility.Published, tags: Model.Tag)
|
|
}) |