From 4fd76bfbfd232a6169dfac874fb31473831ac2dd Mon Sep 17 00:00:00 2001 From: imnyang Date: Fri, 19 Dec 2025 01:04:17 +0900 Subject: [PATCH] removed --- src/app/layout.tsx | 2 - src/app/page.tsx | 2 - src/components/NeoFetch.tsx | 110 ------------------------ src/components/SUPERCOMMAND.tsx | 97 --------------------- src/components/Top.tsx | 146 -------------------------------- src/components/sidebar.tsx | 26 ------ 6 files changed, 383 deletions(-) delete mode 100644 src/components/NeoFetch.tsx delete mode 100644 src/components/SUPERCOMMAND.tsx delete mode 100644 src/components/Top.tsx delete mode 100644 src/components/sidebar.tsx diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 6e1ed29..b9e52f6 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -3,7 +3,6 @@ import { ThemeProvider } from "@/components/theme-provider" import "./globals.css"; import "./scrollbar.css"; -import SUPERCOMMAND from "@/components/SUPERCOMMAND"; export const metadata: Metadata = { title: "남현석 | :two_hearts: imnya.ng", @@ -26,7 +25,6 @@ export default function RootLayout({ disableTransitionOnChange > {children} - diff --git a/src/app/page.tsx b/src/app/page.tsx index fcf6a70..55a24a5 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -1,7 +1,5 @@ -import NeoFetch from "@/components/NeoFetch"; import Projects from "@/components/Projects"; import TimelineComponent from "@/components/timeline"; -import Top from "@/components/Top"; import Image from "next/image"; import DraggableWindow from "@/components/DraggableWindow"; import ReadmeWindow from "@/components/ReadmeWindow"; diff --git a/src/components/NeoFetch.tsx b/src/components/NeoFetch.tsx deleted file mode 100644 index 5971682..0000000 --- a/src/components/NeoFetch.tsx +++ /dev/null @@ -1,110 +0,0 @@ -"use client"; -import { events } from "@/lib/events"; -import { useIpData } from "../hooks/use-ip-data"; -import { useWakaTimeData } from "../hooks/use-wakatime-data"; - -export default function NeoFetch() { - const ipData = useIpData(); - const wakaTimeData = useWakaTimeData(); - - return ( -
-
- -
- - imnyang@adofai.gg - -

----------

- -

- Uptime:{" "} - {(() => { - const startDate = new Date("2010-11-08T03:00:00+09:00"); - const now = new Date(); - let diff = now.getTime() - startDate.getTime(); - - const years = Math.floor(diff / (1000 * 60 * 60 * 24 * 365)); - diff %= 1000 * 60 * 60 * 24 * 365; - const days = Math.floor(diff / (1000 * 60 * 60 * 24)); - diff %= 1000 * 60 * 60 * 24; - const hours = Math.floor(diff / (1000 * 60 * 60)); - diff %= 1000 * 60 * 60; - const mins = Math.floor(diff / (1000 * 60)); - - return `${years} years, ${days} days, ${hours} hours, ${mins} mins`; - })()} -

- -

- Experience:{" "} - {Object.values(events).flat().length} -

- -

- WakaTime:{" "} - {wakaTimeData?.data?.total_seconds_including_other_language - ? (() => { - const seconds = wakaTimeData.data.total_seconds_including_other_language; - const days = Math.floor(seconds / 86400); - const hours = Math.floor((seconds % 86400) / 3600); - const minutes = Math.floor((seconds % 3600) / 60); - return `${days} days, ${hours} hours, ${minutes} minutes, ${Math.round( - seconds % 60 - )} seconds`; - })() - : "N/A"} -

- -

- Most used Language:{" "} - {wakaTimeData?.data?.languages[0]?.name || "N/A"}{" "} - {wakaTimeData?.data?.languages[0]?.total_seconds - ? (() => { - const seconds = wakaTimeData.data.languages[0].total_seconds; - const days = Math.floor(seconds / 86400); - const hours = Math.floor((seconds % 86400) / 3600); - const minutes = Math.floor((seconds % 3600) / 60); - return `(${days} days, ${hours} hours, ${minutes} minutes, ${Math.round( - seconds % 60 - )} seconds)`; - })() - : "N/A"} -

- -

- Terminal: {ipData} -

- -

- Locale: ko_KR.UTF-8 -

- -
-
-
 
-
-
-
-
-
-
-
- -
 
-
-
-
-
-
-
-
-
-
-
-
- ); -} diff --git a/src/components/SUPERCOMMAND.tsx b/src/components/SUPERCOMMAND.tsx deleted file mode 100644 index 6417bc5..0000000 --- a/src/components/SUPERCOMMAND.tsx +++ /dev/null @@ -1,97 +0,0 @@ -"use client"; -import React from "react"; -import { Button } from "@/components/ui/button" -import { - Dialog, - DialogClose, - DialogContent, - DialogDescription, - DialogFooter, - DialogHeader, - DialogTitle, -} from "@/components/ui/dialog" - -export default function SUPERCOMMAND() { - const [keySequence, setKeySequence] = React.useState(""); - const [showDialog, setShowDialog] = React.useState(false); - const targetSequence = "MAGICALWORLD"; - - const handleKeyDown = (event: KeyboardEvent) => { - // 영문자만 처리 - if (event.key.length === 1 && /[a-zA-Z]/.test(event.key)) { - console.log(keySequence); - console.log(targetSequence); - console.log("Key pressed:", event.key); - setKeySequence(prev => { - const newSequence = prev + event.key; - console.log("New sequence:", newSequence); - - // 목표 시퀀스와 정확히 일치하는지 확인 (대문자만) - if (newSequence === targetSequence) { - console.log("Sequence matched!"); - setShowDialog(true); - return ""; - } - - // 목표 시퀀스의 시작 부분과 일치하는지 확인 (대문자만) - if (targetSequence.startsWith(newSequence)) { - return newSequence; - } - - // 일치하지 않으면 현재 키부터 다시 시작 - const restartSequence = event.key; - if (targetSequence.startsWith(restartSequence)) { - return restartSequence; - } - - // 완전히 초기화 - return ""; - }); - } else { - // 특수키나 숫자가 입력되면 시퀀스 초기화 - setKeySequence(""); - } - }; - - React.useEffect(() => { - window.addEventListener("keydown", handleKeyDown); - return () => { - window.removeEventListener("keydown", handleKeyDown); - }; - }, []); - - return ( - - - - - ??? - -
- -
-
-

{`지금바로 윤회!`} -

-
-
-
- - - -
-
-
-
- ); -} \ No newline at end of file diff --git a/src/components/Top.tsx b/src/components/Top.tsx deleted file mode 100644 index ddb1837..0000000 --- a/src/components/Top.tsx +++ /dev/null @@ -1,146 +0,0 @@ -"use client"; -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 () => { - const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent); - - if (!isIOS) - window.addEventListener("deviceorientation", handleDeviceOrientation); - - try { - const permission = await (DeviceOrientationEvent as unknown as { requestPermission: () => Promise }).requestPermission(); - if (permission === "granted") { - window.addEventListener("devicemotion", handleDeviceMotion); - window.addEventListener("deviceorientation", handleDeviceOrientation); - } - } catch { - window.addEventListener("deviceorientation", handleDeviceOrientation); - } - }; - - const handleDeviceOrientation = (event: DeviceOrientationEvent) => { - if (!containerRef.current) return; - const gamma = event.gamma || 0; - const beta = event.beta || 0; - - const x = (gamma / 90) * -50; - const y = (beta / 180) * -50; - - const bg = containerRef.current; - bg.style.backgroundPosition = `${50 + x}% ${50 + y}%`; - - const img = bg.querySelector("img"); - if (img) img.style.transform = `translate(${x * 2}px, ${y * 2}px)`; - }; - - const handleDeviceMotion = (event: DeviceMotionEvent) => { - if (!containerRef.current || !event.accelerationIncludingGravity) return; - const { x, y } = event.accelerationIncludingGravity; - if (x === null || y === null) return; - const bg = containerRef.current; - 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); - window.removeEventListener("devicemotion", handleDeviceMotion); - }; - }, []); - - return ( -
{ - // e.preventDefault(); - // window.scrollBy(0, window.innerHeight * (e.deltaY > 0 ? 1 : -1)); - // }} - > - -
{ - const { clientX, clientY } = e; - const { innerWidth, innerHeight } = window; - const x = (clientX / innerWidth - 0.5) * -50; - const y = (clientY / innerHeight - 0.5) * -50; - - const bg = e.currentTarget; - if (bg) { - bg.style.backgroundPosition = `${50 + x}% ${50 + y}%`; - } - const img = e.currentTarget.querySelector("img"); - if (img) { - img.style.transform = `translate(${x}px, ${y}px)`; - } - }} - > - character -
-
- ); -} diff --git a/src/components/sidebar.tsx b/src/components/sidebar.tsx deleted file mode 100644 index fb0a9a0..0000000 --- a/src/components/sidebar.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import Image from "next/image"; -import { Popover } from "./ui/popover"; - -export default function Sidebar() { - return ( -
-
- logo -
-

- me@imnya.ng -

-
-
-
- -
-
- ); -}