feat: add styling for MIXTAPE_EMBED
This commit is contained in:
parent
bedbef97e8
commit
fc371487fd
10
src/post.rs
10
src/post.rs
@ -66,7 +66,7 @@ impl<'a, 'b> Markup<'a, 'b> {
|
|||||||
"<p>".into()
|
"<p>".into()
|
||||||
} else if p.type_ == "PRE" {
|
} else if p.type_ == "PRE" {
|
||||||
"<pre>".into()
|
"<pre>".into()
|
||||||
} else if p.type_ == "BQ" {
|
} else if p.type_ == "BQ" || p.type_ == "PQ" {
|
||||||
"<blockquote>".into()
|
"<blockquote>".into()
|
||||||
} else if p.type_ == "H1" {
|
} else if p.type_ == "H1" {
|
||||||
"<h1>".into()
|
"<h1>".into()
|
||||||
@ -133,8 +133,10 @@ impl<'a, 'b> Markup<'a, 'b> {
|
|||||||
state.in_oli = true;
|
state.in_oli = true;
|
||||||
"<ol><li>".into()
|
"<ol><li>".into()
|
||||||
}
|
}
|
||||||
|
} else if p.type_ == "MIXTAPE_EMBED" {
|
||||||
|
"<div class='mixtape'><p>".into()
|
||||||
} else {
|
} else {
|
||||||
log::info!("Unknown type");
|
log::info!("Unknown type: {}", p.type_);
|
||||||
r#"
|
r#"
|
||||||
<p class="libmedium__meta">
|
<p class="libmedium__meta">
|
||||||
<b>From LibMedium:</b> LibMedium is built by reverse
|
<b>From LibMedium:</b> LibMedium is built by reverse
|
||||||
@ -168,7 +170,7 @@ impl<'a, 'b> Markup<'a, 'b> {
|
|||||||
"</p>".into()
|
"</p>".into()
|
||||||
} else if p.type_ == "PRE" {
|
} else if p.type_ == "PRE" {
|
||||||
"</pre>".into()
|
"</pre>".into()
|
||||||
} else if p.type_ == "BQ" {
|
} else if p.type_ == "BQ" || p.type_ == "PQ" {
|
||||||
"</blockquote>".into()
|
"</blockquote>".into()
|
||||||
} else if p.type_ == "H1" {
|
} else if p.type_ == "H1" {
|
||||||
"</h1>".into()
|
"</h1>".into()
|
||||||
@ -203,6 +205,8 @@ impl<'a, 'b> Markup<'a, 'b> {
|
|||||||
}
|
}
|
||||||
} else if p.type_ == "OLI" || p.type_ == "ULI" {
|
} else if p.type_ == "OLI" || p.type_ == "ULI" {
|
||||||
"</li>".into()
|
"</li>".into()
|
||||||
|
} else if p.type_ == "MIXTAPE_EMBED" {
|
||||||
|
"</p></div>".into()
|
||||||
} else {
|
} else {
|
||||||
"</span>".into()
|
"</span>".into()
|
||||||
};
|
};
|
||||||
|
@ -184,3 +184,11 @@ ul {
|
|||||||
overflow-x: scroll;
|
overflow-x: scroll;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mixtape {
|
||||||
|
padding: 20px;
|
||||||
|
border: 1px solid gray;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin: 30px 0;
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user