aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2022-08-30 20:04:29 +0200
committermetamuffin <metamuffin@disroot.org>2022-08-30 20:04:29 +0200
commit1216c64ac850379aa2000d47b110d50c8a883636 (patch)
treeb04494a3dd1d6f8c5f4feaa567ee353d0b80a028
parent30e75b521da3230d99f3ccb4b68471f9b5e3035e (diff)
downloadmetamuffin-blog-1216c64ac850379aa2000d47b110d50c8a883636.tar
metamuffin-blog-1216c64ac850379aa2000d47b110d50c8a883636.tar.bz2
metamuffin-blog-1216c64ac850379aa2000d47b110d50c8a883636.tar.zst
small improvements
-rw-r--r--code/src/syntax_highlight/grammar.rs6
-rw-r--r--code/src/syntax_highlight/theme.rs2
-rw-r--r--content/style.css8
3 files changed, 10 insertions, 6 deletions
diff --git a/code/src/syntax_highlight/grammar.rs b/code/src/syntax_highlight/grammar.rs
index dad2eec..aa4008a 100644
--- a/code/src/syntax_highlight/grammar.rs
+++ b/code/src/syntax_highlight/grammar.rs
@@ -4,14 +4,14 @@ pub fn grammar_for(syntax: &str) -> &'static [(&'static str, &'static [&'static
(
"keyword",
&[
- "fn", "pub", "async", "return", "if", "else", "let", "for", "while", "loop",
- "impl", "for", "trait", "struct", "enum",
+ "fn", "pub", "async", "return", "if", "else", "let", "for", "in", "while",
+ "loop", "impl", "for", "trait", "struct", "enum",
],
),
(
"type",
&[
- "[A-Z][a-z]*",
+ "[A-Z][a-z0-9]*",
"bool",
"usize",
"u8",
diff --git a/code/src/syntax_highlight/theme.rs b/code/src/syntax_highlight/theme.rs
index 77018db..288662a 100644
--- a/code/src/syntax_highlight/theme.rs
+++ b/code/src/syntax_highlight/theme.rs
@@ -3,7 +3,7 @@ pub fn theme(kind: &str) -> &'static str {
"keyword" => "#9999ff",
"macro" => "#ff2863",
"literal" => "#26a6ff",
- "functions" => "#26ffbc",
+ "function" => "#26ffbc",
"types" => "#26ff34",
"identifier" => "#ccff26",
"" => "#ff7c26",
diff --git a/content/style.css b/content/style.css
index 1f7e24e..2a7f010 100644
--- a/content/style.css
+++ b/content/style.css
@@ -14,16 +14,20 @@ nav,article {
margin: 1em;
background-color: var(--bg2);
padding: 1em;
+ border: 0px solid transparent;
+ border-radius: 1em;
}
h1 {font-size: xx-large }
h2 {font-size: x-large }
h3 {font-size: large }
+h4 {font-size: medium }
p,h1,h2,h3,h4,h5,h6,li { font-family: "Ubuntu", sans-serif; }
h1,h2 { color: #b575ff }
-h3 { color: #ff83fd }
-p,li { color: white; margin-left: 2em }
+h3 { color: #ff83fd; margin-left: 1em }
+h4 { color: #ff82b2; margin-left: 2em }
+p,li { color: white; margin-left: 3em }
a { color: #82a8ff; font-style: italic; text-decoration: underline }
hr { border: 1px solid grey }