feat: 토정비결 및 PDF 저장 기능 추가
- 토정비결 페이지 구현 (연간/월별 운세) - 분야별 운세 (재물, 건강, 관운, 애정) - PDF 저장 기능 구현 (jsPDF + html2canvas) - 모든 결과 페이지에 PDF 다운로드 기능 추가 - PDFButton 재사용 가능한 컴포넌트 생성 - 홈페이지에 토정비결 링크 추가 - 페이지 간 네비게이션 링크 업데이트 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { calculateSaju } from '@/lib/saju-calculator';
|
||||
import Link from 'next/link';
|
||||
import PDFButton from '../components/PDFButton';
|
||||
|
||||
interface PageProps {
|
||||
searchParams: Promise<{
|
||||
@@ -43,7 +44,7 @@ export default async function ResultPage({ searchParams }: PageProps) {
|
||||
</nav>
|
||||
|
||||
{/* Result Content */}
|
||||
<div className="max-w-6xl mx-auto px-4 py-12">
|
||||
<div id="pdf-content" className="max-w-6xl mx-auto px-4 py-12">
|
||||
{/* Header */}
|
||||
<div className="text-center mb-12">
|
||||
<h1 className="text-4xl md:text-5xl font-bold text-gray-900 mb-4">
|
||||
@@ -232,11 +233,11 @@ export default async function ResultPage({ searchParams }: PageProps) {
|
||||
<p className="text-gray-600 text-sm">두 사람의 궁합 확인</p>
|
||||
</Link>
|
||||
|
||||
<button className="bg-gradient-to-r from-indigo-600 to-purple-600 text-white rounded-xl p-6 shadow-lg hover:shadow-xl transition text-center group">
|
||||
<div className="text-4xl mb-3">📥</div>
|
||||
<h3 className="text-xl font-bold mb-2">PDF 저장</h3>
|
||||
<p className="text-sm opacity-90">내 사주 저장하기</p>
|
||||
</button>
|
||||
<PDFButton
|
||||
elementId="pdf-content"
|
||||
filename={`사주팔자_${yearNum}${monthNum}${dayNum}.pdf`}
|
||||
buttonText="사주 PDF 저장"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user