aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/static/css/content
diff options
context:
space:
mode:
authorGravatar kosayoda <[email protected]>2021-03-24 19:55:16 +0800
committerGravatar kosayoda <[email protected]>2021-03-24 19:55:16 +0800
commit6ccec0d866c44cd7f9789a396ef6ec6cd2cd5df8 (patch)
tree15ffa3caff8b0a625028d1085a3246683c630d07 /pydis_site/static/css/content
parentSimplify pathlib code and specify file encoding. (diff)
Replace `markdown2` with `markdown` and `python-frontmatter`.
This allows us to properly escape codeblocks within markdown, permalink to headers on a page, and decouples getting metadata from a file and getting generated HTML from the Markdown content.
Diffstat (limited to 'pydis_site/static/css/content')
-rw-r--r--pydis_site/static/css/content/page.css29
1 files changed, 22 insertions, 7 deletions
diff --git a/pydis_site/static/css/content/page.css b/pydis_site/static/css/content/page.css
index f46d6b15..57d7472b 100644
--- a/pydis_site/static/css/content/page.css
+++ b/pydis_site/static/css/content/page.css
@@ -6,11 +6,26 @@ i.has-icon-padding {
padding: 0 10px 25px 0;
}
-pre {
- /*
- * Style it the same as the <code> tag, since highlight.js does not style
- * backgrounds of <pre> tags but bulma does, resulting in a weird off-white
- * border.
- */
- background-color: #282c34;
+/*
+ * Move padding padding from <pre> tag to hljs <code> tags so the padding
+ * space is colored the same as the background of hljs <code> blocks.
+ */
+.content pre {
+ padding: 0;
+}
+
+code.hljs {
+ padding: 1.75em 2em;
+}
+
+/*
+ * Show header permalink on hover.
+ */
+.headerlink {
+ display: none;
+ padding-left: 0.5em;
+}
+
+:is(h1, h2, h3, h4, h5, h6):hover > .headerlink {
+ display: inline;
}