From fc371487fdacb7db61156dd6104661a189f72339 Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Fri, 17 Feb 2023 18:38:21 +0530 Subject: [PATCH] feat: add styling for MIXTAPE_EMBED --- src/post.rs | 10 +++++++--- templates/main.css | 8 ++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/post.rs b/src/post.rs index 51ed4ec..11450e4 100644 --- a/src/post.rs +++ b/src/post.rs @@ -66,7 +66,7 @@ impl<'a, 'b> Markup<'a, 'b> { "

".into() } else if p.type_ == "PRE" { "

".into()
-        } else if p.type_ == "BQ" {
+        } else if p.type_ == "BQ" || p.type_ == "PQ" {
             "
".into() } else if p.type_ == "H1" { "

".into() @@ -133,8 +133,10 @@ impl<'a, 'b> Markup<'a, 'b> { state.in_oli = true; "
  1. ".into() } + } else if p.type_ == "MIXTAPE_EMBED" { + "

    ".into() } else { - log::info!("Unknown type"); + log::info!("Unknown type: {}", p.type_); r#"

    From LibMedium: LibMedium is built by reverse @@ -168,7 +170,7 @@ impl<'a, 'b> Markup<'a, 'b> { "

    ".into() } else if p.type_ == "PRE" { "

".into() - } else if p.type_ == "BQ" { + } else if p.type_ == "BQ" || p.type_ == "PQ" { "".into() } else if p.type_ == "H1" { "".into() @@ -203,6 +205,8 @@ impl<'a, 'b> Markup<'a, 'b> { } } else if p.type_ == "OLI" || p.type_ == "ULI" { "".into() + } else if p.type_ == "MIXTAPE_EMBED" { + "

".into() } else { "".into() }; diff --git a/templates/main.css b/templates/main.css index 45a046d..373475e 100644 --- a/templates/main.css +++ b/templates/main.css @@ -184,3 +184,11 @@ ul { overflow-x: scroll; display: block; } + +.mixtape { + padding: 20px; + border: 1px solid gray; + display: flex; + align-items: center; + margin: 30px 0; +}