mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
feat: Update syntax highlighting theme to VS Code dark for improved code readability
This commit is contained in:
@@ -9,7 +9,7 @@ import ReactMarkdown from "react-markdown";
|
||||
// https://github.com/remarkjs/remark-gfm
|
||||
import remarkGfm from "remark-gfm";
|
||||
import SyntaxHighlighter from "react-syntax-highlighter/dist/esm/prism-light";
|
||||
import { a11yDark } from "react-syntax-highlighter/dist/esm/styles/prism";
|
||||
import { vscDarkPlus } from "react-syntax-highlighter/dist/esm/styles/prism";
|
||||
import javascript from "react-syntax-highlighter/dist/esm/languages/prism/javascript";
|
||||
import typescript from "react-syntax-highlighter/dist/esm/languages/prism/typescript";
|
||||
import jsx from "react-syntax-highlighter/dist/esm/languages/prism/jsx";
|
||||
@@ -330,7 +330,7 @@ const MarkdownViewer: FunctionComponent<ComponentProps> = (
|
||||
// eslint-disable-next-line react/no-children-prop
|
||||
children={content}
|
||||
language={match[1]}
|
||||
style={a11yDark}
|
||||
style={vscDarkPlus}
|
||||
className="rounded-lg mt-4 mb-4 !bg-gray-900 !p-2 text-sm"
|
||||
codeTagProps={{ className: "font-mono" }}
|
||||
/>
|
||||
|
||||
@@ -59,8 +59,8 @@
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Syntax highlighting with highlight.js - using One Dark theme for colorful code -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/atom-one-dark.min.css">
|
||||
<!-- Syntax highlighting with highlight.js - using VS Code dark theme -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/vs2015.min.css">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/dockerfile.min.js"></script>
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/languages/yaml.min.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user