Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
779 changes: 605 additions & 174 deletions team-bhavitha-dsarecommender/client/src/App.css

Large diffs are not rendered by default.

55 changes: 28 additions & 27 deletions team-bhavitha-dsarecommender/client/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import QuizPage from "./pages/QuizPage";
import QuizSelectPage from "./pages/QuizSelectPage";
import HomePage from './pages/HomePage';
import Navbar from './components/Navbar';
import Footer from './components/Footer';
import ExploreTopicPage from "./pages/ExploreTopicPage";
import RecommendationPage from "./pages/RecommendationPage";
import AppEntry from "./routes/AppEntry";
Expand All @@ -22,33 +23,33 @@ import PlaygroundPage from './pages/PlaygroundPage.tsx';
function App() {
return (
<Router>
<Navbar />
{/* Add padding top to account for fixed navbar height, and center content vertically and horizontally */}
<div className="pt-5 mt-3 d-flex flex-grow-1 justify-content-center align-items-center" style={{ minHeight: 'calc(100vh - 80px)' }}> {/* Adjusted styling here */}
<Routes>
<Route path="/" element={<AppEntry />} />
<Route path="/login" element={<LoginPage />} />
<Route path="/register" element={<RegisterPage />} />
<Route path="/home" element={<HomePage />} />

{/* Public routes go here */}
{/* Protected routes go here */}
<Route element={<ProtectedRoutes/>}>

<Route path="/educator/student/:username" element={<StudentDetailPage />} />

<Route path="/student/:username" element={<StudentDetailPage />} />
<Route path="/discuss/:id" element={<DiscussionDetailPage />} />
<Route path="/discuss" element={< Discuss/>} />
<Route path="/recommend" element={<RecommendationPage />} />
<Route path="/explore/:topic" element={<ExploreTopicPage />} />
<Route path="/dashboard/:username" element={<Dashboard />} />
<Route path="/dashboard" element={<Dashboard />} />
<Route path="/quiz/:topic" element={<QuizPage />} />
<Route path="/quiz-select" element={<QuizSelectPage/>} />
<Route path="/playground" element={<PlaygroundPage />} />
</Route>
</Routes>
<div className="d-flex flex-column min-vh-100">
<Navbar />
<main className="flex-grow-1 pt-5 mt-3">
<Routes>
<Route path="/" element={<AppEntry />} />
<Route path="/login" element={<LoginPage />} />
<Route path="/register" element={<RegisterPage />} />
<Route path="/home" element={<HomePage />} />
{/* Public routes go here */}
{/* Protected routes go here */}
<Route element={<ProtectedRoutes/>}>
<Route path="/educator/student/:username" element={<StudentDetailPage />} />
<Route path="/student/:username" element={<StudentDetailPage />} />
<Route path="/discuss/:id" element={<DiscussionDetailPage />} />
<Route path="/discuss" element={< Discuss/>} />
<Route path="/recommend" element={<RecommendationPage />} />
<Route path="/explore/:topic" element={<ExploreTopicPage />} />
<Route path="/dashboard/:username" element={<Dashboard />} />
<Route path="/dashboard" element={<Dashboard />} />
<Route path="/quiz/:topic" element={<QuizPage />} />
<Route path="/quiz-select" element={<QuizSelectPage/>} />
<Route path="/playground" element={<PlaygroundPage />} />
</Route>
</Routes>
</main>
<Footer />
</div>
</Router>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,25 @@ const StartDiscussionModal = ({ show, onClose, onRefresh, username }: Props) =>

return (
<Modal show={show} onHide={onClose} backdrop="static" centered>
<Modal.Header closeButton>
<Modal.Header closeButton style={{ borderBottom: '2px solid #0d6efd' }}>
<Modal.Title>Start a Discussion</Modal.Title>
</Modal.Header>
<Modal.Body>
<Modal.Body style={{ border: '1px solid #dee2e6' }}>
<Form>
<Form.Check
type="radio"
label="General Discussion"
checked={type === "general"}
onChange={() => setType("general")}
style={{ border: '1px solid #dee2e6', padding: '10px', borderRadius: '5px', marginBottom: '10px' }}
/>
<Form.Check
type="radio"
label="Question-Specific"
checked={type === "question"}
onChange={() => setType("question")}
className="mb-3"
style={{ border: '1px solid #dee2e6', padding: '10px', borderRadius: '5px' }}
/>

{type === "general" ? (
Expand All @@ -70,6 +72,7 @@ const StartDiscussionModal = ({ show, onClose, onRefresh, username }: Props) =>
value={text}
onChange={(e) => setText(e.target.value)}
placeholder="What's on your mind?"
style={{ border: '2px solid #0d6efd', borderRadius: '8px' }}
/>
</Form.Group>
</>
Expand All @@ -82,6 +85,7 @@ const StartDiscussionModal = ({ show, onClose, onRefresh, username }: Props) =>
value={topic}
onChange={(e) => setTopic(e.target.value)}
placeholder="e.g., Graph Theory"
style={{ border: '2px solid #0d6efd', borderRadius: '8px' }}
/>
</Form.Group>
<Form.Group>
Expand All @@ -90,6 +94,7 @@ const StartDiscussionModal = ({ show, onClose, onRefresh, username }: Props) =>
type="number"
value={questionIndex}
onChange={(e) => setQuestionIndex(e.target.value === "" ? "" : Number(e.target.value))}
style={{ border: '2px solid #0d6efd', borderRadius: '8px' }}
/>
</Form.Group>
<Form.Group>
Expand All @@ -99,13 +104,14 @@ const StartDiscussionModal = ({ show, onClose, onRefresh, username }: Props) =>
rows={2}
value={questionText}
onChange={(e) => setQuestionText(e.target.value)}
style={{ border: '2px solid #0d6efd', borderRadius: '8px' }}
/>
</Form.Group>
</>
)}
</Form>
</Modal.Body>
<Modal.Footer>
<Modal.Footer style={{ borderTop: '2px solid #0d6efd' }}>
<Button variant="secondary" onClick={onClose}>
Cancel
</Button>
Expand Down
242 changes: 242 additions & 0 deletions team-bhavitha-dsarecommender/client/src/components/Footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,242 @@
import { motion } from 'framer-motion';
import { Heart, Github, Linkedin, Mail, BookOpen } from 'lucide-react';

const Footer = () => {
const currentYear = new Date().getFullYear();

const containerVariants = {
hidden: { opacity: 0, y: 50 },
visible: {
opacity: 1,
y: 0,
transition: {
duration: 0.6,
ease: "easeOut" as const,
staggerChildren: 0.1
}
}
};

const itemVariants = {
hidden: { opacity: 0, y: 20 },
visible: {
opacity: 1,
y: 0,
transition: {
duration: 0.5,
ease: "easeOut" as const
}
}
};

return (
<motion.footer
className="bg-gradient-secondary border-top border-dark-border mt-6"
variants={containerVariants}
initial="hidden"
whileInView="visible"
viewport={{ once: true }}
>
<div className="container py-5">
<div className="row">
<motion.div className="col-lg-4 mb-4" variants={itemVariants}>
<div className="d-flex align-items-center mb-3">
<BookOpen size={32} className="text-primary me-2" />
<h5 className="text-gradient fw-bold mb-0">LearnFlow</h5>
</div>

<div className="d-flex gap-3">
<motion.a
href="#"
className="text-secondary"
whileHover={{ scale: 1.1, color: "var(--primary-purple)" }}
transition={{ duration: 0.2 }}
>
<Github size={20} />
</motion.a>
<motion.a
href="#"
className="text-secondary"
whileHover={{ scale: 1.1, color: "var(--primary-purple)" }}
transition={{ duration: 0.2 }}
>
<Linkedin size={20} />
</motion.a>
<motion.a
href="#"
className="text-secondary"
whileHover={{ scale: 1.1, color: "var(--primary-purple)" }}
transition={{ duration: 0.2 }}
>
<Mail size={20} />
</motion.a>
</div>
</motion.div>

<motion.div className="col-lg-2 col-md-6 mb-4" variants={itemVariants}>
<h6 className="text-primary fw-bold mb-3">Features</h6>
<ul className="list-unstyled">
<li className="mb-2">
<motion.a
href="#"
className="text-secondary text-decoration-none"
whileHover={{ x: 5, color: "var(--primary-purple)" }}
transition={{ duration: 0.2 }}
>
Personalized Learning
</motion.a>
</li>
<li className="mb-2">
<motion.a
href="#"
className="text-secondary text-decoration-none"
whileHover={{ x: 5, color: "var(--primary-purple)" }}
transition={{ duration: 0.2 }}
>
Adaptive Quizzes
</motion.a>
</li>
<li className="mb-2">
<motion.a
href="#"
className="text-secondary text-decoration-none"
whileHover={{ x: 5, color: "var(--primary-purple)" }}
transition={{ duration: 0.2 }}
>
Progress Tracking
</motion.a>
</li>
<li className="mb-2">
<motion.a
href="#"
className="text-secondary text-decoration-none"
whileHover={{ x: 5, color: "var(--primary-purple)" }}
transition={{ duration: 0.2 }}
>
Knowledge Graph
</motion.a>
</li>
</ul>
</motion.div>

<motion.div className="col-lg-2 col-md-6 mb-4" variants={itemVariants}>
<h6 className="text-primary fw-bold mb-3">Resources</h6>
<ul className="list-unstyled">
<li className="mb-2">
<motion.a
href="#"
className="text-secondary text-decoration-none"
whileHover={{ x: 5, color: "var(--primary-purple)" }}
transition={{ duration: 0.2 }}
>
Documentation
</motion.a>
</li>
<li className="mb-2">
<motion.a
href="#"
className="text-secondary text-decoration-none"
whileHover={{ x: 5, color: "var(--primary-purple)" }}
transition={{ duration: 0.2 }}
>
API Reference
</motion.a>
</li>
<li className="mb-2">
<motion.a
href="#"
className="text-secondary text-decoration-none"
whileHover={{ x: 5, color: "var(--primary-purple)" }}
transition={{ duration: 0.2 }}
>
Tutorials
</motion.a>
</li>
<li className="mb-2">
<motion.a
href="#"
className="text-secondary text-decoration-none"
whileHover={{ x: 5, color: "var(--primary-purple)" }}
transition={{ duration: 0.2 }}
>
Support
</motion.a>
</li>
</ul>
</motion.div>

<motion.div className="col-lg-2 col-md-6 mb-4" variants={itemVariants}>
<h6 className="text-primary fw-bold mb-3">Company</h6>
<ul className="list-unstyled">
<li className="mb-2">
<motion.a
href="#"
className="text-secondary text-decoration-none"
whileHover={{ x: 5, color: "var(--primary-purple)" }}
transition={{ duration: 0.2 }}
>
About Us
</motion.a>
</li>
<li className="mb-2">
<motion.a
href="#"
className="text-secondary text-decoration-none"
whileHover={{ x: 5, color: "var(--primary-purple)" }}
transition={{ duration: 0.2 }}
>
Careers
</motion.a>
</li>
<li className="mb-2">
<motion.a
href="#"
className="text-secondary text-decoration-none"
whileHover={{ x: 5, color: "var(--primary-purple)" }}
transition={{ duration: 0.2 }}
>
Privacy Policy
</motion.a>
</li>
<li className="mb-2">
<motion.a
href="#"
className="text-secondary text-decoration-none"
whileHover={{ x: 5, color: "var(--primary-purple)" }}
transition={{ duration: 0.2 }}
>
Terms of Service
</motion.a>
</li>
</ul>
</motion.div>

<motion.div className="col-lg-2 col-md-6 mb-4" variants={itemVariants}>
<h6 className="text-primary fw-bold mb-3">Stats</h6>

</motion.div>
</div>

<motion.div
className="border-top border-dark-border pt-4 mt-4"
variants={itemVariants}
>
<div className="row align-items-center">
<div className="col-md-6">
<p className="text-secondary mb-0">
© {currentYear} LearnFlow. All rights reserved.
</p>
</div>
<div className="col-md-6 text-md-end">
<p className="text-secondary mb-0">
Made with <Heart size={16} className="text-danger mx-1" />
</p>
</div>
</div>
</motion.div>
</div>
</motion.footer>
);
};

export default Footer;
Loading