Skip to content

Commit

Permalink
๐Ÿ’„ fix: ๋ฐ˜์‘ํ˜• ๋ ˆ์ด์•„์›ƒ ๊ฐœ์„ 
Browse files Browse the repository at this point in the history
- ํ”„๋กœ์ ํŠธ ๋””ํ…Œ์ผ ๋ธŒ๋ ˆ์ดํฌ ํฌ์ธํŠธ ๋ณ€๊ฒฝ
- ๋ชจ๋ฐ”์ผ์—์„œ ์ปค์Šคํ…€ ์ปค์„œ ์ œ๊ฑฐ
- ํ”„๋กœ์ ํŠธ ๋””ํ…Œ์ผ ์„น์…˜ ๊ตฌ์กฐ ๋ณ€๊ฒฝ
  • Loading branch information
gr22nist committed Nov 15, 2024
1 parent 15f08ae commit ccb0a05
Show file tree
Hide file tree
Showing 10 changed files with 180 additions and 97 deletions.
8 changes: 6 additions & 2 deletions components/CustomCursor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { motion, useMotionValue, useSpring } from "framer-motion"
import { useEffect, useState } from "react"
import { useMediaQuery } from "@/hooks/useMediaQuery"

export function CustomCursor() {
const [isHovered, setIsHovered] = useState(false)
Expand All @@ -10,14 +11,15 @@ export function CustomCursor() {
const cursorSize = useMotionValue(16)
const cursorX = useMotionValue(-100)
const cursorY = useMotionValue(-100)
const isMobile = useMediaQuery('(max-width: 768px)')

const springConfig = { damping: 25, stiffness: 200 }
const cursorXSpring = useSpring(cursorX, springConfig)
const cursorYSpring = useSpring(cursorY, springConfig)
const cursorSizeSpring = useSpring(cursorSize, springConfig)

useEffect(() => {
if (typeof window === 'undefined') return
if (typeof window === 'undefined' || isMobile) return

const moveCursor = (e: MouseEvent) => {
cursorX.set(e.clientX)
Expand Down Expand Up @@ -76,7 +78,9 @@ export function CustomCursor() {
window.removeEventListener("mouseup", handleMouseUp)
observer.disconnect()
}
}, [cursorX, cursorY, cursorSize, isHovered])
}, [cursorX, cursorY, cursorSize, isHovered, isMobile])

if (isMobile) return null

return (
<motion.div
Expand Down
20 changes: 16 additions & 4 deletions components/ProjectCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { cn } from '@/lib/utils'
interface ProjectCardProps {
id: string
title: string
description: string
description: string | string[]
tech: string[]
image: string
links: {
Expand Down Expand Up @@ -113,9 +113,21 @@ export function ProjectCard({ id, title, description, tech, image, status }: Pro
{status.main}
</Badge>
</div>
<p className="text-sm text-muted-foreground/80 line-clamp-2">
{description}
</p>
<div className="text-muted-foreground">
{Array.isArray(description) ? (
description.map((desc, index) => (
<p key={index} className="leading-relaxed">
{desc}
</p>
))
) : (
description.split('\n').map((desc, index) => (
<p key={index} className="leading-relaxed">
{desc}
</p>
))
)}
</div>
</div>

<div className="border-t border-transparent" />
Expand Down
23 changes: 15 additions & 8 deletions components/project/Features.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
"use client"

import { Section } from "./Section"
import { Badge } from "@/components/ui/badge"

interface Feature {
title: string
description: string
description: string | string[]
tags?: string[]
}

Expand All @@ -20,13 +19,21 @@ export function Features({ features }: FeaturesProps) {
{features.map((feature, index) => (
<div key={index} className="space-y-4">
<h3 className="text-xl font-semibold">{feature.title}</h3>
<p className="text-muted-foreground">{feature.description}</p>
{feature.tags && (
<div className="text-muted-foreground">
{Array.isArray(feature.description) ? (
feature.description.map((desc, i) => (
<p key={i} className="mt-1">{desc}</p>
))
) : (
<p>{feature.description}</p>
)}
</div>
{feature.tags && feature.tags.length > 0 && (
<div className="flex flex-wrap gap-2">
{feature.tags.map((tag) => (
<Badge key={tag} variant="outline">
{tag}
</Badge>
{feature.tags.map((tag, i) => (
<span key={i} className="text-sm text-muted-foreground">
#{tag}
</span>
))}
</div>
)}
Expand Down
2 changes: 1 addition & 1 deletion components/project/ProjectBackground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const ProjectBackground = () => (
dark:from-gray-950 dark:via-slate-950 dark:to-gray-950 opacity-40 dark:opacity-70"
/>
<div
className="absolute inset-0 [mask-image:url(/noise.svg)] [mask-size:100px]
className="absolute inset-0 [mask-image:url(/images/noise.svg)] [mask-size:100px]
mix-blend-soft-light opacity-30"
/>
</div>
Expand Down
19 changes: 13 additions & 6 deletions components/project/ProjectDetailClient.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import { ProjectSkeleton } from './ProjectSkeleton'
import { ScrollToTop } from '@/components/ScrollToTop'
import Footer from '../layout/Footer'

// ๋™์  ์ž„ํฌํŠธ๋กœ ๋ณ€๊ฒฝ
const ProjectOverview = dynamic(() => import('./ProjectOverview').then(mod => mod.ProjectOverview), {
loading: () => <ProjectSkeleton />
})
Expand Down Expand Up @@ -53,9 +52,17 @@ export function ProjectDetailClient({ project }: ProjectDetailClientProps) {
{/* 1. ํ”„๋กœ์ ํŠธ ์†Œ๊ฐœ */}
<div className="space-y-4">
<h1 className="text-4xl font-bold text-center">{project.title}</h1>
<p className="text-lg text-muted-foreground text-center max-w-2xl mx-auto">
{project.description}
</p>
<div className="text-lg text-muted-foreground text-center max-w-2xl mx-auto">
{Array.isArray(project.description) ? (
project.description.map((desc, index) => (
<p key={index}>{desc}</p>
))
) : (
project.description.split('\n').map((desc, index) => (
<p key={index}>{desc}</p>
))
)}
</div>
</div>

{/* 2. ๊ฐค๋Ÿฌ๋ฆฌ */}
Expand All @@ -72,10 +79,10 @@ export function ProjectDetailClient({ project }: ProjectDetailClientProps) {
)}

{/* 3. ํ”„๋กœ์ ํŠธ ์ƒ์„ธ ์ •๋ณด */}
<div className="grid xl:grid-cols-2 gap-6">
<div className="grid lg:grid-cols-2 gap-6">
{/* ์™ผ์ชฝ: ํ”„๋กœ์ ํŠธ ๊ฐœ์š” */}
<div className="order-first">
<div className="xl:sticky xl:top-20">
<div className="lg:sticky lg:top-20">
<Suspense fallback={<ProjectSkeleton />}>
<div className="p-6 rounded-lg border bg-card/80 backdrop-blur-sm">
<ProjectOverview
Expand Down
50 changes: 32 additions & 18 deletions components/project/TechStacks.tsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,44 @@
import { Badge } from "../ui/badge"
import { Section } from "./Section"
import { Badge } from "../ui/badge"

interface TechStack {
name: string
reason: string
description?: string | string[]
}

interface TechStacksProps {
stacks: {
name: string
reason: string
description?: string
}[]
stacks: TechStack[]
}

export function TechStacks({ stacks }: TechStacksProps) {
return (
<Section title="๊ธฐ์ˆ  ์Šคํƒ ์„ ์ • ์ด์œ ">
<div className="grid gap-8">
<Section title="๊ธฐ์ˆ  ์„ ์ • ์ด์œ ">
<div className="grid gap-4">
{stacks.map((stack, index) => (
<div key={index} className="relative">
<div className="flex items-center gap-3 mb-4">
<h3 className="text-xl font-semibold">{stack.name}</h3>
<Badge variant="outline">{stack.name}</Badge>
</div>
<div className="space-y-3 pl-4 border-l-2 border-border">
<p className="text-muted-foreground">{stack.reason}</p>
{stack.description && (
<p className="text-sm text-muted-foreground/80">{stack.description}</p>
)}
<div
key={index}
className="p-4 rounded-lg bg-foreground/5"
>
<div className="flex flex-wrap items-center gap-3 mb-3">
<h3 className="text-lg font-semibold">{stack.name}</h3>
<Badge variant="secondary">
{stack.reason}
</Badge>
</div>
{stack.description && (
<div className="text-muted-foreground">
{Array.isArray(stack.description) ? (
<ul className="space-y-1.5 list-disc list-inside">
{stack.description.map((desc, i) => (
<li key={i} className="leading-relaxed">{desc}</li>
))}
</ul>
) : (
<p className="leading-relaxed">{stack.description}</p>
)}
</div>
)}
</div>
))}
</div>
Expand Down
Loading

0 comments on commit ccb0a05

Please sign in to comment.