From 70694da2e2a47ec49d71050f3ca764b5826a4ad9 Mon Sep 17 00:00:00 2001 From: Amudieshwar A G Date: Fri, 7 Aug 2026 11:20:01 +0530 Subject: [PATCH] feat(notes): integrate official RIT Moodle portal hub for notes and PYQs --- src/pages/Notes/Notes.tsx | 272 ++++++++++++++------------------------ 1 file changed, 99 insertions(+), 173 deletions(-) diff --git a/src/pages/Notes/Notes.tsx b/src/pages/Notes/Notes.tsx index 9e4c34e..7e48e37 100644 --- a/src/pages/Notes/Notes.tsx +++ b/src/pages/Notes/Notes.tsx @@ -1,8 +1,10 @@ import { useState, useRef, useEffect } from 'react'; import { useSearchParams } from 'react-router-dom'; import { motion } from 'framer-motion'; -import { Search, Download, Filter, BookOpen, FileText, ScrollText, BookMarked, ChevronRight, ArrowLeft, ExternalLink, Code, Globe, GitBranch, Cloud, Palette, Shield, DollarSign, BarChart3, Users, Megaphone, TrendingUp, UserCheck, ClipboardList, ShoppingCart, Cpu, Activity, LayoutGrid, Layers, Zap, Settings, Gauge, Radio, Wifi, Bot, Sun, Wrench, Binary, BatteryCharging, CircuitBoard, ShieldCheck, BrainCircuit, FlaskConical, Lock, Terminal, Dna, Microscope, Sparkles, Smartphone, Monitor, Server, CheckCircle2, Database, Briefcase, AlertTriangle } from 'lucide-react'; +import { Search, Download, Filter, BookOpen, FileText, ScrollText, BookMarked, ChevronRight, ArrowLeft, ExternalLink, Code, Globe, GitBranch, Cloud, Palette, Shield, DollarSign, BarChart3, Users, Megaphone, TrendingUp, UserCheck, ClipboardList, ShoppingCart, Cpu, Activity, LayoutGrid, Layers, Zap, Settings, Gauge, Radio, Wifi, Bot, Sun, Wrench, Binary, BatteryCharging, CircuitBoard, ShieldCheck, BrainCircuit, FlaskConical, Lock, Terminal, Dna, Microscope, Sparkles, Smartphone, Monitor, Server, CheckCircle2, Database, Briefcase, AlertTriangle, RefreshCw } from 'lucide-react'; import SectionTitle from '@/components/SectionTitle/SectionTitle'; + +const MOODLE_URL = 'http://182.74.17.142/moodle/login/index.php'; import { getBackendUrl } from '@/lib/utils'; import { StaggerContainer, StaggerItem } from '@/components/AnimatedContainer/AnimatedContainer'; import { TOOLKIT_ITEMS, DEPARTMENTS } from '@/constants'; @@ -1432,27 +1434,7 @@ export default function Notes() { )}
- {/* Under Development Banner */} - -
-
- -
-
-
Under Development
-
- Currently displaying sample mock notes & syllabus data. Official semester notes repository integration is in progress. -
-
-
- - Mock Data Active - -
+ {selectedToolkit ? ( (() => { @@ -1936,169 +1918,113 @@ export default function Notes() { })() ) : (
- {/* Search + Filters */} +
+ {/* Moodle Academic Portal Hero Hub */} - {/* Search */} -
- - setSearchQuery(e.target.value)} - className="w-full pl-11 pr-4 py-3 rounded-xl border border-[#E5E7EB] text-sm text-[#1E293B] placeholder-[#94A3B8] focus:outline-none focus:border-[#F97316] transition-colors" - style={{ fontFamily: 'Inter, sans-serif' }} - /> -
+ {/* Subtle Decorative Background Glow */} +
+
-
- {/* Type Filter */} -
- - {['all', 'notes', 'pyq', 'syllabus'].map((type) => ( - - ))} +
+ {/* Header Badge */} +
+ + Official RIT Learning Management System
- {/* Semester Filter */} -
- {SEMESTERS.slice(0, 3).map((sem) => ( - - ))} + {/* Main Heading */} +

+ Access Academic Notes & Study Materials on{' '} + + Moodle + +

+ +

+ All official semester notes, previous year question papers (PYQs), syllabus data, and lab manuals are hosted directly on the official Rajalakshmi Institute of Technology Moodle server. +

+ + {/* Primary Launch Action Buttons */} +
+ + + Launch Official RIT Moodle Portal + + +
- {/* Subject Dropdown */} - {selectedSem !== 'All' && ( -
- Subject: - + {/* Feature Highlights Grid */} +
+
+
+ +
+
+ 100% Direct & Secure +
+
+ Authenticates directly on official college server 182.74.17.142. +
- )} + +
+
+ +
+
+ Official Semester Notes +
+
+ Complete 1st to 8th Semester course notes, PYQs, and assignments. +
+
+ +
+
+ +
+
+ Student Login +
+
+ Log in using your RIT Register Number and official Moodle password. +
+
+
+ + {/* Technical Security Note */} +
+ ℹ️ Security Note: To protect student session privacy and prevent clickjacking attacks, RIT's Moodle server enforces opening the portal directly in a secure browser tab rather than inside third-party frames (X-Frame-Options: SAMEORIGIN). +
- - {/* Results */} - - {filtered.map((note) => { - const typeConfig = TYPE_COLORS[note.type] || { bg: '#F1F5F9', text: '#475569', icon: BookOpen }; - const TypeIcon = typeConfig.icon; - return ( - - -
- {/* Visual PDF Preview Icon */} -
-
- PDF -
-
-
-
-
-
-
- - {/* Text Details */} -
-
-
-
- -
- - {note.type} - -
-

- {note.title} -

-

- {note.subject} • Sem {note.semester} -

-
-
-
- - {/* Metadata Line */} -
-
- {note.downloads} downloads · {note.fileSize} - PDF -
- {note.uploadedAt ? `Updated ${note.uploadedAt}` : 'Recently'} -
- - {/* Download Button */} - handleDownload(note.id, note.downloadUrl)} - className="w-full flex items-center justify-center gap-2 py-2.5 rounded-xl text-sm font-semibold text-white cursor-pointer" - style={{ - fontFamily: 'Poppins, sans-serif', - background: 'linear-gradient(135deg, #F97316, #FB923C)', - }} - > - - Download - - - - ); - })} - +
{/* Toolkit Section */}