From 26fe4232d7c83ac99dfdef01a3924a4c604b3067 Mon Sep 17 00:00:00 2001 From: imnyang Date: Thu, 13 Mar 2025 21:57:38 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B0=84=EB=8B=A8=EB=AA=85=EB=A3=8C=ED=95=9C?= =?UTF-8?q?=20=EB=94=94=EC=9E=90=EC=9D=B8=EC=9D=84=20=EC=B6=94=EA=B5=AC?= =?UTF-8?q?=ED=95=A9=EB=8B=88=EB=8B=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Home/About.tsx | 33 ++++++++++++++---------- src/components/Home/AboutOld.tsx | 43 ++++++++++++++++++++++++++++++++ src/flag_kr.svg | 27 ++++++++++++++++++++ styles/globals.css | 9 +++++++ 4 files changed, 99 insertions(+), 13 deletions(-) create mode 100644 src/components/Home/AboutOld.tsx create mode 100644 src/flag_kr.svg diff --git a/src/components/Home/About.tsx b/src/components/Home/About.tsx index 58b6f2a..f180602 100644 --- a/src/components/Home/About.tsx +++ b/src/components/Home/About.tsx @@ -1,7 +1,9 @@ import { useEffect, useState } from "react"; +import { Card, CardContent, CardHeader } from "../ui/card"; export default function About() { - const [posts, setPosts] = useState([]); + const [time, setTime] = useState(""); + const [post, setPost] = useState({}); useEffect(() => { fetch("https://api.imnya.ng/rss", { @@ -13,7 +15,7 @@ export default function About() { .then(response => response.json()) .then(data => { if (data) { - setPosts(data.slice(0, 3)); + setPost(data[0] || {}); } else { console.error("Error: data is undefined"); } @@ -21,22 +23,27 @@ export default function About() { .catch(error => console.error("Error fetching posts:", error)); }, []); + useEffect(() => { + const interval = setInterval(() => { + setTime(new Date().toLocaleTimeString('en-US', { timeZone: 'Asia/Seoul', hour12: false, hour: '2-digit', minute: '2-digit', second: '2-digit', fractionalSecondDigits: 3 })); + }, 1); + return () => clearInterval(interval); + }, []); return (

πŸ€” About

-

μ•ˆλ…•ν•˜μ„Έμš”! μ €λŠ” μ•”λƒ₯μ΄λΌλŠ” μ΄λ¦„μœΌλ‘œ ν™œλ™ν•˜κ³  μžˆλŠ” 학생 개발자 λ‚¨ν˜„μ„μž…λ‹ˆλ‹€.

-

With Sqlare, TEAM. ORYGON:IX

-
- 졜근 λΈ”λ‘œκ·Έ κΈ€ -
    - {posts.map((post, index) => ( -
  • - {post.title} -
  • - ))} -
+
+
+

항상 μƒˆλ‘œμš΄ 것을 μ°ΎλŠ”

+

학생 개발자 λ‚¨ν˜„μ„μž…λ‹ˆλ‹€.

+
+ +
+ +

In South Korea : {time}

+

졜근 λΈ”λ‘œκ·Έ 보기 : {post.title}

); diff --git a/src/components/Home/AboutOld.tsx b/src/components/Home/AboutOld.tsx new file mode 100644 index 0000000..58b6f2a --- /dev/null +++ b/src/components/Home/AboutOld.tsx @@ -0,0 +1,43 @@ +import { useEffect, useState } from "react"; + +export default function About() { + const [posts, setPosts] = useState([]); + + useEffect(() => { + fetch("https://api.imnya.ng/rss", { + method: "GET", + headers: { + "Content-Type": "application/json" + } + }) + .then(response => response.json()) + .then(data => { + if (data) { + setPosts(data.slice(0, 3)); + } else { + console.error("Error: data is undefined"); + } + }) + .catch(error => console.error("Error fetching posts:", error)); + }, []); + + return ( +
+
+

πŸ€” About

+

μ•ˆλ…•ν•˜μ„Έμš”! μ €λŠ” μ•”λƒ₯μ΄λΌλŠ” μ΄λ¦„μœΌλ‘œ ν™œλ™ν•˜κ³  μžˆλŠ” 학생 개발자 λ‚¨ν˜„μ„μž…λ‹ˆλ‹€.

+

With Sqlare, TEAM. ORYGON:IX

+
+
+ 졜근 λΈ”λ‘œκ·Έ κΈ€ +
    + {posts.map((post, index) => ( +
  • + {post.title} +
  • + ))} +
+
+
+ ); +} \ No newline at end of file diff --git a/src/flag_kr.svg b/src/flag_kr.svg new file mode 100644 index 0000000..18f9c7a --- /dev/null +++ b/src/flag_kr.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/styles/globals.css b/styles/globals.css index 922d49a..10b50d7 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -1,4 +1,5 @@ @import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css"); +@import url('https://cdn.jsdelivr.net/gh/toss/tossface/dist/tossface.css'); @import "tailwindcss"; @plugin "tailwindcss-animate"; @@ -14,6 +15,14 @@ font-family: "NType82Headline" !important; } +.tossface { + font-family: Tossface; +} + +.tnum { + font-feature-settings: "tnum"; +} + * { font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, system-ui, Roboto, "Helvetica Neue", "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif; }