mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-14 07:51:01 +00:00
b4e4b497ee
Use uri! to generate links instead of hardcoded urls Fix #110 Fix invalid links needing to be POST forms Translate login message for boost and like directly from template Put js for search in its own file
42 lines
1.3 KiB
HTML
42 lines
1.3 KiB
HTML
@use templates::{base, partials::post_card};
|
|
@use template_utils::*;
|
|
@use plume_models::blogs::Blog;
|
|
@use plume_models::posts::Post;
|
|
@use routes::*;
|
|
|
|
@(ctx: BaseContext, blogs: Vec<Blog>, drafts: Vec<Post>)
|
|
|
|
@:base(ctx, "Your Dashboard", {}, {}, {
|
|
<h1>@i18n!(ctx.1, "Your Dashboard")</h1>
|
|
|
|
<section>
|
|
<h2>@i18n!(ctx.1, "Your Blogs")</h2>
|
|
@if blogs.is_empty() {
|
|
<p>@i18n!(ctx.1, "You don't have any blog yet. Create your own, or ask to join one.")</p>
|
|
}
|
|
<div class="cards">
|
|
@for blog in blogs {
|
|
<div class="card">
|
|
<h3><a href="@uri!(blogs::details: name = blog.actor_id)">@blog.title</a></h3>
|
|
</div>
|
|
}
|
|
</div>
|
|
<a class="button" href="@uri!(blogs::new)">@i18n!(ctx.1, "Start a new blog")</a>
|
|
</section>
|
|
|
|
@if !drafts.is_empty() {
|
|
<section>
|
|
<h2>@i18n!(ctx.1, "Your Drafts")</h2>
|
|
<div class="cards">
|
|
@for draft in drafts {
|
|
@:post_card(ctx, draft)
|
|
}
|
|
</div>
|
|
</section>
|
|
}
|
|
|
|
<section>
|
|
<h2>@i18n!(ctx.1, "Your media")</h2>
|
|
<a class="button" href="@uri!(medias::list)">@i18n!(ctx.1, "Go to your gallery")</a>
|
|
</section>
|
|
})
|