@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: &[User], page: i32, n_pages: i32, posts: Vec) @:base(ctx, blog.title.clone(), {}, { @blog.title }, {
@if let Some(banner_url) = blog.banner_url(ctx.0) {
}

@blog.title ~@blog.fqn

@if ctx.2.clone().and_then(|u| u.is_author_in(ctx.0, &blog).ok()).unwrap_or(false) { @i18n!(ctx.1, "New article") @i18n!(ctx.1, "Edit") }

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

@Html(blog.summary_html.clone())

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

@if posts.is_empty() {

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

}
@for article in posts { @:post_card(ctx, article) }
@paginate(ctx.1, page, n_pages)
})