castad front 작업

This commit is contained in:
HyeongBaeYang committed 2025-12-23 11:01:31 +09:00
1 parent aa39cde4c6
commit a42562279e
30 files changed
+4332

No files matched your search

+107
View File
@@ -0,0 +1,107 @@
import React from 'react';
const StatCard: React.FC<{ label: string; value: string; trend: string }> = ({ label, value, trend }) => (
<div className="bg-[#1c2a2e] rounded-xl sm:rounded-2xl p-2 sm:p-3 md:p-4 border border-white/5 flex flex-col justify-center gap-0.5 shadow-lg transition-transform hover:scale-[1.02]">
<span className="text-[8px] sm:text-[9px] md:text-[10px] font-bold text-gray-400 uppercase tracking-widest">{label}</span>
<h3 className="text-lg sm:text-xl md:text-2xl lg:text-3xl font-bold text-white leading-tight">{value}</h3>
<span className="text-[8px] sm:text-[9px] text-[#a6ffea] font-medium">{trend}</span>
</div>
);
const DashboardContent: React.FC = () => {
return (
<div className="w-full h-full p-3 sm:p-4 md:p-6 flex flex-col bg-[#121a1d] text-white overflow-hidden">
<div className="shrink-0 mb-2 sm:mb-3 md:mb-4 ml-10 md:ml-0">
<h1 className="text-lg sm:text-xl md:text-2xl font-bold tracking-tight">대시보드</h1>
<p className="text-[9px] sm:text-[10px] text-gray-500 mt-0.5">실시간 마케팅 퍼포먼스를 확인하세요.</p>
</div>
{/* Top Stats Grid - Fixed height based on content */}
<div className="shrink-0 grid grid-cols-3 gap-2 sm:gap-3 mb-2 sm:mb-3 md:mb-4">
<StatCard label="TOTAL REACH" value="124.5k" trend="지난 주 12%" />
<StatCard label="CONVERSIONS" value="3,892" trend="지난 주 8%" />
<StatCard label="SEO SCORE" value="98/100" trend="지난 주 12%" />
</div>
{/* Engagement Chart Section - Flex-1 to fill remaining space */}
<div className="flex-1 min-h-0 bg-[#1c2a2e] rounded-xl sm:rounded-2xl md:rounded-3xl p-3 sm:p-4 md:p-6 border border-white/5 flex flex-col relative shadow-2xl overflow-hidden">
<div className="shrink-0 flex justify-between items-center mb-2 sm:mb-3 md:mb-4">
<h2 className="text-[8px] sm:text-[9px] md:text-[10px] font-bold text-gray-400 uppercase tracking-widest">Engagement Overview</h2>
<div className="flex gap-1.5 items-center">
<span className="w-1.5 h-1.5 rounded-full bg-[#a6ffea]"></span>
<span className="text-[8px] sm:text-[9px] text-gray-400">Weekly Active</span>
</div>
</div>
<div className="flex-1 relative min-h-0">
{/* Chart SVG - Responsive viewBox and preserveAspectRatio */}
<svg
className="w-full h-full overflow-visible"
viewBox="0 0 1000 400"
preserveAspectRatio="none"
>
<defs>
<linearGradient id="chartGradient" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stopColor="#a6ffea" stopOpacity="0.2" />
<stop offset="100%" stopColor="#a6ffea" stopOpacity="0" />
</linearGradient>
</defs>
{/* Grid Lines */}
{[0, 100, 200, 300, 400].map(y => (
<line key={y} x1="0" y1={y} x2="1000" y2={y} stroke="white" strokeOpacity="0.03" strokeWidth="1" />
))}
{/* Smooth Line Path */}
<path
d="M0,320 C100,340 200,220 300,260 C400,300 450,140 550,180 C650,220 750,340 850,280 C950,220 1000,80 1000,80"
fill="none"
stroke="#a6ffea"
strokeWidth="3"
strokeLinecap="round"
/>
{/* Gradient Fill */}
<path
d="M0,320 C100,340 200,220 300,260 C400,300 450,140 550,180 C650,220 750,340 850,280 C950,220 1000,80 1000,80 V400 H0 Z"
fill="url(#chartGradient)"
/>
{/* Pulsing Dot at X=550, Y=180 */}
<g transform="translate(550, 180)">
<circle r="5" fill="#a6ffea">
<animate attributeName="r" from="5" to="15" dur="2s" repeatCount="indefinite" />
<animate attributeName="opacity" from="0.6" to="0" dur="2s" repeatCount="indefinite" />
</circle>
<circle r="6" fill="#a6ffea" className="drop-shadow-[0_0_12px_rgba(166,255,234,0.8)]" />
</g>
</svg>
{/* Floating Data Badge - Positioning relative to SVG percentage */}
<div
className="absolute top-[45%] left-[55%] -translate-x-1/2 -translate-y-full mb-2 flex flex-col items-center pointer-events-none"
>
<div className="bg-[#a6ffea] text-[#121a1d] px-2 py-0.5 rounded-md text-[9px] sm:text-[10px] font-bold shadow-xl shadow-[#a6ffea33]">
1,234
</div>
<div className="w-0.5 h-2 sm:h-3 bg-[#a6ffea]/50 mt-0.5"></div>
</div>
</div>
{/* X Axis Labels - Fixed bottom */}
<div className="shrink-0 flex justify-between mt-2 sm:mt-3 md:mt-4 px-2 sm:px-4 md:px-6 text-[8px] sm:text-[9px] text-gray-500 font-bold uppercase tracking-widest border-t border-white/5 pt-2 sm:pt-3">
<span>Mon</span>
<span>Tue</span>
<span>Wed</span>
<span>Thu</span>
<span>Fri</span>
<span>Sat</span>
<span>Sun</span>
</div>
</div>
</div>
);
};
export default DashboardContent;