Skip to content

Commit

Permalink
fix: tweak theme switch icon
Browse files Browse the repository at this point in the history
  • Loading branch information
Bao Zhiyuan committed Dec 26, 2024
1 parent 6114114 commit d4dfe80
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions moonbit-tour/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M12 3v2.25m6.364.386-1.591 1.591M21 12h-2.25m-.386 6.364-1.591-1.591M12 18.75V21m-4.773-4.227-1.591 1.591M5.25 12H3m4.227-4.773L5.636 5.636M15.75 12a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0Z"
d="M21.752 15.002A9.72 9.72 0 0 1 18 15.75c-5.385 0-9.75-4.365-9.75-9.75 0-1.33.266-2.597.748-3.752A9.753 9.753 0 0 0 3 11.25C3 16.635 7.365 21 12.75 21a9.753 9.753 0 0 0 9.002-5.998Z"
/>
</svg>
</div>
</header>
<main
class="flex flex-grow flex-col bg-gray-100 md:h-[calc(100vh-4rem)] md:flex-row dark:bg-zinc-800"
class="flex flex-grow flex-col bg-gray-100 dark:bg-zinc-800 md:h-[calc(100vh-4rem)] md:flex-row"
>
<section
class="prose flex max-w-none flex-1 flex-col items-center gap-4 p-2 dark:prose-invert prose-h2:capitalize md:justify-between md:overflow-auto md:p-6"
Expand All @@ -40,16 +40,16 @@
</nav>
</section>
<section
class="flex flex-1 flex-col justify-end border-t-2 border-purple-100 md:m-4 md:min-w-0 md:flex-1 md:rounded-md md:border dark:border-purple-800"
class="flex flex-1 flex-col justify-end border-t-2 border-purple-100 dark:border-purple-800 md:m-4 md:min-w-0 md:flex-1 md:rounded-md md:border"
>
<div
id="editor"
class="max-h-96 min-h-60 flex-1 bg-white pl-[10px] pt-4 text-[14px] md:max-h-none md:rounded-t-md dark:bg-[#1e1e1e]"
class="max-h-96 min-h-60 flex-1 bg-white pl-[10px] pt-4 text-[14px] dark:bg-[#1e1e1e] md:max-h-none md:rounded-t-md"
>
%CODE%
</div>
<div
class="min-h-20 overflow-auto bg-gray-50 p-2 md:h-1/3 md:rounded-b-md dark:bg-zinc-900 dark:text-white"
class="min-h-20 overflow-auto bg-gray-50 p-2 dark:bg-zinc-900 dark:text-white md:h-1/3 md:rounded-b-md"
>
<pre id="output"></pre>
</div>
Expand Down
4 changes: 2 additions & 2 deletions moonbit-tour/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ function setTheme(theme: Theme) {
if (theme === "light") {
document.querySelector("html")?.classList.remove("dark");
monaco.editor.setTheme("light-plus");
themeButton.innerHTML = sunSvg;
themeButton.innerHTML = moonSvg;
} else {
document.querySelector("html")?.classList.add("dark");
monaco.editor.setTheme("dark-plus");
themeButton.innerHTML = moonSvg;
themeButton.innerHTML = sunSvg;
}
localStorage.setItem("theme", theme);
}
Expand Down

0 comments on commit d4dfe80

Please sign in to comment.