From 9ab8fdf29ca7ed4f1aebdbdafee55ab9731a947f Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Sun, 5 May 2024 20:39:04 -0700 Subject: [PATCH] chore: self-host highlightjs theme --- src/lib/styles/tokyo-night-dark.min.css | 8 ++++++++ src/routes/blog/[...slug]/+page.svelte | 9 +-------- 2 files changed, 9 insertions(+), 8 deletions(-) create mode 100644 src/lib/styles/tokyo-night-dark.min.css diff --git a/src/lib/styles/tokyo-night-dark.min.css b/src/lib/styles/tokyo-night-dark.min.css new file mode 100644 index 0000000..dc63ad9 --- /dev/null +++ b/src/lib/styles/tokyo-night-dark.min.css @@ -0,0 +1,8 @@ +pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*! + Theme: Tokyo-night-Dark + origin: https://github.com/enkia/tokyo-night-vscode-theme + Description: Original highlight.js style + Author: (c) Henri Vandersleyen + License: see project LICENSE + Touched: 2022 +*/.hljs-comment,.hljs-meta{color:#565f89}.hljs-deletion,.hljs-doctag,.hljs-regexp,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id,.hljs-selector-pseudo,.hljs-tag,.hljs-template-tag,.hljs-variable.language_{color:#f7768e}.hljs-link,.hljs-literal,.hljs-number,.hljs-params,.hljs-template-variable,.hljs-type,.hljs-variable{color:#ff9e64}.hljs-attribute,.hljs-built_in{color:#e0af68}.hljs-keyword,.hljs-property,.hljs-subst,.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#7dcfff}.hljs-selector-tag{color:#73daca}.hljs-addition,.hljs-bullet,.hljs-quote,.hljs-string,.hljs-symbol{color:#9ece6a}.hljs-code,.hljs-formula,.hljs-section{color:#7aa2f7}.hljs-attr,.hljs-char.escape_,.hljs-keyword,.hljs-name,.hljs-operator{color:#bb9af7}.hljs-punctuation{color:#c0caf5}.hljs{background:#1a1b26;color:#9aa5ce}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700} \ No newline at end of file diff --git a/src/routes/blog/[...slug]/+page.svelte b/src/routes/blog/[...slug]/+page.svelte index ecf6be6..3e41ccc 100644 --- a/src/routes/blog/[...slug]/+page.svelte +++ b/src/routes/blog/[...slug]/+page.svelte @@ -6,6 +6,7 @@ import TocHeader from '$lib/components/Toc/TocHeader.svelte' import '$lib/styles/katex.css' import '$lib/styles/markdown.pcss' + import '$lib/styles/tokyo-night-dark.min.css' const tocStore = createTocStore() @@ -28,14 +29,6 @@ {doc.title} | The Coredump - -