add: better layout
This commit is contained in:
parent
2cc9ed7445
commit
dbd70d9592
19 changed files with 451 additions and 87 deletions
|
@ -76,7 +76,7 @@ fn parse_text_color_line(output: &mut String, buffer: &mut String, line: &str) {
|
|||
// by this point, we have: !
|
||||
// %color_buffer%main_buffer%%
|
||||
output.push_str(&format!(
|
||||
"<span style=\"color: {color_buffer}\">{buffer}</span>"
|
||||
"<span style=\"color: {color_buffer}\" class=\"color_block\">{buffer}</span>"
|
||||
));
|
||||
|
||||
color_buffer.clear();
|
||||
|
@ -468,7 +468,14 @@ fn parse_image_line(output: &mut String, buffer: &mut String, line: &str) {
|
|||
if in_image {
|
||||
// end
|
||||
output.push_str(&format!(
|
||||
"<img loading=\"lazy\" alt=\"{alt}\" src=\"{buffer}\" />"
|
||||
"<img loading=\"lazy\" alt=\"{alt}\" src=\"{buffer}\" style=\"float: {}\" />",
|
||||
if buffer.ends_with("#left") {
|
||||
"left"
|
||||
} else if buffer.ends_with("#right") {
|
||||
"right"
|
||||
} else {
|
||||
"unset"
|
||||
}
|
||||
));
|
||||
|
||||
alt = String::new();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue