diff --git a/public/ascii-art.html b/public/ascii-art.html new file mode 100644 index 0000000..9e5071e --- /dev/null +++ b/public/ascii-art.html @@ -0,0 +1,99 @@ + + + + + + + + + imnyang + + +
           @@@@@@@@                                                @@@@@@@@@
+          @@        @@                                          @@@        @@
+         @@           @@@               @                    @@             @@
+        @@               @@          @@  @                 @@       @@      @@
+        @@                 @@       @  @@                @@        @@        @
+        @                    @@@   @  @@              @@@         @          @
+       @@                       @@ @ @               @@         @@           @@
+       @@                        @@ @              @@          @@            @@
+       @                          @@ @        @@@@@           @@             @@
+       @                 @@   @@@@             @@            @@ @@@@@@       @@
+       @               @@ @@@                               @@@   @@         @@
+      @@             @@@       @   @@@                      @     @@ @@      @@
+     @@@          @@@@@      @@@@ @@@ @@                   @@       @@@@     @@
+      @@         @ @@      @@@@@      @@@                            @       @
+      @@       @@@@                      @                           @       @
+      @@     @@ @            @                            @         @@      @@
+      @@    @@ @            @                             @@      @@        @@
+      @@  @@@@@    @       @                               @@               @
+       @   @@@    @       @@                                @         @@   @
+       @@ @@@    @        @                    @            @@         @@ @
+         @@@             @@                    @@           @@          @@
+         @@     @        @                      @            @            @
+          @              @                      @            @            @@
+         @@             @@           @          @@           @             @
+         @          @@@@@@          @@@         @@           @             @@
+         @    @ @   @@   @         @@ @@         @           @@            @@
+                @@@      @         @   @@@@@@    @            @            @@
+          @     @         @        @    @@@     @@          @@@@           @@
+          @@    @@@@@@@@@@@@@     @@@@    @@@   @@          @@@@@          @
+          @@    @         @  @    @@@   @@@@@@@@@@@         @   @@        @
+          @@    @   @     @   @@    @     @  @@@@         @@             @@
+         @@    @@    @   @@         @     @   @@     @@ @@              @@
+       @@  @   @@     @@@            @   @@  @      @@@@@   @@         @@
+           @@  @@                      @@@  @     @@ @@@      @@       @
+             @@ @                             @@@     @@        @     @@
+              @  @          @@@                                  @   @ @@
+              @   @@                                             @  @   @
+             @@    @@                                           @   @   @@
+             @       @@                                       @@          @@@@@@@@
+            @@         @@                 @@@@@@@@@@@@@@@@@@@          @@@@@@@@
+          @@             @@@@    @@@@@ @@@         @                     @@
+      @@@                @  @@@@       @ @        @@@                      @@
+  @@@                   @@    @@@      @ @@       @ @@@@@@@@@@@@@@@          @@
+@@                      @@    @@@      @ @@       @                   @@@@@@   @@
+
+ \ No newline at end of file diff --git a/src/app/globals.css b/src/app/globals.css index d0191f5..86caf24 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -48,6 +48,9 @@ --sidebar-accent-foreground: hsl(240 5.9% 10%); --sidebar-border: hsl(340 20% 90%); --sidebar-ring: hsl(217.2 91.2% 59.8%); + + --scrollbar: hsla(340 10% 60% / 0.5); + --scrollbar-hover: hsla(340 10% 60% / 0.8); } .dark { @@ -84,6 +87,9 @@ --sidebar-border: hsl(296, 18%, 15%); --sidebar-ring: hsl(217.2 91.2% 59.8%); --sidebar: hsl(240 5.9% 10%); + + --scrollbar: hsla(340 10% 60% / 0.5); + --scrollbar-hover: hsla(340 10% 60% / 0.8); } @theme inline { diff --git a/src/app/scrollbar.css b/src/app/scrollbar.css index b293db4..48c5624 100644 --- a/src/app/scrollbar.css +++ b/src/app/scrollbar.css @@ -4,13 +4,13 @@ } ::-webkit-scrollbar-thumb { - background: var(--muted-foreground); + background: var(--scrollbar); border: 5px solid var(--background); border-radius: 16px; } ::-webkit-scrollbar-thumb:hover { - background: var(--foreground); + background: var(--scrollbar-hover); } /* ::-webkit-scrollbar:not(.highlighttable, .highlight table, .gist .highlight) { diff --git a/src/components/NeoFetch.tsx b/src/components/NeoFetch.tsx index 7bce4d3..5971682 100644 --- a/src/components/NeoFetch.tsx +++ b/src/components/NeoFetch.tsx @@ -11,7 +11,7 @@ export default function NeoFetch() {
diff --git a/src/components/Projects.tsx b/src/components/Projects.tsx index 2bc70a0..2466014 100644 --- a/src/components/Projects.tsx +++ b/src/components/Projects.tsx @@ -22,7 +22,7 @@ const projects = [ export default function Projects() { return ( -
+
{projects.map((project, idx) => (
diff --git a/src/components/SUPERCOMMAND.tsx b/src/components/SUPERCOMMAND.tsx index 0d3a538..6417bc5 100644 --- a/src/components/SUPERCOMMAND.tsx +++ b/src/components/SUPERCOMMAND.tsx @@ -78,7 +78,14 @@ export default function SUPERCOMMAND() { diff --git a/src/components/Top.tsx b/src/components/Top.tsx index 999be35..ee72831 100644 --- a/src/components/Top.tsx +++ b/src/components/Top.tsx @@ -1,14 +1,21 @@ "use client"; -import Sidebar from "@/components/sidebar"; import Image from "next/image"; import { useEffect, useRef, useState } from "react"; +import Sidebar from "@/components/sidebar"; +import { useIsMobile } from "@/hooks/use-mobile"; export default function Top() { const containerRef = useRef(null); const [randomBg, setRandomBg] = useState(1); + const isMobile = useIsMobile(); + const [clickCount, setClickCount] = useState(0); + const clickTimeoutRef = useRef(null); + const [isMagicalGirlEnabled, setIsMagicalGirlEnabled] = useState(false); + const REQUIRED_CLICKS = 6; useEffect(() => { setRandomBg(Math.floor(Math.random() * 14) + 1); + setIsMagicalGirlEnabled(document.cookie.includes('MagicalGirl=true')); }, []); const requestPermission = async () => { @@ -18,8 +25,8 @@ export default function Top() { window.addEventListener("deviceorientation", handleDeviceOrientation); try { - const res = await (DeviceOrientationEvent as any).requestPermission(); - if (res === "granted") { + const permission = await (DeviceOrientationEvent as unknown as { requestPermission: () => Promise }).requestPermission(); + if (permission === "granted") { window.addEventListener("devicemotion", handleDeviceMotion); window.addEventListener("deviceorientation", handleDeviceOrientation); } @@ -51,6 +58,36 @@ export default function Top() { bg.style.backgroundPosition = `${50 - x * 3}% ${50 - y * 3}%`; }; + const handleBackgroundTouchClick = () => { + if (!isMobile) return; + + setClickCount((prev) => { + const newCount = prev + 1; + + // Clear existing timeout + if (clickTimeoutRef.current) { + clearTimeout(clickTimeoutRef.current); + } + + // Check if required clicks reached + if (newCount >= REQUIRED_CLICKS) { + const newValue = !isMagicalGirlEnabled; + setIsMagicalGirlEnabled(newValue); + + document.cookie = `MagicalGirl=${newValue}; path=/; max-age=${60 * 60 * 24 * 365}`; + window.location.reload(); + return 0; + } + + // Reset click count after 1 second if not enough clicks + clickTimeoutRef.current = setTimeout(() => { + setClickCount(0); + }, 1000); + + return newCount; + }); + }; + useEffect(() => { return () => { window.removeEventListener("deviceorientation", handleDeviceOrientation); @@ -62,10 +99,10 @@ export default function Top() {
{ - // e.preventDefault(); - // window.scrollBy(0, window.innerHeight * (e.deltaY > 0 ? 1 : -1)); - // }} + // onWheel={(e) => { + // e.preventDefault(); + // window.scrollBy(0, window.innerHeight * (e.deltaY > 0 ? 1 : -1)); + // }} >
{ const { clientX, clientY } = e; const { innerWidth, innerHeight } = window; @@ -90,15 +131,17 @@ export default function Top() { } }} > - {/* character */} {/* 이제 그런 애는 없어 */} + {isMagicalGirlEnabled && ( + character + )}
); diff --git a/src/components/timeline.tsx b/src/components/timeline.tsx index 0080c0b..878727c 100644 --- a/src/components/timeline.tsx +++ b/src/components/timeline.tsx @@ -25,7 +25,7 @@ export default function TimelineComponent() { return (

🌠 수상 및 교육

@@ -36,6 +36,7 @@ export default function TimelineComponent() { {years.map((year) => (