Skip to content

Commit 4fe00ea

Browse files
committed
ダークテーマの色をtomorrowNightで統一
1 parent 3f8028a commit 4fe00ea

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

app/[docs_id]/markdown.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { ExecFile } from "../terminal/exec";
55
import { useChangeTheme } from "./themeToggle";
66
import {
77
tomorrow,
8-
atomOneDark,
8+
tomorrowNight,
99
} from "react-syntax-highlighter/dist/esm/styles/hljs";
1010
import { ReactNode } from "react";
1111
import { getRuntimeLang } from "@/terminal/runtime";
@@ -45,7 +45,7 @@ const components: Components = {
4545
<strong className="text-primary" {...props} />
4646
),
4747
table: ({ node, ...props }) => (
48-
<div className="w-max max-w-full overflow-x-auto mx-auto my-2 rounded-box border border-base-content/5 shadow-sm">
48+
<div className="w-max max-w-full overflow-x-auto mx-auto my-2 rounded-box border border-current/20 shadow-sm">
4949
<table className="table w-max" {...props} />
5050
</div>
5151
),
@@ -94,7 +94,7 @@ function CodeComponent({
9494
[key: string]: unknown;
9595
}) {
9696
const theme = useChangeTheme();
97-
const codetheme = theme === "tomorrow" ? tomorrow : atomOneDark;
97+
const codetheme = theme === "tomorrow" ? tomorrow : tomorrowNight;
9898
const match = /^language-(\w+)(-repl|-exec|-readonly)?\:?(.+)?$/.exec(
9999
className || ""
100100
);
@@ -152,7 +152,7 @@ function CodeComponent({
152152
<SyntaxHighlighter
153153
language={match[1]}
154154
PreTag="div"
155-
className="border border-base-300 mx-2 my-2 rounded-box p-4!"
155+
className="border border-current/20 mx-2 my-2 rounded-box p-4!"
156156
style={codetheme}
157157
{...props}
158158
>
@@ -164,7 +164,7 @@ function CodeComponent({
164164
return (
165165
<SyntaxHighlighter
166166
PreTag="div"
167-
className="border border-base-300 mx-2 my-2 rounded-box p-4!"
167+
className="border border-current/20 mx-2 my-2 rounded-box p-4!"
168168
style={codetheme}
169169
{...props}
170170
>

app/[docs_id]/themeToggle.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export function useChangeTheme() {
66
useEffect(() => {
77
const updateTheme = () => {
88
const theme = document.documentElement.getAttribute("data-theme");
9-
setTheme(theme === "mycdark" ? "twilight" : "tomorrow");
9+
setTheme(theme === "mycdark" ? "tomorrow_night" : "tomorrow");
1010
};
1111

1212
const observer = new MutationObserver(updateTheme);
@@ -21,7 +21,7 @@ export function useChangeTheme() {
2121
}
2222
export function ThemeToggle() {
2323
const theme = useChangeTheme();
24-
const isChecked = theme === "twilight";
24+
const isChecked = theme === "tomorrow_night";
2525
useEffect(() => {
2626
const checkIsDarkSchemePreferred = () =>
2727
window?.matchMedia?.("(prefers-color-scheme:dark)")?.matches ?? false;

app/terminal/editor.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const AceEditor = dynamic(
77
const ace = await import("react-ace");
88
// テーマは色分けが今のTerminal側のハイライト(highlight.js)の実装に近いものを適当に選んだ
99
await import("ace-builds/src-min-noconflict/theme-tomorrow");
10-
await import("ace-builds/src-min-noconflict/theme-twilight");
10+
await import("ace-builds/src-min-noconflict/theme-tomorrow_night");
1111
await import("ace-builds/src-min-noconflict/ext-language_tools");
1212
await import("ace-builds/src-min-noconflict/ext-searchbox");
1313
await import("ace-builds/src-min-noconflict/mode-python");

0 commit comments

Comments
 (0)