UNPKG

@defikitdotnet/education-module-ai

Version:
26 lines (25 loc) 4.95 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var jsx_runtime_1 = require("react/jsx-runtime"); var react_1 = require("react"); var head_1 = __importDefault(require("next/head")); var link_1 = __importDefault(require("next/link")); var HomePage = function () { var apiBaseUrl = process.env.NEXT_PUBLIC_BACKEND_URL || "http://localhost:3009"; // Check query parameters for course ID, which indicates student login flow var _a = (0, react_1.useState)(null), courseFromUrl = _a[0], setCourseFromUrl = _a[1]; (0, react_1.useEffect)(function () { if (typeof window !== "undefined") { var urlParams = new URLSearchParams(window.location.search); var course = urlParams.get("course"); if (course) { setCourseFromUrl(course); } } }, []); return ((0, jsx_runtime_1.jsxs)("div", { className: "min-h-screen bg-gradient-to-br from-primary-100 to-secondary-100", children: [(0, jsx_runtime_1.jsxs)(head_1.default, { children: [(0, jsx_runtime_1.jsx)("title", { children: "Education Module" }), (0, jsx_runtime_1.jsx)("meta", { name: "description", content: "AI-powered educational platform" }), (0, jsx_runtime_1.jsx)("link", { rel: "icon", href: "/favicon.ico" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "container mx-auto px-4 py-16", children: [(0, jsx_runtime_1.jsxs)("header", { className: "text-center mb-16", children: [(0, jsx_runtime_1.jsx)("h1", { className: "text-4xl md:text-6xl font-bold font-heading text-primary-800 mb-4", children: "Education Module" }), (0, jsx_runtime_1.jsx)("p", { className: "text-xl text-gray-700 max-w-2xl mx-auto", children: "A Udemy-like educational platform for AI agents, featuring AI-driven content generation and interactive learning experiences." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-2 gap-8 max-w-5xl mx-auto", children: [(0, jsx_runtime_1.jsxs)("div", { className: "card p-8 hover:shadow-lg transition-shadow", children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-2xl font-bold text-primary-700 mb-4", children: "Teacher Portal" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 mb-6", children: "Create and manage courses, generate content using AI, track student progress, and more." }), (0, jsx_runtime_1.jsx)(link_1.default, { href: "/teacher/login", className: "btn btn-primary inline-block", children: "Access Teacher Portal" })] }), (0, jsx_runtime_1.jsxs)("div", { className: "card p-8 hover:shadow-lg transition-shadow", children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-2xl font-bold text-secondary-700 mb-4", children: "Student Portal" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600 mb-6", children: "Browse courses, enroll in learning paths, track your progress, and engage with interactive content." }), (0, jsx_runtime_1.jsx)(link_1.default, { href: "/student", className: "btn btn-secondary inline-block", children: "Access Student Portal" })] })] }), (0, jsx_runtime_1.jsxs)("div", { className: "mt-16 text-center", children: [(0, jsx_runtime_1.jsx)("h2", { className: "text-2xl font-bold text-gray-800 mb-6", children: "Key Features" }), (0, jsx_runtime_1.jsxs)("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-6 max-w-5xl mx-auto", children: [(0, jsx_runtime_1.jsxs)("div", { className: "p-6 bg-white rounded-lg shadow", children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold text-primary-700 mb-3", children: "AI-Driven Content" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600", children: "Generate course content, quizzes, and learning paths using advanced AI technology." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "p-6 bg-white rounded-lg shadow", children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold text-primary-700 mb-3", children: "Interactive Learning" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600", children: "Engage with H5P content, quizzes, and interactive elements throughout courses." })] }), (0, jsx_runtime_1.jsxs)("div", { className: "p-6 bg-white rounded-lg shadow", children: [(0, jsx_runtime_1.jsx)("h3", { className: "text-xl font-semibold text-primary-700 mb-3", children: "Progress Tracking" }), (0, jsx_runtime_1.jsx)("p", { className: "text-gray-600", children: "Track student progress, completions, and assessment scores with detailed analytics." })] })] })] })] }), (0, jsx_runtime_1.jsx)("footer", { className: "bg-gray-800 text-white py-8 mt-16", children: (0, jsx_runtime_1.jsx)("div", { className: "container mx-auto px-4 text-center", children: (0, jsx_runtime_1.jsxs)("p", { children: ["\u00A9 ", new Date().getFullYear(), " Education Module. All rights reserved."] }) }) })] })); }; exports.default = HomePage;