diff --git a/templates/main.css b/templates/main.css index 3d287ae..3a605f0 100644 --- a/templates/main.css +++ b/templates/main.css @@ -72,6 +72,8 @@ code { .code-block { display: block; + margin: 5px 0; + padding: 20px; } iframe { @@ -145,3 +147,7 @@ blockquote { border-left: 4px solid #333; font-style: italic; } + +ol, ul { + margin-left: 40px; +} diff --git a/templates/post.html b/templates/post.html index 6493b79..8bc724f 100644 --- a/templates/post.html +++ b/templates/post.html @@ -4,6 +4,7 @@ <. include!("./post_meta.html"); .> + <. let mut open_list = false ; .>

<.= data.title .>

@@ -20,6 +21,9 @@

<. let paragraphs = &data.content.body_model.paragraphs; .> <. for (pindex, p) in paragraphs.iter().enumerate() {.> + <. if open_list && p.type_ != "OLI" { .> + + <. } .> <. if pindex == 0 && p.type_ == "H3" {.> <. continue; .> <.}.> @@ -50,6 +54,12 @@ <.} else {.> <.}.> + <.} else if p.type_ == "OLI" {.> + <. if !open_list { .> + <. open_list = true;.> +
    + <. } .> +
  1. <.= p.text .>
  2. <.} else {.>

    <. include!("./_markup.html"); .>