-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
π style: νλ‘μ νΈ λν
μΌ λ μ΄μμ κ°μ
- Loading branch information
Showing
9 changed files
with
213 additions
and
80 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
import { usePathname } from 'next/navigation' | ||
import { useState } from "react" | ||
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from "./ui/dialog" | ||
import { Mail } from "lucide-react" | ||
import { Mail, MessageCircle } from "lucide-react" | ||
import { motion } from "framer-motion" | ||
import { Button } from "./ui/button" | ||
|
||
|
@@ -41,18 +41,29 @@ export function FloatingContact() { | |
</DialogDescription> | ||
</DialogHeader> | ||
<div className="grid gap-4 py-4"> | ||
<Button asChild variant="outline" className="w-full"> | ||
<a href="mailto:[email protected]"> | ||
<Button | ||
asChild | ||
variant="outline" | ||
className="w-full hover:bg-foreground/5 hover:border-foreground/20 transition-colors" | ||
> | ||
<a href="mailto:[email protected]" className="flex items-center gap-2"> | ||
<Mail className="h-4 w-4" /> | ||
μ΄λ©μΌ 보λ΄κΈ° | ||
</a> | ||
</Button> | ||
<Button asChild variant="outline" className="w-full"> | ||
<a href="https://open.kakao.com/o/sHj0RZZg" target="_blank" rel="noopener noreferrer"> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="22" viewBox="0 0 24 22" fill="currentColor"> | ||
<path fillRule="evenodd" clipRule="evenodd" d="M0 9.54732C0 4.04892 5.64534 0 11.9753 0C18.3604 0 24 4.0534 24 9.64417C24 15.1426 18.3547 19.1915 12.0247 19.1915C11.4399 19.1915 10.8844 19.1593 10.3348 19.0947L6.01939 21.9516H5.81928C5.81852 21.9518 5.81776 21.952 5.81699 21.9522C5.78749 21.9601 5.74415 21.9708 5.69231 21.98C5.64319 21.9886 5.56367 22 5.46643 22C5.15978 22 4.9202 21.8848 4.84707 21.8489C4.73768 21.7951 4.58425 21.7047 4.44266 21.5657C4.26165 21.3879 4.11724 21.1606 4.03876 20.9037C3.97365 20.6906 3.92955 20.3658 4.05365 20.0209L4.82498 17.2436C1.98989 15.5429 0 12.7982 0 9.54732ZM11.9753 2.34043C6.37235 2.34043 2.35294 5.84543 2.35294 9.54732C2.35294 11.9834 3.99892 14.2547 6.73366 15.6195L7.59739 16.0505L6.90152 18.5562L9.77914 16.6511L10.2289 16.7191C10.8099 16.8068 11.3919 16.8511 12.0247 16.8511C17.6276 16.8511 21.6471 13.3461 21.6471 9.64417C21.6471 5.84096 17.6219 2.34043 11.9753 2.34043Z" /> | ||
</svg> | ||
μ€ν μ±ν μ°Έμ¬νκΈ° | ||
<Button | ||
asChild | ||
variant="outline" | ||
className="w-full hover:bg-foreground/5 hover:border-foreground/20 transition-colors" | ||
> | ||
<a | ||
href="https://open.kakao.com/o/sLPR7Qaf" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
className="flex items-center gap-2" | ||
> | ||
<MessageCircle className="h-4 w-4" /> | ||
μ€νμ±ν μ°Έμ¬νκΈ° | ||
</a> | ||
</Button> | ||
</div> | ||
|
This file contains 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,124 @@ | ||
"use client" | ||
|
||
import { useState } from "react" | ||
import { ChevronDown, ChevronUp } from "lucide-react" | ||
import { Section } from "./Section" | ||
import { AccordionCard } from "./AccordionCard" | ||
import { Button } from "../ui/button" | ||
import { Badge } from "../ui/badge" | ||
|
||
interface Section { | ||
title: string; | ||
content: string | string[]; | ||
} | ||
|
||
interface AccordionSectionProps { | ||
title: string; | ||
items: { | ||
title: string; | ||
tags?: string[]; | ||
relatedTech?: string[]; | ||
sections: Section[]; | ||
}[]; | ||
action?: React.ReactNode; | ||
} | ||
|
||
export function AccordionSection({ title, items, action }: AccordionSectionProps) { | ||
const [openIndexes, setOpenIndexes] = useState<number[]>([]) | ||
const allOpen = openIndexes.length === items.length | ||
|
||
const toggleAll = () => { | ||
if (allOpen) { | ||
setOpenIndexes([]) | ||
} else { | ||
setOpenIndexes(items.map((_, index) => index)) | ||
} | ||
} | ||
|
||
const toggleItem = (index: number) => { | ||
setOpenIndexes(prev => | ||
prev.includes(index) | ||
? prev.filter(i => i !== index) | ||
: [...prev, index] | ||
) | ||
} | ||
|
||
const renderContent = (content: string | string[]) => { | ||
if (Array.isArray(content)) { | ||
return ( | ||
<ul className="list-disc list-inside text-muted-foreground space-y-1"> | ||
{content.map((item, i) => ( | ||
<li key={i}>{item}</li> | ||
))} | ||
</ul> | ||
) | ||
} | ||
return <p className="text-muted-foreground">{content}</p> | ||
} | ||
|
||
return ( | ||
<Section | ||
title={title} | ||
action={ | ||
action || ( | ||
<Button | ||
variant="ghost" | ||
size="sm" | ||
onClick={toggleAll} | ||
className="flex items-center gap-1" | ||
> | ||
{allOpen ? ( | ||
<> | ||
<ChevronUp className="h-4 w-4" /> | ||
λͺ¨λ μ κΈ° | ||
</> | ||
) : ( | ||
<> | ||
<ChevronDown className="h-4 w-4" /> | ||
λͺ¨λ νΌμΉκΈ° | ||
</> | ||
)} | ||
</Button> | ||
) | ||
} | ||
> | ||
<div className="grid gap-4"> | ||
{items.map((item, index) => ( | ||
<AccordionCard | ||
key={index} | ||
title={item.title} | ||
tags={item.tags?.map(tag => ( | ||
<Badge key={tag} variant="secondary">{tag}</Badge> | ||
))} | ||
isOpen={openIndexes.includes(index)} | ||
onToggle={() => toggleItem(index)} | ||
> | ||
<div className="space-y-6"> | ||
{/* μΉμ λ΄μ© */} | ||
<div className="grid gap-4"> | ||
{item.sections.map((section, i) => ( | ||
<div key={i} className="space-y-2"> | ||
<h4 className="font-medium">{section.title}</h4> | ||
{renderContent(section.content)} | ||
</div> | ||
))} | ||
</div> | ||
|
||
{/* κ΄λ ¨ κΈ°μ νκ·Έ */} | ||
{item.relatedTech && item.relatedTech.length > 0 && ( | ||
<div className="pt-2 border-t"> | ||
<h4 className="font-medium mb-2">κ΄λ ¨ κΈ°μ </h4> | ||
<div className="flex flex-wrap gap-2"> | ||
{item.relatedTech.map((tech) => ( | ||
<Badge key={tech} variant="outline">{tech}</Badge> | ||
))} | ||
</div> | ||
</div> | ||
)} | ||
</div> | ||
</AccordionCard> | ||
))} | ||
</div> | ||
</Section> | ||
) | ||
} |
This file contains 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 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 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 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 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 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
Oops, something went wrong.