Skip to content

Commit

Permalink
feat: add styling for MIXTAPE_EMBED
Browse files Browse the repository at this point in the history
  • Loading branch information
realaravinth committed Feb 17, 2023
1 parent bedbef9 commit fc37148
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/post.rs
Expand Up @@ -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()
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()
};
Expand Down
8 changes: 8 additions & 0 deletions templates/main.css
Expand Up @@ -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;
}

0 comments on commit fc37148

Please sign in to comment.