chore(icons): nerd-fonts icons included

This commit is contained in:
2026-07-21 23:47:55 +02:00
parent bfc7dd9018
commit f583696295
4 changed files with 37 additions and 2 deletions
+2 -2
View File
@@ -52,8 +52,8 @@ export default function Header({ theme }: HeaderProps) {
</nav>
<div>
<button className="ui-btn ui-btn:hover" onClick={toggleTheme}>
{currentTheme === "macchiato" ? "🌙 Dark" : "☀️ Light"}
<button className="ui-btn ui-btn:hover text-lg font-[NerdFontSymbols]" onClick={toggleTheme}>
{currentTheme === "macchiato" ? "" : ""}
</button>
</div>
</header>
+29
View File
@@ -1,5 +1,6 @@
import {
useEffect,
useRef,
useState,
useMemo,
type ComponentPropsWithoutRef,
@@ -196,6 +197,8 @@ export default function MdProcessor({
})
: null;
const copyRef = useRef<HTMLButtonElement>(null);
if (highlighted) {
return (
<div className="relative border-2 border-ctp-text/50 rounded-md overflow-hidden my-6 bg-ctp-base">
@@ -204,6 +207,32 @@ export default function MdProcessor({
{lang}
</span>
)}
<button
ref={copyRef}
onClick={() => {
navigator.clipboard
.writeText(code)
.then(() => {
if (copyRef.current) {
copyRef.current.textContent =
"Copied!";
setTimeout(
() => {
if (
copyRef.current
)
copyRef.current.textContent =
"\uf0c5";
},
1500,
);
}
});
}}
className="absolute top-1 right-1 px-2 py-1 text-base font-mono text-ctp-subtext0 hover:text-ctp-green transition-colors cursor-pointer select-none z-10 font-[NerdFontSymbols]"
>
</button>
<div
className={`overflow-x-auto text-sm p-4 ${lang ? "pt-7" : ""}`}
dangerouslySetInnerHTML={{