From a628bd99198b988def56993bc0b077f987d39935 Mon Sep 17 00:00:00 2001 From: anjali1521 Date: Sun, 31 May 2026 16:53:50 +0530 Subject: [PATCH] Fix dark mode headings, extend syllabus/notes to 8 semesters, improve content styling --- .env.example | 3 -- client/src/App.js | 2 +- client/src/pages/About.css | 16 ++++++++ client/src/pages/Analytics.css | 30 ++++++++++++++ client/src/pages/Faq.css | 20 ++++++++++ client/src/pages/Feedback.css | 20 ++++++++++ client/src/pages/Notes.css | 71 +++++++++++++++++++++++++--------- client/src/pages/Notes.jsx | 16 +++++--- client/src/pages/Syllabus.css | 12 ++++++ client/src/pages/Syllabus.js | 41 +++++++++++++++++++- 10 files changed, 202 insertions(+), 29 deletions(-) delete mode 100644 .env.example diff --git a/.env.example b/.env.example deleted file mode 100644 index 0576e4f..0000000 --- a/.env.example +++ /dev/null @@ -1,3 +0,0 @@ -# Example environment configuration -PORT=5000 -MONGO_URI=your-mongodb-uri-here diff --git a/client/src/App.js b/client/src/App.js index 74191df..87a7edf 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -25,7 +25,7 @@ const App = () => { -
+
} /> diff --git a/client/src/pages/About.css b/client/src/pages/About.css index 2da398d..3d874d6 100644 --- a/client/src/pages/About.css +++ b/client/src/pages/About.css @@ -444,6 +444,22 @@ transform: translateY(-3px); } +/* Dark mode: keep About section headings / top titles visible */ +html[data-theme="dark"] .about h2 { + color: #0b1220 !important; +} + +html[data-theme="dark"] .about .team h2, +html[data-theme="dark"] .about .about-cta .cta-content h2 { + color: #facc15 !important; +} + +html[data-theme="dark"] .about .story-card p, +html[data-theme="dark"] .about .feature-deep p, +html[data-theme="dark"] .about .value-item p { + color: #d4d9e6; +} + /* Enhanced Responsive Design */ /* Large tablets and small desktops */ diff --git a/client/src/pages/Analytics.css b/client/src/pages/Analytics.css index e55e514..1a76e22 100644 --- a/client/src/pages/Analytics.css +++ b/client/src/pages/Analytics.css @@ -330,3 +330,33 @@ button:hover { padding: 0.8rem 1rem; } } + +/* Dark-mode overrides for Analytics page: make section background darker and cards white + so headings inside cards remain visible and readable. */ +html[data-theme="dark"] .analytics-section { + background-color: #333333; +} + +html[data-theme="dark"] .chart-container, +html[data-theme="dark"] .insights-section, +html[data-theme="dark"] .filter-section, +html[data-theme="dark"] .download-section { + background: #ffffff; + color: #0b1220; + border: 1px solid #e6ebf0; + box-shadow: 0 8px 24px rgba(2,6,23,0.06); +} + +html[data-theme="dark"] .chart-container h2, +html[data-theme="dark"] .insights-section h2, +html[data-theme="dark"] .filter-section h2 { + color: #0b1220; +} + +html[data-theme="dark"] .filter-section select, +html[data-theme="dark"] select { + background-color: #ffffff; + color: #0b1220; + border-color: #e6ebf0; +} + diff --git a/client/src/pages/Faq.css b/client/src/pages/Faq.css index 81b92f8..5524bf8 100644 --- a/client/src/pages/Faq.css +++ b/client/src/pages/Faq.css @@ -338,3 +338,23 @@ justify-content: center; /* Center social icons */ } } +/* Default (light theme) */ +.contact-section .section-title { + color: #0b1220; +} + +.faq-section .section-title, +.features-section .section-title { + color: #0b1220; +} + +/* Dark theme: be explicit to avoid white-on-white or faded headings */ +html[data-theme="dark"] .contact-section .section-title { + color: #ffffff !important; +} + +html[data-theme="dark"] .faq-section .section-title, +html[data-theme="dark"] .features-section .section-title { + /* FAQ/Features use white cards in your desired layout, so keep titles dark */ + color: #0b1220 !important; +} diff --git a/client/src/pages/Feedback.css b/client/src/pages/Feedback.css index 3f5383c..4337771 100644 --- a/client/src/pages/Feedback.css +++ b/client/src/pages/Feedback.css @@ -383,6 +383,26 @@ margin-bottom: 1.5rem; } +/* Dark-mode heading visibility fixes for Feedback page */ +html[data-theme="dark"] .feedback h1, +html[data-theme="dark"] .feedback h2, +html[data-theme="dark"] .feedback h3, +html[data-theme="dark"] .feedback h4, +html[data-theme="dark"] .feedback h5, +html[data-theme="dark"] .student-name, +html[data-theme="dark"] .subject-name, +html[data-theme="dark"] .detail-section h5, +html[data-theme="dark"] .stat-number, +html[data-theme="dark"] .stat-label { + color: #ffffff !important; +} + +/* For headings inside white cards in dark mode, switch them to dark for contrast */ +html[data-theme="dark"] .feedback-card .student-name, +html[data-theme="dark"] .feedback-card .subject-name { + color: #0b1220 !important; +} + .cta-content p { font-size: 1.2rem; max-width: 600px; diff --git a/client/src/pages/Notes.css b/client/src/pages/Notes.css index 4873b2c..c2a9950 100644 --- a/client/src/pages/Notes.css +++ b/client/src/pages/Notes.css @@ -89,9 +89,10 @@ /* Search and Filters */ .search-filters { - background: #f8fafc; + background: rgba(248, 250, 252, 0.85); padding: 2rem 0; - border-bottom: 1px solid #e2e8f0; + border-bottom: 1px solid rgba(102, 126, 234, 0.18); + backdrop-filter: blur(12px); } .search-bar { @@ -108,16 +109,16 @@ width: 100%; padding: 1rem 1rem 1rem 3rem; font-size: 1.1rem; - border: 2px solid #e2e8f0; + border: 2px solid rgba(226, 232, 240, 0.8); border-radius: 50px; - background: white; + background: rgba(255, 255, 255, 0.95); transition: all 0.3s ease; outline: none; } .search-input:focus { border-color: #667eea; - box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1); + box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.18); } .search-icon { @@ -151,9 +152,9 @@ .filter-group select { padding: 0.8rem; - border: 2px solid #e2e8f0; + border: 2px solid rgba(226, 232, 240, 0.9); border-radius: 8px; - background: white; + background: rgba(255, 255, 255, 0.95); font-size: 1rem; color: #374151; cursor: pointer; @@ -168,7 +169,7 @@ /* Results Section */ .results { padding: 3rem 0; - background: white; + background: rgba(255, 255, 255, 0.92); } .results-header { @@ -192,9 +193,10 @@ .no-results { text-align: center; padding: 4rem 2rem; - background: #f8fafc; + background: rgba(248, 250, 252, 0.90); border-radius: 15px; margin: 2rem 0; + border: 1px solid rgba(102, 126, 234, 0.18); } .no-results-icon { @@ -223,11 +225,11 @@ /* Note Card */ .note-card { - background: white; + background: rgba(255, 255, 255, 0.92); border-radius: 15px; padding: 2rem; - box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08); - border: 1px solid #e2e8f0; + box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08); + border: 1px solid rgba(102, 126, 234, 0.2); transition: all 0.3s ease; display: flex; flex-direction: column; @@ -236,10 +238,11 @@ .note-card:hover { transform: translateY(-5px); - box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12); - border-color: #667eea; + box-shadow: 0 20px 75px rgba(15, 23, 42, 0.2), 0 8px 24px rgba(102, 126, 234, 0.16); + border-color: rgba(102, 126, 234, 0.45); } + /* Card Header and Content reuse same styles as syllabus */ .card-header { display: flex; @@ -247,10 +250,12 @@ align-items: flex-start; margin-bottom: 1.5rem; gap: 1rem; + flex-wrap: wrap; } .card-title-section { flex: 1; + min-width: 0; } .card-title { @@ -259,14 +264,18 @@ color: #333; margin-bottom: 0.5rem; line-height: 1.4; + word-break: break-word; + overflow-wrap: anywhere; } .card-meta { display: flex; align-items: center; gap: 0.5rem; + flex-wrap: wrap; font-size: 0.9rem; color: #666; + min-width: 0; } .university { @@ -291,11 +300,20 @@ text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; + flex-shrink: 0; } .card-content { flex: 1; margin-bottom: 1.5rem; + min-width: 0; +} + +.subject { + margin: 0; + color: #4b5563; + word-break: break-word; + overflow-wrap: anywhere; } .tags-section { @@ -321,9 +339,11 @@ .card-stats { display: flex; justify-content: space-between; + flex-wrap: wrap; margin-bottom: 1.5rem; padding: 1rem; - background: #f8fafc; + background: rgba(248, 250, 252, 0.88); + border: 1px solid rgba(102, 126, 234, 0.14); border-radius: 10px; gap: 1rem; } @@ -334,7 +354,8 @@ gap: 0.4rem; font-size: 0.85rem; color: #6b7280; - flex: 1; + flex: 1 1 140px; + min-width: 140px; justify-content: center; } @@ -345,6 +366,7 @@ .card-actions { display: flex; gap: 1rem; + flex-wrap: wrap; } .btn { @@ -388,10 +410,10 @@ /* Upload Section */ .upload-section { - background: #f8fafc; + background: rgba(248, 250, 252, 0.88); padding: 3rem 1rem; text-align: center; - border-top: 1px solid #e2e8f0; + border-top: 1px solid rgba(102, 126, 234, 0.16); } .upload-section h3 { @@ -407,6 +429,18 @@ margin-bottom: 2rem; } +html[data-theme="dark"] .notes .results-header h2, +html[data-theme="dark"] .notes .no-results h3, +html[data-theme="dark"] .notes .card-title, +html[data-theme="dark"] .notes .upload-section h3 { + color: #0b1220 !important; +} + +html[data-theme="dark"] .notes .card-meta, +html[data-theme="dark"] .notes .card-stats { + color: #94a3b8; +} + /* Responsive Design */ @media (max-width: 768px) { .notes-hero h1 { @@ -574,3 +608,4 @@ gap: 1rem; } } + diff --git a/client/src/pages/Notes.jsx b/client/src/pages/Notes.jsx index 2eb25ec..49dd299 100644 --- a/client/src/pages/Notes.jsx +++ b/client/src/pages/Notes.jsx @@ -8,12 +8,16 @@ const Notes = () => { // Dynamic state initialized with mock data as fallback const [notesData, setNotesData] = useState([ - { id: 1, title: "Python - Notes", university: "Mumbai University", department: "Electronics Engineering", semester: 1, subject: "Python", fileType: "PDF", downloadCount: 1400, uploadDate: "2024-02-01", fileSize: "3.5 MB", tags: ["CSE", "Python", "First Year"], difficulty: "Beginner", link: "/pdf/python.pdf" }, - { id: 2, title: "Operating Systems - Detailed Notes", university: "NIT Trichy", department: "Computer Science", semester: 2, subject: "Operating Systems", fileType: "PDF", downloadCount: 870, uploadDate: "2024-04-02", fileSize: "5.8 MB", tags: ["CSE", "OS", "Semester 4"], difficulty: "Intermediate", link: "/pdf/OS.pdf" }, - { id: 3, title: "Data Structures - Notes", university: "Anna University", department: "Computer Science", semester: 3, subject: "Data Structures", fileType: "PDF", downloadCount: 980, uploadDate: "2024-03-15", fileSize: "4.2 MB", tags: ["CSE", "DSA"], difficulty: "Intermediate", link: "/pdf/DSA.pdf" }, - { id: 4, title: "Database Management Systems (DBMS) - Notes", university: "IIT Delhi", department: "Computer Science", semester: 4, subject: "Database Systems", fileType: "PDF", downloadCount: 1100, uploadDate: "2024-03-18", fileSize: "6.0 MB", tags: ["CSE", "DBMS", "SQL"], difficulty: "Intermediate", link: "/pdf/DBMS.pdf" }, - { id: 5, title: "Java - Notes", university: "Delhi University", department: "Computer Science", semester: 5, subject: "Java", fileType: "PDF", downloadCount: 1400, uploadDate: "2024-02-01", fileSize: "3.5 MB", tags: ["CSE", "Java", "First Year"], difficulty: "Beginner", link: "/pdf/Java.pdf" }, - { id: 6, title: "Advance Web Development", university: "VIT Vellore", department: "Computer Science", semester: 6, subject: "Web Development", fileType: "PDF", downloadCount: 640, uploadDate: "2024-07-01", fileSize: "6.5 MB", tags: ["CSE", "Web", "Semester 6"], difficulty: "Advanced", link: "/pdf/WebDevelopment.pdf" }, + { id: 1, title: "Python - Notes", university: "Mumbai University", department: "Electronics Engineering", semester: 1, subject: "Python", fileType: "PDF", downloadCount: 1400, uploadDate: "2024-02-01", fileSize: "3.5 MB", tags: ["CSE", "Python", "First Year"], difficulty: "Beginner", link: "/pdf/python.pdf" }, + { id: 2, title: "Operating Systems - Detailed Notes", university: "NIT Trichy", department: "Computer Science", semester: 2, subject: "Operating Systems", fileType: "PDF", downloadCount: 870, uploadDate: "2024-04-02", fileSize: "5.8 MB", tags: ["CSE", "OS", "Semester 4"], difficulty: "Intermediate", link: "/pdf/OS.pdf" }, + { id: 3, title: "Data Structures - Notes", university: "Anna University", department: "Computer Science", semester: 3, subject: "Data Structures", fileType: "PDF", downloadCount: 980, uploadDate: "2024-03-15", fileSize: "4.2 MB", tags: ["CSE", "DSA"], difficulty: "Intermediate", link: "/pdf/DSA.pdf" }, + { id: 4, title: "Database Management Systems (DBMS) - Notes", university: "IIT Delhi", department: "Computer Science", semester: 4, subject: "Database Systems", fileType: "PDF", downloadCount: 1100, uploadDate: "2024-03-18", fileSize: "6.0 MB", tags: ["CSE", "DBMS", "SQL"], difficulty: "Intermediate", link: "/pdf/DBMS.pdf" }, + { id: 5, title: "Java - Notes", university: "Delhi University", department: "Computer Science", semester: 5, subject: "Java", fileType: "PDF", downloadCount: 1400, uploadDate: "2024-02-01", fileSize: "3.5 MB", tags: ["CSE", "Java", "First Year"], difficulty: "Beginner", link: "/pdf/Java.pdf" }, + { id: 6, title: "Advance Web Development", university: "VIT Vellore", department: "Computer Science", semester: 6, subject: "Web Development", fileType: "PDF", downloadCount: 640, uploadDate: "2024-07-01", fileSize: "6.5 MB", tags: ["CSE", "Web", "Semester 6"], difficulty: "Advanced", link: "/pdf/WebDevelopment.pdf" }, + + // ➡️ New entries for semester 7 and 8 + { id: 7, title: "Machine Learning - Notes", university: "IIT Bombay", department: "Computer Science", semester: 7, subject: "Machine Learning", fileType: "PDF", downloadCount: 520, uploadDate: "2024-08-10", fileSize: "7.2 MB", tags: ["CSE", "ML", "Semester 7"], difficulty: "Advanced", link: "/pdf/ML.pdf" }, + { id: 8, title: "Cyber Security - Notes", university: "Delhi University", department: "Computer Science", semester: 8, subject: "Cyber Security", fileType: "PDF", downloadCount: 430, uploadDate: "2024-09-05", fileSize: "6.8 MB", tags: ["CSE", "Security", "Semester 8"], difficulty: "Expert", link: "/pdf/CyberSecurity.pdf" } ]); // States diff --git a/client/src/pages/Syllabus.css b/client/src/pages/Syllabus.css index 12318ce..117ae1d 100644 --- a/client/src/pages/Syllabus.css +++ b/client/src/pages/Syllabus.css @@ -425,6 +425,18 @@ } +html[data-theme="dark"] .syllabus .results-header h2, +html[data-theme="dark"] .syllabus .no-results h3, +html[data-theme="dark"] .syllabus .card-title, +html[data-theme="dark"] .syllabus .subjects-section h4 { + color: #0b1220 !important; +} + +html[data-theme="dark"] .syllabus .card-meta, +html[data-theme="dark"] .syllabus .card-stats { + color: #94a3b8; +} + /* Responsive Design */ @media (max-width: 768px) { .syllabus-hero h1 { diff --git a/client/src/pages/Syllabus.js b/client/src/pages/Syllabus.js index 6b707d0..ea08b0f 100644 --- a/client/src/pages/Syllabus.js +++ b/client/src/pages/Syllabus.js @@ -109,7 +109,46 @@ const Syllabus = () => { fileSize: "3.3 MB", difficulty: "Intermediate", tags: ["Electrical", "Power Systems", "Circuits"] - } + }, + { + id: 9, + title: "Computer Science Engineering - Semester 6", + university: "Delhi University", + department: "Computer Science", + semester: 6, + subjects: ["Operating Systems", "Computer Networks", "Compiler Design", "Artificial Intelligence", "Elective I"], + downloadCount: 720, + uploadDate: "2024-02-01", + fileSize: "3.2 MB", + difficulty: "Advanced", + tags: ["CSE", "Networks", "AI"] + }, + { + id: 10, + title: "Computer Science Engineering - Semester 7", + university: "Delhi University", + department: "Computer Science", + semester: 7, + subjects: ["Machine Learning", "Cloud Computing", "Elective II", "Project Work I"], + downloadCount: 540, + uploadDate: "2024-02-10", + fileSize: "2.9 MB", + difficulty: "Advanced", + tags: ["CSE", "ML", "Cloud"] + }, + { + id: 11, + title: "Computer Science Engineering - Semester 8", + university: "Delhi University", + department: "Computer Science", + semester: 8, + subjects: ["Big Data Analytics", "Cyber Security", "Elective III", "Project Work II"], + downloadCount: 430, + uploadDate: "2024-02-20", + fileSize: "3.0 MB", + difficulty: "Expert", + tags: ["CSE", "Security", "Big Data"] + } ]; // Animation variants from Home.js