From c754ef892c49134efc5ea65a75dc8284bab5ff85 Mon Sep 17 00:00:00 2001 From: Colin Reeder Date: Thu, 24 Dec 2020 11:02:30 -0700 Subject: Style changes to better distinguish posts & comments - Add a border around post content - Make comment action links smaller and gray - Use
instead of

around content, as

cannot be nested - Change

style to only have bottom margin - Add a bit more spacing in a few places --- src/components/mod.rs | 14 ++++++++------ src/routes/posts.rs | 5 ++++- 2 files changed, 12 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/components/mod.rs b/src/components/mod.rs index 869f021..793c54c 100644 --- a/src/components/mod.rs +++ b/src/components/mod.rs @@ -52,7 +52,9 @@ pub fn Comment<'a>( {" "} - +

+ +
{ comment.attachments.iter().map(|attachment| { let href = &attachment.url; @@ -66,7 +68,7 @@ pub fn Comment<'a>( }) .collect::>() } -
+
{ if base_data.login.is_some() { Some(render::rsx! { @@ -201,15 +203,15 @@ impl<'a, T: HavingContent + 'a> render::Render for Content<'a, T> { match self.src.content_html() { Some(html) => { let cleaned = ammonia::clean(&html); - writer.write_str("

")?; + writer.write_str("

")?; render::raw!(cleaned.as_ref()).render_into(writer)?; - writer.write_str("

")?; + writer.write_str("
")?; } None => { if let Some(text) = self.src.content_text() { - writer.write_str("

")?; + writer.write_str("

")?; text.render_into(writer)?; - writer.write_str("

")?; + writer.write_str("
")?; } } } diff --git a/src/routes/posts.rs b/src/routes/posts.rs index 7ad0385..100c097 100644 --- a/src/routes/posts.rs +++ b/src/routes/posts.rs @@ -145,6 +145,7 @@ async fn page_post_inner( } }
+

{lang.tr("submitted", None)} {" "} @@ -161,7 +162,9 @@ async fn page_post_inner( } } } - +

+ +
{ if author_is_me(&post.as_ref().author, &base_data.login) || (post.local && base_data.is_site_admin()) { Some(render::rsx! { -- cgit v1.2.3