refactor: migrate asset directory structure

This commit is contained in:
me
2026-05-08 10:49:55 +05:30
parent 7fe67765d5
commit 6092b3f45f
8 changed files with 1025 additions and 1024 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ export default function App() {
return (
<BrowserRouter>
<main className="relative min-h-screen min-w-screen flex items-center justify-center w-full bg-base-200 before:absolute before:top-0 before:left-0 before:w-full before:h-full before:content-[''] before:opacity-[0.03] before:z-50 before:pointer-events-none before:bg-[url('assets/noise.gif')]">
<main className="relative min-h-screen min-w-screen flex items-center justify-center w-full bg-base-200 before:absolute before:top-0 before:left-0 before:w-full before:h-full before:content-[''] before:opacity-[0.03] before:z-50 before:pointer-events-none before:bg-[url('assets/textures/noise.gif')]">
<Suspense fallback={<SplashScreen />}>
<Routes>
<Route

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Before

Width:  |  Height:  |  Size: 738 KiB

After

Width:  |  Height:  |  Size: 738 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

+53 -52
View File
@@ -1,64 +1,65 @@
import { DotIcon } from "@phosphor-icons/react";
import logo from "../assets/logo.svg";
import "@fontsource/knewave/400.css";
interface LogoProps {
scale?: number;
type?: "inline" | "mono" | "logo" | null;
ul?: boolean;
scale?: number;
type?: "inline" | "mono" | "logo" | null;
ul?: boolean;
}
export default function Logo({
scale = 1,
type = null,
ul = false,
scale = 1,
type = null,
ul = false,
}: LogoProps) {
if (type === "inline") {
return (
<span className={"text-accent font-display italic "}>
pi<span className="text-primary">.</span>&nbsp;ku
<span className="text-primary">.</span>&nbsp;
</span>
);
}
if (type === "inline") {
return (
<span className={"text-accent font-display italic "}>
pi<span className="text-primary">.</span>&nbsp;ku
<span className="text-primary">.</span>&nbsp;
</span>
);
}
if (type === "mono") {
return (
<span className="font-display italic font-bold border-b-3 border-dashed border-stone-800/50">
pi. ku.
</span>
);
}
if (type === "mono") {
return (
<span className="font-display italic font-bold border-b-3 border-dashed border-stone-800/50">
pi. ku.
</span>
);
}
if (type === "logo") {
return (
<img
src="/logo.svg"
alt="Pi. Ku. logo"
className="mx-4"
width={scale * 100}
/>
);
}
if (type === "logo") {
return (
<img
src={logo}
alt="Pi. Ku. logo"
className="mx-4"
width={scale * 100}
/>
);
}
return (
<div
role="img"
aria-label="Pi. Ku. logo"
className={`inline-flex items-baseline justify-center leading-none select-none ${ul ? "ul-wavy" : ""}`}
style={{ fontFamily: "'Knewave', serif", scale }}
>
<span className="text-3xl font-light text-accent">Pi</span>
<DotIcon
weight="fill"
size={12}
className="text-primary translate-y-1 -mx-px"
/>
<span className="text-3xl font-light text-accent">&nbsp;Ku</span>
<DotIcon
weight="fill"
size={12}
className="text-primary translate-y-1 -mx-px"
/>
</div>
);
return (
<div
role="img"
aria-label="Pi. Ku. logo"
className={`inline-flex items-baseline justify-center leading-none select-none ${ul ? "ul-wavy" : ""}`}
style={{ fontFamily: "'Knewave', serif", scale }}
>
<span className="text-3xl font-light text-accent">Pi</span>
<DotIcon
weight="fill"
size={12}
className="text-primary translate-y-1 -mx-px"
/>
<span className="text-3xl font-light text-accent">&nbsp;Ku</span>
<DotIcon
weight="fill"
size={12}
className="text-primary translate-y-1 -mx-px"
/>
</div>
);
}
+1 -1
View File
@@ -5,7 +5,7 @@ export default function SplashScreen() {
return (
<div
data-testid="splash-screen"
className="fixed w-screen h-screen inset-0 flex flex-col items-center justify-center z-9999 before:absolute before:top-0 before:left-0 before:w-full before:h-full before:content-[''] before:opacity-[0.03] before:z-10 before:pointer-events-none before:bg-[url('assets/noise.gif')"
className="fixed w-screen h-screen inset-0 flex flex-col items-center justify-center z-9999 before:absolute before:top-0 before:left-0 before:w-full before:h-full before:content-[''] before:opacity-[0.03] before:z-10 before:pointer-events-none before:bg-[url('assets/textures/noise.gif')"
>
<div className="flex flex-col items-center gap-6 animate-pulse">
<Logo />
+30 -30
View File
@@ -2,39 +2,39 @@ import { XCircleIcon } from "@phosphor-icons/react";
import type { ReactNode } from "react";
interface ModalProps {
isOpen: boolean;
onClose?: () => void;
children: ReactNode;
"data-testid"?: string;
isOpen: boolean;
onClose?: () => void;
children: ReactNode;
"data-testid"?: string;
}
export function Modal({
isOpen,
onClose,
children,
"data-testid": testId,
isOpen,
onClose,
children,
"data-testid": testId,
}: ModalProps) {
if (!isOpen) return null;
if (!isOpen) return null;
return (
<div
data-testid={testId}
className="modal modal-open modal-middle backdrop-blur-md before:absolute before:top-0 before:left-0 before:w-full before:h-full before:content-[''] before:opacity-[0.03] before:z-10 before:pointer-events-none before:bg-[url('assets/noise.gif')]"
>
<div className="modal-box relative bg-base-100/60 flex flex-col items-center text-center gap-6">
{onClose && (
<button
type="button"
data-testid="modal-close-btn"
className="btn btn-sm btn-circle btn-ghost absolute right-2 top-2 z-20"
onClick={onClose}
aria-label="Close"
>
<XCircleIcon size={18} weight="bold" />
</button>
)}
{children}
</div>
</div>
);
return (
<div
data-testid={testId}
className="modal modal-open modal-middle backdrop-blur-md before:absolute before:top-0 before:left-0 before:w-full before:h-full before:content-[''] before:opacity-[0.03] before:z-10 before:pointer-events-none before:bg-[url('assets/textures/noise.gif')]"
>
<div className="modal-box relative bg-base-100/60 flex flex-col items-center text-center gap-6">
{onClose && (
<button
type="button"
data-testid="modal-close-btn"
className="btn btn-sm btn-circle btn-ghost absolute right-2 top-2 z-20"
onClick={onClose}
aria-label="Close"
>
<XCircleIcon size={18} weight="bold" />
</button>
)}
{children}
</div>
</div>
);
}
File diff suppressed because it is too large Load Diff