-
Notifications
You must be signed in to change notification settings - Fork 2
Feature/home widgets #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
8e56924
feat : ํ์ดํ ํจ๊ณผ ํ
์ ์
Jaeho-Site 91e7725
feat : ํํ์ด์ง 1๋ฒ Cta์น์
๊ตฌํ
Jaeho-Site edd8225
feat : Laptop์ปดํฌ๋ํธ ๊ตฌํ
Jaeho-Site 69b727b
feat : ์คํฌ๋ฆฐ ์ปจํ
์ธ ์ปดํฌ๋ํธ ๊ตฌํ
Jaeho-Site 554136a
feat : ํํ์ด์ง ํ์ด๋ก ์น์
๊ตฌํ
Jaeho-Site 36a08fe
feat : ํํ์ด์ง ์๋น์ค ์น์
๊ตฌํ
Jaeho-Site e0aa8f1
feat : ํ Quote ์น์
๊ตฌํ
Jaeho-Site 07d27eb
feat : ํ faq ์น์
๊ตฌํ
Jaeho-Site f809a52
feat : HomePage ์ปดํฌ๋ํธ ์กฐ๋ฆฝ
Jaeho-Site 0d02f65
refactor : setInterval ์์ requestAnimationFrame ๋ฐฉ์์ผ๋ก ๊ฐ์
Jaeho-Site File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| export { useTypewriter } from './useTypewriter' | ||
| export type { UseTypewriterOptions } from './useTypewriter' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| import { useEffect, useState } from 'react' | ||
|
|
||
| export type UseTypewriterOptions = { | ||
| startDelayMs?: number | ||
| stepMs?: number | ||
| respectReducedMotion?: boolean | ||
| } | ||
|
|
||
| export function useTypewriter( | ||
| text: string, | ||
| options: UseTypewriterOptions = {}, | ||
| ) { | ||
| const { | ||
| startDelayMs = 0, | ||
| stepMs = 100, | ||
| respectReducedMotion = true, | ||
| } = options | ||
|
|
||
| const [typed, setTyped] = useState('') | ||
|
|
||
| useEffect(() => { | ||
| const reduce = | ||
| respectReducedMotion && | ||
| typeof window !== 'undefined' && | ||
| window.matchMedia?.('(prefers-reduced-motion: reduce)').matches | ||
|
|
||
| if (reduce) { | ||
| setTyped(text) | ||
| return | ||
| } | ||
|
|
||
| setTyped('') | ||
| let rafId = 0 | ||
| let startTime: number | null = null | ||
|
|
||
| const tick = (now: number) => { | ||
| if (startTime === null) startTime = now | ||
| const elapsed = now - startTime - startDelayMs | ||
| if (elapsed < 0) { | ||
| rafId = window.requestAnimationFrame(tick) | ||
| return | ||
| } | ||
| const next = Math.min( | ||
| Math.floor(elapsed / stepMs) + 1, | ||
| text.length, | ||
| ) | ||
| setTyped(text.slice(0, next)) | ||
| if (next < text.length) { | ||
| rafId = window.requestAnimationFrame(tick) | ||
| } | ||
| } | ||
|
|
||
| rafId = window.requestAnimationFrame(tick) | ||
|
|
||
| return () => { | ||
| window.cancelAnimationFrame(rafId) | ||
| } | ||
| }, [text, startDelayMs, stepMs, respectReducedMotion]) | ||
|
|
||
| return { typed, done: typed.length >= text.length } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export { HomeCta } from './ui/HomeCta' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| export function HomeCta() { | ||
| return ( | ||
| <section id="cta" className="bg-bg"> | ||
| <div className="mx-auto max-w-content px-6 lg:px-12 pb-24 lg:pb-32"> | ||
| <div className="relative overflow-hidden rounded-2xl"> | ||
| <img | ||
| src="/last-section-get-started.png" | ||
| alt="" | ||
| aria-hidden | ||
| loading="lazy" | ||
| decoding="async" | ||
| className="absolute inset-0 w-full h-full object-cover" | ||
| /> | ||
| <div | ||
| aria-hidden | ||
| className="absolute inset-0" | ||
| style={{ | ||
| background: | ||
| 'linear-gradient(180deg, rgba(20,26,17,0.55) 0%, rgba(20,26,17,0.35) 50%, rgba(20,26,17,0.65) 100%)', | ||
| }} | ||
| /> | ||
|
|
||
| <div className="relative min-h-[360px] lg:min-h-[440px] flex flex-col items-center justify-center text-center px-6 py-20 lg:py-28"> | ||
| <h2 | ||
| className="font-heading font-extrabold uppercase text-white leading-[0.95] tracking-tight" | ||
| style={{ fontSize: 'clamp(40px, 5.5vw, 72px)' }} | ||
| > | ||
| Ready to level up? | ||
| </h2> | ||
| <p className="mt-5 text-white/80 text-rich max-w-xl"> | ||
| ์ง๊ธ GitHub ๊ณ์ ๋ง ์ฐ๊ฒฐํ๋ฉด, 30์ด ์์ ์ฒซ ๋ชจ์๋ฉด์ ์ด ์์๋ฉ๋๋ค. | ||
| </p> | ||
|
|
||
| <a | ||
| href="#login" | ||
| className="mt-10 inline-flex items-center gap-2 pl-5 pr-2 py-2.5 rounded-pill bg-[#e6dfd4] text-sage-900 text-button hover:bg-white transition-colors duration-fast" | ||
| > | ||
| Get Started | ||
| <span | ||
| aria-hidden | ||
| className="inline-flex items-center justify-center w-6 h-6 rounded-pill bg-sage-900 text-white text-[11px]" | ||
| > | ||
| โ | ||
| </span> | ||
| </a> | ||
| </div> | ||
| </div> | ||
| </div> | ||
| </section> | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export { HomeFaq } from './ui/HomeFaq' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,86 @@ | ||
| const faqs = [ | ||
| { | ||
| q: 'Stack Up์ ๋ฌด๋ฃ ํฌ๋ ๋ง์ ์ ๊ณตํ๋์?', | ||
| a: '์ 2ํ์ ๋ฌด๋ฃ ๋ฉด์ ์ธ์ ์ ์ ๊ณตํฉ๋๋ค. ํ๊ต ์ข ํฉ์ค๊ณ ํ๋ก์ ํธ ๊ธฐ์ค์ด๋ผ ๊ฒฐ์ ยท๊ตฌ๋ ๊ธฐ๋ฅ์ ํฌํจ๋์ง ์์์.', | ||
| }, | ||
| { | ||
| q: '์ด๋ค ํ์์ ์ด๋ ฅ์๋ฅผ ์ง์ํ๋์?', | ||
| a: 'Phase 1 ๊ธฐ์ค PDF๋ง ์ง์ํฉ๋๋ค. HWPยทDOCX๋ PDF๋ก ๋ณํ ํ ์ ๋ก๋ํด ์ฃผ์ธ์.', | ||
| }, | ||
| { | ||
| q: 'GitHub ์ธ ๋ค๋ฅธ ๋ก๊ทธ์ธ์ ๊ฐ๋ฅํ๊ฐ์?', | ||
| a: '๋ ํฌ ๋ถ์์ด ํต์ฌ ๊ธฐ๋ฅ์ด๋ผ, Phase 1์์๋ GitHub OAuth๋ง ์ ๊ณตํฉ๋๋ค.', | ||
| }, | ||
| { | ||
| q: '๊ผฌ๋ฆฌ์ง๋ฌธ์ ์ผ๋ง๋ ๋นจ๋ฆฌ ๋ฐ์ ์ ์๋์?', | ||
| a: 'ํ๊ท 3์ด ์ด๋ด ์๋ต์ ๋ชฉํ๋ก ํฉ๋๋ค. Flash ๋ชจ๋ธ๊ณผ ์ฌ์ ๊ตฌ์ถ RAG ์ธ๋ฑ์ค๋ก ์ง์ฐ์ ์ต์ํํด์.', | ||
| }, | ||
| { | ||
| q: '์์ฑยท๋น์ธ์ด ๋ถ์์ ์ด๋ป๊ฒ ๋์ํ๋์?', | ||
| a: 'WebRTC๋ก ๋ง์ดํฌยท์น์บ ์คํธ๋ฆผ์ ๋ฐ์ ๋ง ์๋(WPM)ยท๊ฐํฌ์ดยท์์ ยท์์ธ๋ฅผ ๋ถ์ํฉ๋๋ค. ๊ถํ์ ๊ฑฐ๋ถํ๋ฉด ํ ์คํธ ์ ๋ ฅ์ผ๋ก ์งํํ ์ ์์ด์.', | ||
| }, | ||
| ] | ||
|
|
||
| export function HomeFaq() { | ||
| return ( | ||
| <section id="faq" className="bg-bg"> | ||
| <div className="mx-auto max-w-content px-6 lg:px-12 pt-8 pb-24 lg:pt-12 lg:pb-32"> | ||
| <p className="text-button font-mono uppercase tracking-[0.22em] text-fg-muted"> | ||
| FAQ | ||
| </p> | ||
|
|
||
| <h2 | ||
| className="mt-4 font-heading font-extrabold uppercase text-sage-900 leading-[0.95] tracking-tight" | ||
| style={{ fontSize: 'clamp(40px, 5vw, 64px)' }} | ||
| > | ||
| Questions, answered. | ||
| </h2> | ||
|
|
||
| <div className="mt-12 h-px bg-border" /> | ||
|
|
||
| <div className="mt-10 grid gap-12 lg:grid-cols-12"> | ||
| <div className="lg:col-span-4"> | ||
| <p className="text-rich text-fg-strong/85 leading-relaxed max-w-sm"> | ||
| ์ฌ๊ธฐ์ ์๋ ๊ถ๊ธ์ฆ์ Contact ํ์ด์ง์์ ์ด์ด์ ๋ตํด๋๋ ค์. | ||
| </p> | ||
| <a | ||
| href="#cta" | ||
| className="mt-6 inline-flex items-center gap-2 pl-5 pr-2 py-2.5 rounded-pill bg-sage-800 text-white text-button hover:bg-sage-900 transition-colors duration-fast" | ||
| > | ||
| Contact | ||
| <span | ||
| aria-hidden | ||
| className="inline-flex items-center justify-center w-6 h-6 rounded-pill bg-white/15" | ||
| > | ||
| โ | ||
| </span> | ||
| </a> | ||
| </div> | ||
|
|
||
| <ul className="lg:col-span-8"> | ||
| {faqs.map((f) => ( | ||
| <li key={f.q} className="border-b border-border first:border-t"> | ||
| <details className="group"> | ||
| <summary className="flex items-center justify-between gap-6 py-6 cursor-pointer list-none select-none"> | ||
| <span className="text-fg-strong text-[20px] lg:text-[22px] font-medium leading-snug"> | ||
| {f.q} | ||
| </span> | ||
| <span | ||
| aria-hidden | ||
| className="shrink-0 w-7 h-7 grid place-items-center text-fg-strong text-xl transition-transform duration-normal ease-standard group-open:rotate-45" | ||
| > | ||
| + | ||
| </span> | ||
| </summary> | ||
| <div className="pb-6 pr-12 text-body text-fg-strong/70 leading-relaxed max-w-3xl"> | ||
| {f.a} | ||
| </div> | ||
| </details> | ||
| </li> | ||
| ))} | ||
| </ul> | ||
| </div> | ||
| </div> | ||
| </section> | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export { HomeHero } from './ui/HomeHero' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| import { Laptop } from './Laptop' | ||
| import { ScreenContent } from './ScreenContent' | ||
|
|
||
| export function HomeHero() { | ||
| return ( | ||
| <section | ||
| id="top" | ||
| className="relative overflow-hidden" | ||
| style={{ | ||
| background: | ||
| 'radial-gradient(120% 80% at 50% 0%, #f1ece4 0%, #e9e8e7 60%, #e9e8e7 100%)', | ||
| }} | ||
| > | ||
| <div | ||
| aria-hidden | ||
| className="pointer-events-none absolute inset-0 opacity-[0.18] mix-blend-multiply" | ||
| style={{ | ||
| background: | ||
| 'radial-gradient(60% 50% at 18% 30%, rgba(31,39,27,0.5) 0%, transparent 60%),' + | ||
| 'radial-gradient(40% 35% at 82% 20%, rgba(31,39,27,0.35) 0%, transparent 60%)', | ||
| }} | ||
| /> | ||
|
|
||
| <div className="relative mx-auto max-w-content px-6 lg:px-12 pt-10 pb-12 lg:pt-14 lg:pb-16 flex flex-col items-center"> | ||
| <Laptop> | ||
| <ScreenContent /> | ||
| </Laptop> | ||
|
|
||
| <p className="anim-hero-rise mt-6 lg:mt-8 text-button font-mono uppercase tracking-[0.22em] text-fg-muted [animation-delay:2.2s]"> | ||
| <span className="inline-flex items-center gap-2"> | ||
| <span className="w-1.5 h-1.5 rounded-full bg-success" aria-hidden /> | ||
| Phase 1 ยท MVP ยท 2026 | ||
| </span> | ||
| </p> | ||
| </div> | ||
| </section> | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| import type { ReactNode } from 'react' | ||
|
|
||
| export function Laptop({ children }: { children: ReactNode }) { | ||
| return ( | ||
| <div | ||
| className="anim-laptop-rise relative w-full [animation-delay:0.05s]" | ||
| style={{ | ||
| maxWidth: 'min(820px, calc((100svh - 240px) * 1.6))', | ||
| filter: 'drop-shadow(0 30px 50px rgba(31,39,27,0.22))', | ||
| }} | ||
| > | ||
| {/* Lid */} | ||
| <div | ||
| className="relative rounded-[20px] p-[9px]" | ||
| style={{ | ||
| background: 'linear-gradient(180deg, #d8d6d2 0%, #c9c6c2 100%)', | ||
| boxShadow: | ||
| 'inset 0 1px 0 rgba(255,255,255,0.6), 0 1px 2px rgba(31,39,27,0.15)', | ||
| }} | ||
| > | ||
| {/* Bezel */} | ||
| <div | ||
| className="relative rounded-[12px] p-[12px]" | ||
| style={{ background: 'linear-gradient(180deg, #1a1a1a 0%, #0c0c0c 100%)' }} | ||
| > | ||
| {/* Camera dot */} | ||
| <div className="absolute top-[5px] left-1/2 -translate-x-1/2 w-1.5 h-1.5 rounded-full bg-zinc-700" /> | ||
|
|
||
| {/* Screen */} | ||
| <div | ||
| className="relative aspect-[16/10] rounded-[5px] overflow-hidden flex items-center justify-center px-6" | ||
| style={{ | ||
| background: | ||
| 'radial-gradient(120% 100% at 50% 0%, #f5f1ea 0%, #e8e3da 60%, #ddd6cc 100%)', | ||
| }} | ||
| > | ||
| {children} | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
| {/* Base / hinge */} | ||
| <div className="relative mx-auto" style={{ width: '108%' }}> | ||
| <div | ||
| className="h-[12px] -mt-[2px] mx-auto rounded-b-[10px]" | ||
| style={{ | ||
| background: 'linear-gradient(180deg, #c2bfba 0%, #a8a5a0 100%)', | ||
| boxShadow: | ||
| 'inset 0 1px 0 rgba(255,255,255,0.4), 0 8px 12px -6px rgba(31,39,27,0.25)', | ||
| }} | ||
| /> | ||
| <div | ||
| className="absolute top-0 left-1/2 -translate-x-1/2 h-[4px] w-[18%] rounded-b-md" | ||
| style={{ background: '#8e8b86' }} | ||
| /> | ||
| </div> | ||
| </div> | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| import { useTypewriter } from '@/shared/hooks' | ||
|
|
||
| const TYPED_TEXT = 'Stack Up' | ||
|
|
||
| export function ScreenContent() { | ||
| const { typed, done } = useTypewriter(TYPED_TEXT, { | ||
| startDelayMs: 850, | ||
| stepMs: 130, | ||
| }) | ||
|
|
||
| return ( | ||
| <div className="relative text-center w-full"> | ||
| <p className="anim-hero-rise text-caption sm:text-button font-mono uppercase tracking-[0.28em] text-sage-700 [animation-delay:0.5s]"> | ||
| IT Interview Solution | ||
| </p> | ||
|
|
||
| <h1 | ||
| className="anim-hero-rise mt-3 sm:mt-4 text-sage-900 leading-[0.95] inline-block [animation-delay:0.8s]" | ||
| style={{ | ||
| fontFamily: 'var(--font-script)', | ||
| fontSize: 'clamp(56px, 8.4vw, 116px)', | ||
| fontWeight: 700, | ||
| letterSpacing: '-0.01em', | ||
| transform: 'rotate(-2deg)', | ||
| minHeight: '1em', | ||
| }} | ||
| aria-label={TYPED_TEXT} | ||
| > | ||
| <span aria-hidden>{typed}</span> | ||
| <span | ||
| aria-hidden | ||
| className="inline-block align-baseline ml-1" | ||
| style={{ | ||
| width: '3px', | ||
| height: '0.78em', | ||
| background: 'var(--color-sage-800)', | ||
| verticalAlign: '-0.06em', | ||
| animation: done ? 'caret-blink 1s steps(1, end) infinite' : 'none', | ||
| opacity: done ? undefined : 1, | ||
| }} | ||
| /> | ||
| </h1> | ||
|
|
||
| <div className="anim-hero-rise mt-4 sm:mt-6 [animation-delay:2.0s]"> | ||
| <a | ||
| href="#cta" | ||
| className="inline-flex items-center gap-2 px-5 py-2.5 rounded-pill bg-sage-700 text-white text-button hover:bg-sage-800 transition-colors duration-fast" | ||
| > | ||
| Get Started | ||
| <span | ||
| aria-hidden | ||
| className="inline-flex items-center justify-center w-5 h-5 rounded-pill bg-white/15" | ||
| > | ||
| โ | ||
| </span> | ||
| </a> | ||
| </div> | ||
| </div> | ||
| ) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| export { HomeQuote } from './ui/HomeQuote' |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ํ ์คํธ ํ๊ธ์์ฉ ๋ํ๋๋ ์ ๋๋ฉ์ด์ ๋ง๋ค๋ ์ฐ๋ ์ฝ๋์ธ๊ฐ์ ์ข๋ค์