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

@blog.title ~@fqn

@blog.summary

@i18n!(ctx.1, "One author in this blog: ", "{0} authors in this blog: ", authors.len()) @for author in authors { @author.name(ctx.0) }

@i18n!(ctx.1, "One article in this blog", "{0} articles in 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 cancelled.")

} })