feat: add styling for MIXTAPE_EMBED

This commit is contained in:
Aravinth Manivannan 2023-02-17 18:38:21 +05:30
parent bedbef97e8
commit fc371487fd
Signed by: realaravinth
GPG key ID: AD9F0F08E855ED88
2 changed files with 15 additions and 3 deletions

View file

@ -66,7 +66,7 @@ impl<'a, 'b> Markup<'a, 'b> {
"<p>".into()
} else if p.type_ == "PRE" {
"<pre>".into()
} else if p.type_ == "BQ" {
} else if p.type_ == "BQ" || p.type_ == "PQ" {
"<blockquote>".into()
} else if p.type_ == "H1" {
"<h1>".into()
@ -133,8 +133,10 @@ impl<'a, 'b> Markup<'a, 'b> {
state.in_oli = true;
"<ol><li>".into()
}
} else if p.type_ == "MIXTAPE_EMBED" {
"<div class='mixtape'><p>".into()
} else {
log::info!("Unknown type");
log::info!("Unknown type: {}", p.type_);
r#"
<p class="libmedium__meta">
<b>From LibMedium:</b> LibMedium is built by reverse
@ -168,7 +170,7 @@ impl<'a, 'b> Markup<'a, 'b> {
"</p>".into()
} else if p.type_ == "PRE" {
"</pre>".into()
} else if p.type_ == "BQ" {
} else if p.type_ == "BQ" || p.type_ == "PQ" {
"</blockquote>".into()
} else if p.type_ == "H1" {
"</h1>".into()
@ -203,6 +205,8 @@ impl<'a, 'b> Markup<'a, 'b> {
}
} else if p.type_ == "OLI" || p.type_ == "ULI" {
"</li>".into()
} else if p.type_ == "MIXTAPE_EMBED" {
"</p></div>".into()
} else {
"</span>".into()
};

View file

@ -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;
}