about summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2022-01-11 21:38:46 +0700
committerNguyễn Gia Phong <mcsinyx@disroot.org>2022-01-11 21:38:46 +0700
commitbe55bbfb57421d4f6bcd0cdd73ea97866e9a13ee (patch)
tree8851e7efcb071caa437bb633d1f36f05f8fd87ea
parente7bbdf42812fbbd5af646f69e5f220b9b04966ba (diff)
downloadsite-be55bbfb57421d4f6bcd0cdd73ea97866e9a13ee.tar.gz
Tweak CSS for long nested replies
-rw-r--r--_css/style.css12
-rw-r--r--utils.jl6
2 files changed, 8 insertions, 10 deletions
diff --git a/_css/style.css b/_css/style.css
index fa15219..d7bea79 100644
--- a/_css/style.css
+++ b/_css/style.css
@@ -118,22 +118,18 @@ p, details {
 
 /* Boxes */
 .franklin-content blockquote, .note {
-    margin: 1ex -1rem;
+    margin: 0 -1rem;
     padding-bottom: 1ex;
     padding-left: 0.75rem;
     padding-right: 1rem;
     padding-top: 1ex;
 }
-
 .franklin-content blockquote p, .note p { margin: 1ex 0 }
-
 .note p:first-child { font-weight: bold }
-
 .franklin-content blockquote {
     background: var(--overlay-bg);
-    border-left: 0.25rem solid var(--fade-fg);
+    border-left: 0.25rem solid #8884;
 }
-
 .note {
     background-color: #51affe25;
     border-left: 0.25rem solid var(--blue);
@@ -233,10 +229,8 @@ code, .hljs {
     clear: both;
     margin: 1ex 0;
     overflow: hidden;
-    padding: 1ex;
+    padding: 0 1rem;
 }
-.comment p { margin: 1ex }
-.comment blockquote, .comment .note { margin: -1ex -1ex 0 }
 
 .openring {
     display: flex;
diff --git a/utils.jl b/utils.jl
index f1cba1d..8383740 100644
--- a/utils.jl
+++ b/utils.jl
@@ -22,7 +22,11 @@ function render_comments(template)
   readchomp(`formbox $mbox $(message_id()) $template_path`)
 end
 
-hfun_comments_rendered() = render_comments("comment.html")
+function hfun_comments_rendered()
+  return replace(render_comments("comment.html"),
+                 "<pre><code>" => "<pre><code class=plaintext>")
+end
+
 hfun_comment_rss_feed_url() = joinpath(dirname(locvar(:fd_full_url)),
                                        "comments.xml")