aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-08-05 16:25:25 -0300
committerEuAndreh <eu@euandre.org>2020-08-05 16:25:25 -0300
commit8dc5f1ad747c71c9569a005289af07b42f0f6557 (patch)
treeb32e0d986a47f8f211a8450373ab8089b1316038
parentAdd only public key for eu@euandre.org in public-key.txt (diff)
downloadeuandre.org-8dc5f1ad747c71c9569a005289af07b42f0f6557.tar.gz
euandre.org-8dc5f1ad747c71c9569a005289af07b42f0f6557.tar.xz
Simplify styles.css and setup line number for code blocks
Doesn't work for code blocks with 1000 or more lines, though. It works well enough for now.
-rw-r--r--_config.yml5
-rw-r--r--styles.css29
2 files changed, 14 insertions, 20 deletions
diff --git a/_config.yml b/_config.yml
index 76e89f1..9d623e8 100644
--- a/_config.yml
+++ b/_config.yml
@@ -5,6 +5,11 @@ author:
name: EuAndreh
email: eu@euandre.org
+markdown: kramdown # default markdown renderer for Jekyll
+kramdown:
+ syntax_highlighter_opts:
+ line_numbers: true
+
exclude:
- Gemfile
- Gemfile.lock
diff --git a/styles.css b/styles.css
index 4753faa..5ae6fa3 100644
--- a/styles.css
+++ b/styles.css
@@ -51,29 +51,18 @@ footer li a {
margin-left: 5px;
}
-pre {
- padding: 5px;
- border: 1px solid;
+pre.lineno {
+ margin-right: 3px;
+ padding-right: 3px;
+ border-right: 1px solid;
border-color: hsla(0, 0%, 0%, 0.3);
- border-radius: 5px;
- white-space: pre-wrap;
- counter-reset: line;
-}
-
-code {
- font-family: monospace;
+ text-align: right;
+ user-select: none;
}
-pre a:before {
- color: #aaa;
- content: counter(line);
- counter-increment: line;
- display: inline-block;
- width: 3em;
- margin-left: auto;
- margin-right: 1em;
- padding-left: auto;
- text-align: right;
+pre.highlight {
+ border-top: 1px solid;
+ border-bottom: 1px solid;
}
article .header {