From c19c094e0c49145b187128ec5ce1b9d38ed6c8be Mon Sep 17 00:00:00 2001 From: fdb-hiroshima <35889323+fdb-hiroshima@users.noreply.github.com> Date: Tue, 9 Apr 2019 15:33:34 +0200 Subject: [PATCH] add diverse links and meta to head (#522) --- src/routes/user.rs | 2 +- templates/base.rs.html | 1 + templates/blogs/details.rs.html | 18 +++++++++++++++++- templates/users/details.rs.html | 20 ++++++++++++++++++-- 4 files changed, 37 insertions(+), 4 deletions(-) diff --git a/src/routes/user.rs b/src/routes/user.rs index 8252469..af2da23 100644 --- a/src/routes/user.rs +++ b/src/routes/user.rs @@ -532,7 +532,7 @@ pub fn atom_feed(name: String, conn: DbConn) -> Option> { .title(author.display_name.clone()) .id(Instance::get_local(&*conn) .unwrap() - .compute_box("~", &name, "atom.xml")) + .compute_box("@", &name, "atom.xml")) .entries( Post::get_recents_for_author(&*conn, &author, 15) .ok()? diff --git a/templates/base.rs.html b/templates/base.rs.html index b0840e8..a42ff03 100644 --- a/templates/base.rs.html +++ b/templates/base.rs.html @@ -13,6 +13,7 @@ + @:head() diff --git a/templates/blogs/details.rs.html b/templates/blogs/details.rs.html index 9143093..81664dc 100644 --- a/templates/blogs/details.rs.html +++ b/templates/blogs/details.rs.html @@ -1,4 +1,5 @@ @use plume_models::blogs::Blog; +@use plume_models::instance::Instance; @use plume_models::posts::Post; @use plume_models::users::User; @use templates::{base, partials::post_card}; @@ -7,7 +8,22 @@ @(ctx: BaseContext, blog: Blog, authors: &[User], page: i32, n_pages: i32, posts: Vec) -@:base(ctx, blog.title.clone(), {}, { +@:base(ctx, blog.title.clone(), { + + + + + + + + + + + r + + + +}, { @blog.title }, {