Seed: project-management template (23 files)

This commit is contained in:
2026-07-23 23:01:07 +00:00
parent 1c335d132a
commit 63cd754f46
+9 -9
View File
@@ -82,7 +82,7 @@ export default function TimelinePage() {
<div className="flex flex-wrap items-center gap-4">
{Object.entries(phaseColors).map(([phase, color]) => (
<div key={phase} className="flex items-center gap-2">
<div className={`h-3 w-8 rounded-full \${color.split(" ")[0]}`} />
<div className={`h-3 w-8 rounded-full ${color.split(" ")[0]}`} />
<span className="text-xs text-slate-600">{phase}</span>
</div>
))}
@@ -102,7 +102,7 @@ export default function TimelinePage() {
<div className="w-48 shrink-0 p-4 font-medium text-sm text-slate-500 border-r border-slate-100">Project</div>
<div className="flex-1 flex">
{months.map((month, i) => (
<div key={month} className={`flex-1 p-3 text-center text-xs font-medium border-r border-slate-50 \${i === 3 ? "bg-violet-50/50 text-violet-700" : "text-slate-400"}`}>
<div key={month} className={`flex-1 p-3 text-center text-xs font-medium border-r border-slate-50 ${i === 3 ? "bg-violet-50/50 text-violet-700" : "text-slate-400"}`}>
{month} 2026
</div>
))}
@@ -114,26 +114,26 @@ export default function TimelinePage() {
<div key={idx} className="flex border-b border-slate-50 hover:bg-slate-50/50 transition-colors">
<div className="w-48 shrink-0 p-4 border-r border-slate-100">
<p className="text-sm font-medium text-slate-900">{project.name}</p>
<Badge className={`\${phaseColors[project.phase]} text-[10px] font-medium border-0 mt-1`}>{project.phase}</Badge>
<Badge className={`${phaseColors[project.phase]} text-[10px] font-medium border-0 mt-1`}>{project.phase}</Badge>
</div>
<div className="flex-1 flex items-center relative py-4">
{/* Background grid */}
{months.map((_, i) => (
<div key={i} className={`flex-1 border-r border-slate-50 h-full absolute top-0 \${i === 3 ? "bg-violet-50/30" : ""}`} style={{ left: `\${(i / totalMonths) * 100}%`, width: `\${100 / totalMonths}%` }} />
<div key={i} className={`flex-1 border-r border-slate-50 h-full absolute top-0 ${i === 3 ? "bg-violet-50/30" : ""}`} style={{ left: `${(i / totalMonths) * 100}%`, width: `${100 / totalMonths}%` }} />
))}
{/* Bar */}
<div
className={`absolute h-8 rounded-full \${project.color} opacity-90 shadow-sm flex items-center justify-center animate-fade-up`}
className={`absolute h-8 rounded-full ${project.color} opacity-90 shadow-sm flex items-center justify-center animate-fade-up`}
style={{
left: `\${(project.startMonth / totalMonths) * 100}%`,
width: `\${(project.duration / totalMonths) * 100}%`,
left: `${(project.startMonth / totalMonths) * 100}%`,
width: `${(project.duration / totalMonths) * 100}%`,
}}
>
<span className="text-[10px] font-medium text-white truncate px-3">{project.name}</span>
</div>
{/* Milestones */}
{project.milestones.map((ms, mi) => (
<div key={mi} className="absolute top-1/2 -translate-y-1/2 z-10" style={{ left: `\${((ms.month + 0.5) / totalMonths) * 100}%` }}>
<div key={mi} className="absolute top-1/2 -translate-y-1/2 z-10" style={{ left: `${((ms.month + 0.5) / totalMonths) * 100}%` }}>
<div className="relative group">
<Diamond className="h-4 w-4 text-slate-700 fill-slate-700" />
<div className="absolute bottom-full left-1/2 -translate-x-1/2 mb-1 hidden group-hover:block">
@@ -159,7 +159,7 @@ export default function TimelinePage() {
<CardContent className="space-y-3">
{timelineProjects.flatMap(p => p.milestones.map(ms => ({ project: p.name, ...ms, color: p.color }))).sort((a, b) => a.month - b.month).map((ms, i) => (
<div key={i} className="flex items-center gap-3 p-3 rounded-lg hover:bg-slate-50 transition-colors">
<div className={`h-8 w-8 rounded-lg \${ms.color} flex items-center justify-center`}>
<div className={`h-8 w-8 rounded-lg ${ms.color} flex items-center justify-center`}>
<Diamond className="h-4 w-4 text-white fill-white" />
</div>
<div className="flex-1">