Merge version_5_1782150727878 into main #4

Merged
bender merged 1 commits from version_5_1782150727878 into main 2026-06-22 17:55:00 +00:00
2 changed files with 83 additions and 39 deletions

View File

@@ -1,40 +1,84 @@
// AUTO-GENERATED by per-section-migrate. Edit freely — Bob will treat this
// file as the canonical source for the "dashboard" section.
/* eslint-disable */
// @ts-nocheck — generated by catalog-eject; runtime-correct but TS strict-mode false-positives on inlined catalog body
import { cls } from "@/lib/utils";
import Button from "@/components/ui/Button";
import TextAnimation from "@/components/ui/TextAnimation";
import ImageOrVideo from "@/components/ui/ImageOrVideo";
import ScrollReveal from "@/components/ui/ScrollReveal";
import React from 'react';
import MetricsMediaCards from '@/components/sections/metrics/MetricsMediaCards';
import SectionErrorBoundary from "@/components/ui/SectionErrorBoundary";
const userActivities = [
{ id: "U001", name: "Alice Smith", loginTime: "10:00 AM", language: "Python", level1Marks: 80, level1Time: "4m 12s", level2Marks: 95, level2Time: "22m 10s", level3Marks: 70, level3Time: "8m 45s", totalScore: 245 },
{ id: "U002", name: "Bob Jones", loginTime: "10:15 AM", language: "C++", level1Marks: 90, level1Time: "3m 50s", level2Marks: 85, level2Time: "25m 00s", level3Marks: 60, level3Time: "9m 30s", totalScore: 235 },
{ id: "U003", name: "Charlie Brown", loginTime: "10:30 AM", language: "Java", level1Marks: 75, level1Time: "4m 45s", level2Marks: 100, level2Time: "18m 20s", level3Marks: 90, level3Time: "7m 15s", totalScore: 265 },
{ id: "U004", name: "Diana Prince", loginTime: "10:45 AM", language: "DBMS Query", level1Marks: 100, level1Time: "2m 30s", level2Marks: 90, level2Time: "20m 40s", level3Marks: 85, level3Time: "8m 00s", totalScore: 275 },
];
export default function DashboardSection(): React.JSX.Element {
return (
<div id="dashboard" data-section="dashboard">
<SectionErrorBoundary name="dashboard">
<MetricsMediaCards
tag="Admin Access Only"
title="Game Activity Overview"
description="Track all user activities, scores, and login details through this secure spreadsheet-style portal."
metrics={[
{
value: "1.2k+",
title: "Active Players",
description: "Global player count.",
imageSrc: "http://img.b2bpic.net/free-photo/light-bulb-front-side-white-background_187299-40172.jpg",
},
{
value: "5.4k",
title: "Solved Problems",
description: "Total submissions verified.",
imageSrc: "http://img.b2bpic.net/free-vector/creative-programming-coding-25-blue-icon-pack-such-as-development-coding-development-programming-develop_1142-23816.jpg",
},
{
value: "99.9%",
title: "Accuracy",
description: "Verified system performance.",
imageSrc: "http://img.b2bpic.net/free-vector/digital-connectivity-technology-icon-neon-gradient-background_53876-119515.jpg",
},
]}
const DashboardInline = () => (
<section aria-label="Metrics section" className="py-20">
<div className="flex flex-col gap-8 md:gap-10">
<div className="flex flex-col items-center gap-2 w-content-width mx-auto">
<div className="px-3 py-1 mb-1 text-sm card rounded w-fit">
<p>{"Admin Access Only"}</p>
</div>
<TextAnimation
text={"Comprehensive Activity Tracking"}
variant="fade"
gradientText={true}
tag="h2"
className="md:max-w-8/10 text-6xl 2xl:text-7xl leading-[1.15] font-semibold text-center text-balance"
/>
<TextAnimation
text={"Monitor user logins, language selection, marks per level, and time taken in real-time."}
variant="fade"
gradientText={false}
tag="p"
className="md:max-w-7/10 text-lg md:text-xl leading-snug text-center text-balance"
/>
</SectionErrorBoundary>
</div>
<div className="w-content-width mx-auto overflow-x-auto">
<ScrollReveal variant="fade" className="card rounded p-6">
<table className="w-full text-left border-collapse min-w-[800px]">
<thead>
<tr className="border-b border-accent/20">
<th className="py-3 px-4 text-accent font-semibold">User</th>
<th className="py-3 px-4 text-accent font-semibold">Login Time</th>
<th className="py-3 px-4 text-accent font-semibold">Language</th>
<th className="py-3 px-4 text-accent font-semibold">L1 (Marks / Time)</th>
<th className="py-3 px-4 text-accent font-semibold">L2 (Marks / Time)</th>
<th className="py-3 px-4 text-accent font-semibold">L3 (Marks / Time)</th>
<th className="py-3 px-4 text-accent font-semibold">Total Score</th>
</tr>
</thead>
<tbody>
{userActivities.map((user, idx) => (
<tr key={user.id} className={cls("border-b border-accent/10", idx === userActivities.length - 1 && "border-0")}>
<td className="py-4 px-4">
<div className="font-medium text-foreground">{user.name}</div>
<div className="text-sm text-accent">{user.id}</div>
</td>
<td className="py-4 px-4 text-foreground">{user.loginTime}</td>
<td className="py-4 px-4 text-foreground">{user.language}</td>
<td className="py-4 px-4 text-foreground">{user.level1Marks} <span className="text-accent text-sm">/ {user.level1Time}</span></td>
<td className="py-4 px-4 text-foreground">{user.level2Marks} <span className="text-accent text-sm">/ {user.level2Time}</span></td>
<td className="py-4 px-4 text-foreground">{user.level3Marks} <span className="text-accent text-sm">/ {user.level3Time}</span></td>
<td className="py-4 px-4 font-bold text-primary-cta">{user.totalScore}</td>
</tr>
))}
</tbody>
</table>
</ScrollReveal>
</div>
</div>
</section>
);
export default function DashboardSection() {
return (
<div data-webild-section="dashboard" id="dashboard">
<DashboardInline />
</div>
);
}

View File

@@ -12,31 +12,31 @@ const languages = [
id: "c",
title: "C Programming",
description: "Master the fundamentals with pointers and memory management.",
imageSrc: "https://picsum.photos/seed/1212478007/1200/800"
imageSrc: "https://cdn.jsdelivr.net/gh/devicons/devicon/icons/c/c-original.svg"
},
{
id: "python",
title: "Python",
description: "Tackle algorithms using Python's elegant syntax.",
imageSrc: "https://picsum.photos/seed/806211616/1200/800"
imageSrc: "https://cdn.jsdelivr.net/gh/devicons/devicon/icons/python/python-original.svg"
},
{
id: "java",
title: "Java",
description: "Build robust object-oriented solutions and logic.",
imageSrc: "https://picsum.photos/seed/387063574/1200/800"
imageSrc: "https://cdn.jsdelivr.net/gh/devicons/devicon/icons/java/java-original.svg"
},
{
id: "cpp",
title: "C++",
description: "Optimize performance with advanced STL concepts.",
imageSrc: "https://picsum.photos/seed/170534033/1200/800"
imageSrc: "https://cdn.jsdelivr.net/gh/devicons/devicon/icons/cplusplus/cplusplus-original.svg"
},
{
id: "dbms",
title: "DBMS Query",
description: "Solve intricate database puzzles and optimize SQL.",
imageSrc: "https://picsum.photos/seed/758983490/1200/800"
imageSrc: "https://cdn.jsdelivr.net/gh/devicons/devicon/icons/mysql/mysql-original.svg"
}
];