2019-02-26 13:13:00 +01:00
|
|
|
@use plume_models::users::User;
|
2020-01-21 07:02:03 +01:00
|
|
|
@use crate::templates::{base, users::header};
|
|
|
|
@use crate::template_utils::*;
|
|
|
|
@use crate::routes::*;
|
2019-02-26 13:13:00 +01:00
|
|
|
|
|
|
|
@(ctx: BaseContext, user: User, follows: bool, is_remote: bool, remote_url: String, followed: Vec<User>, page: i32, n_pages: i32)
|
|
|
|
|
2019-04-04 21:06:37 +02:00
|
|
|
@:base(ctx, i18n!(ctx.1, "{0}'s subscriptions"; user.name()), {}, {}, {
|
2019-02-26 13:13:00 +01:00
|
|
|
@:header(ctx, &user, follows, is_remote, remote_url)
|
|
|
|
|
|
|
|
@tabs(&[
|
2019-04-06 20:03:00 +02:00
|
|
|
(&uri!(user::details: name = &user.fqn).to_string(), i18n!(ctx.1, "Articles"), false),
|
2019-03-06 18:28:10 +01:00
|
|
|
(&uri!(user::followers: name = &user.fqn, page = _).to_string(), i18n!(ctx.1, "Subscribers"), false),
|
2019-04-06 20:03:00 +02:00
|
|
|
(&uri!(user::followed: name = &user.fqn, page = _).to_string(), i18n!(ctx.1, "Subscriptions"), true)
|
2019-02-26 13:13:00 +01:00
|
|
|
])
|
|
|
|
|
|
|
|
<div class="cards">
|
|
|
|
@for follow in followed {
|
|
|
|
<div class="card">
|
2019-03-06 18:28:10 +01:00
|
|
|
<h3><a href="@uri!(user::details: name = &follow.fqn)">@follow.name()</a> <small>@format!("@{}", &follow.fqn)</small></h3>
|
2019-03-17 20:11:29 +01:00
|
|
|
<main><p>@Html(follow.summary_html)</p></main>
|
2019-02-26 13:13:00 +01:00
|
|
|
</div>
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
@paginate(ctx.1, page, n_pages)
|
|
|
|
})
|