From f516e1bb8726022ac3939d11ab5ca0f793f50e92 Mon Sep 17 00:00:00 2001 From: sammyette Date: Thu, 30 Nov 2023 22:00:47 -0400 Subject: [PATCH] website(docs): setup custom syntax highlighting, add line numbers --- website/config.toml | 5 ++++- website/themes/hsh/assets/css/syntax.css | 10 +++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/website/config.toml b/website/config.toml index 0ae7ff2..5c9939f 100644 --- a/website/config.toml +++ b/website/config.toml @@ -30,7 +30,10 @@ enableGitInfo = true unsafe = true [markup.highlight] -style = 'pastie' +lineNos = true +lineNumbersInTable = false +noClasses = false +codeFences = true [author] [author.sammyette] diff --git a/website/themes/hsh/assets/css/syntax.css b/website/themes/hsh/assets/css/syntax.css index 021dcb3..c4885c0 100644 --- a/website/themes/hsh/assets/css/syntax.css +++ b/website/themes/hsh/assets/css/syntax.css @@ -1,11 +1,15 @@ -/* Background */ .bg { background-color: #edfdff; } -/* PreWrapper */ .chroma { background-color: #edfdff; } +.chroma { + display: inline-block; + padding: 0.5em; +} +/* Background */ .bg { background-color: #F7F7F7; } +/* PreWrapper */ .chroma { background-color: #F7F7F7; } /* Other */ .chroma .x { } /* Error */ .chroma .err { color: #a61717; background-color: #e3d2d2 } /* CodeLine */ .chroma .cl { } /* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } /* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; } -/* LineHighlight */ .chroma .hl { background-color: #edfdff } +/* LineHighlight */ .chroma .hl { background-color: #F7F7F7 } /* LineNumbersTable */ .chroma .lnt { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } /* LineNumbers */ .chroma .ln { white-space: pre; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } /* Line */ .chroma .line { display: flex; }