@use plume_models::blogs::Blog; @use plume_models::posts::Post; @use plume_models::users::User; @use templates::{base, partials::post_card}; @use template_utils::*; @use routes::*; @(ctx: BaseContext, blog: Blog, authors: &Vec, total_articles: i64, page: i32, n_pages: i32, is_author: bool, posts: Vec) @:base(ctx, blog.title.clone(), {}, { @blog.title }, {

@blog.title ~@blog.fqn

@blog.summary

@i18n!(ctx.1, "There's one author on this blog: ", "There are {0} authors on this blog: "; authors.len()) @for author in authors { @author.name() }

@i18n!(ctx.1, "There's one article on this blog", "There are {0} articles on this blog"; total_articles)

@i18n!(ctx.1, "Latest articles") @icon!("rss")

@if posts.len() < 1 {

@i18n!(ctx.1, "No posts to see here yet.")

} @if is_author { @i18n!(ctx.1, "New article") }
@for article in posts { @:post_card(ctx, article) }
@paginate(ctx.1, page, n_pages)
@if is_author {

@i18n!(ctx.1, "Danger zone")

@i18n!(ctx.1, "Be very careful, any action taken here can't be reversed.")

} })