diff --git a/fix_icons.py b/fix_icons.py new file mode 100644 index 0000000..654c46b --- /dev/null +++ b/fix_icons.py @@ -0,0 +1,83 @@ +import os +import glob +import re + +PRO_TIER_DIRS = [ + "src/app/dashboard", + "src/app/dashboard/leaderboard", + "src/app/dashboard/progress", + "src/app/dashboard/cbt", + "src/app/dashboard/materials", + "src/app/dashboard/analytics", + "src/app/dashboard/community", + "src/app/dashboard/streaks", + "src/app/dashboard/settings", + "src/app/dashboard/rank-predictor" +] + +AI_COACH_DIRS = [ + "src/app/dashboard/ai-coach/tutor", + "src/app/dashboard/ai-coach/cbt-dpp", + "src/app/dashboard/ai-coach/readiness", + "src/app/dashboard/ai-coach/college-predictor", + "src/app/dashboard/ai-coach/strategy", + "src/app/dashboard/ai-coach/study-plan", + "src/app/dashboard/ai-coach/time-optimization", + "src/app/dashboard/ai-coach/heatmap", + "src/app/dashboard/ai-coach/weekly-progress", + "src/app/dashboard/ai-coach/mistakes" +] + +def process_file(filepath, is_pro): + if not os.path.exists(filepath): + return + + with open(filepath, 'r', encoding='utf-8') as f: + content = f.read() + + # Original patterns + bg_pattern = r'bg-\[\#00F0FF\]/10 border border-\[\#00F0FF\]/20' + bg_amber_pattern = r'bg-amber-500/10 border border-amber-500/20' # Specifically for heatmap + + if is_pro: + new_bg = 'bg-yellow-50 dark:bg-[#00F0FF]/10 border border-yellow-300/60 dark:border-[#00F0FF]/20' + # To replace the icon color, we'll find the line after the span and replace text-[#00F0FF] + # But text-[#00F0FF] might be used elsewhere, so let's only replace if it's an icon tag near the span. + # The safest way is a regex that matches the span and the inner icon. + # e.g., \n ]*bg-yellow-50[^>]*>\s*<[A-Za-z0-9]+[^>]*)text-\[\#00F0FF\]' + content = re.sub(pattern, r'\1text-yellow-600 dark:text-[#00F0FF]', content) + + else: # AI Coach + new_bg = 'bg-cyan-50 dark:bg-[#00F0FF]/10 border border-cyan-300/60 dark:border-[#00F0FF]/20' + + # Replace both cyan and amber variants for consistency + content = re.sub(bg_pattern, new_bg, content) + content = re.sub(bg_amber_pattern, new_bg, content) + + pattern = r'(]*bg-cyan-50[^>]*>\s*<[A-Za-z0-9]+[^>]*)text-\[\#00F0FF\]' + content = re.sub(pattern, r'\1text-cyan-700 dark:text-[#00F0FF]', content) + + # Specifically for heatmap which had amber text + pattern_amber = r'(]*bg-cyan-50[^>]*>\s*<[A-Za-z0-9]+[^>]*)text-amber-500' + content = re.sub(pattern_amber, r'\1text-cyan-700 dark:text-[#00F0FF]', content) + + with open(filepath, 'w', encoding='utf-8') as f: + f.write(content) + +for d in PRO_TIER_DIRS: + page_path = os.path.join(d, "page.tsx") + process_file(page_path, is_pro=True) + +for d in AI_COACH_DIRS: + page_path = os.path.join(d, "page.tsx") + process_file(page_path, is_pro=False) + +print("Done replacing header icons.") diff --git a/src/app/dashboard/ai-coach/cbt-dpp/page.tsx b/src/app/dashboard/ai-coach/cbt-dpp/page.tsx index f187320..032bdea 100644 --- a/src/app/dashboard/ai-coach/cbt-dpp/page.tsx +++ b/src/app/dashboard/ai-coach/cbt-dpp/page.tsx @@ -98,8 +98,8 @@ export default function AIDailyPracticePage() {

- - + + AI Daily Practice (DPP)

@@ -108,7 +108,7 @@ export default function AIDailyPracticePage() {

- + AI Powered
diff --git a/src/app/dashboard/ai-coach/college-predictor/page.tsx b/src/app/dashboard/ai-coach/college-predictor/page.tsx index 9523ac2..45980ea 100644 --- a/src/app/dashboard/ai-coach/college-predictor/page.tsx +++ b/src/app/dashboard/ai-coach/college-predictor/page.tsx @@ -23,8 +23,8 @@ export default function CollegePredictorPage() {

- - + + AI College & Cutoff Predictor

@@ -32,7 +32,7 @@ export default function CollegePredictorPage() { Discover your probable target medical & engineering colleges based on current mock exam scores and historical cutoffs.

- + AI Powered
diff --git a/src/app/dashboard/ai-coach/heatmap/page.tsx b/src/app/dashboard/ai-coach/heatmap/page.tsx index bce7502..94b1bd1 100644 --- a/src/app/dashboard/ai-coach/heatmap/page.tsx +++ b/src/app/dashboard/ai-coach/heatmap/page.tsx @@ -28,8 +28,8 @@ export default function HeatmapPage() {

- - + + Mistake Heatmap Vault

@@ -37,7 +37,7 @@ export default function HeatmapPage() { Visual density map of your errors across subjects and topics — pinpoint your weakest areas instantly.

- + Error Density Analysis
diff --git a/src/app/dashboard/ai-coach/mistakes/page.tsx b/src/app/dashboard/ai-coach/mistakes/page.tsx index cf6ce17..92d4f21 100644 --- a/src/app/dashboard/ai-coach/mistakes/page.tsx +++ b/src/app/dashboard/ai-coach/mistakes/page.tsx @@ -62,8 +62,8 @@ export default function MistakeTrackingPage() {

- - + + Mistake Review & Spaced Repetition

diff --git a/src/app/dashboard/ai-coach/readiness/page.tsx b/src/app/dashboard/ai-coach/readiness/page.tsx index 2ab051c..6a4efaf 100644 --- a/src/app/dashboard/ai-coach/readiness/page.tsx +++ b/src/app/dashboard/ai-coach/readiness/page.tsx @@ -25,8 +25,8 @@ export default function ReadinessPage() {

- - + + Exam Readiness Analytics

@@ -34,7 +34,7 @@ export default function ReadinessPage() { Real-time algorithmic prediction of your exam readiness — based on speed, accuracy, syllabus coverage, and test history.

- + AI Powered
@@ -70,7 +70,7 @@ export default function ReadinessPage() {

Composite Readiness Index

- Updated Daily + Updated Daily
diff --git a/src/app/dashboard/ai-coach/strategy/page.tsx b/src/app/dashboard/ai-coach/strategy/page.tsx index df8ed62..4a6d9c9 100644 --- a/src/app/dashboard/ai-coach/strategy/page.tsx +++ b/src/app/dashboard/ai-coach/strategy/page.tsx @@ -19,8 +19,8 @@ export default function StrategyPage() {

- - + + Exam Strategy & Time Optimization

@@ -28,7 +28,7 @@ export default function StrategyPage() { Master time allocation per question, eliminate negative marking traps, and fine-tune your subject sequence for maximum score yield.

- + AI Powered
diff --git a/src/app/dashboard/ai-coach/study-plan/page.tsx b/src/app/dashboard/ai-coach/study-plan/page.tsx index 1f37406..d6bec6d 100644 --- a/src/app/dashboard/ai-coach/study-plan/page.tsx +++ b/src/app/dashboard/ai-coach/study-plan/page.tsx @@ -13,8 +13,8 @@ export default function StudyPlanPage() {

- - + + Personalized Daily & Weekly Study Plan

@@ -22,7 +22,7 @@ export default function StudyPlanPage() { AI-generated task schedule dynamically tailored to fix your weak areas and maintain optimal syllabus coverage.

- + AI Powered
diff --git a/src/app/dashboard/ai-coach/time-optimization/page.tsx b/src/app/dashboard/ai-coach/time-optimization/page.tsx index d8332d7..8948871 100644 --- a/src/app/dashboard/ai-coach/time-optimization/page.tsx +++ b/src/app/dashboard/ai-coach/time-optimization/page.tsx @@ -45,8 +45,8 @@ export default function TimeOptimizationPage() {

- - + + Study Time Optimization

@@ -54,7 +54,7 @@ export default function TimeOptimizationPage() { Understand your peak productive hours and schedule your hardest topics in your highest-efficiency windows.

- + Chronobiology Analytics
diff --git a/src/app/dashboard/ai-coach/tutor/page.tsx b/src/app/dashboard/ai-coach/tutor/page.tsx index a2296a0..ce24c8a 100644 --- a/src/app/dashboard/ai-coach/tutor/page.tsx +++ b/src/app/dashboard/ai-coach/tutor/page.tsx @@ -18,8 +18,8 @@ export default function TutorChatPage() {

- - + + AI Tutor — 24/7 Doubt Solver

diff --git a/src/app/dashboard/ai-coach/weekly-progress/page.tsx b/src/app/dashboard/ai-coach/weekly-progress/page.tsx index 5981506..7c9ed8d 100644 --- a/src/app/dashboard/ai-coach/weekly-progress/page.tsx +++ b/src/app/dashboard/ai-coach/weekly-progress/page.tsx @@ -27,8 +27,8 @@ export default function WeeklyProgressPage() {

- - + + Weekly Progress Overview

@@ -37,7 +37,7 @@ export default function WeeklyProgressPage() {

- + Live Analytics
diff --git a/src/app/dashboard/analytics/page.tsx b/src/app/dashboard/analytics/page.tsx index 87d309b..6d8e93e 100644 --- a/src/app/dashboard/analytics/page.tsx +++ b/src/app/dashboard/analytics/page.tsx @@ -35,8 +35,8 @@ export default function AnalyticsPage() {

- - + + Performance Analytics

diff --git a/src/app/dashboard/cbt/page.tsx b/src/app/dashboard/cbt/page.tsx index a09050e..1cb396f 100644 --- a/src/app/dashboard/cbt/page.tsx +++ b/src/app/dashboard/cbt/page.tsx @@ -129,8 +129,8 @@ export default function CBTPage() {

- - + + Computer Based Tests (CBT)

diff --git a/src/app/dashboard/community/page.tsx b/src/app/dashboard/community/page.tsx index bd61c9b..5fe5adf 100644 --- a/src/app/dashboard/community/page.tsx +++ b/src/app/dashboard/community/page.tsx @@ -114,8 +114,8 @@ export default function CommunityPage() {

- - + + Doubt Forum

diff --git a/src/app/dashboard/leaderboard/page.tsx b/src/app/dashboard/leaderboard/page.tsx index 0546a82..477a391 100644 --- a/src/app/dashboard/leaderboard/page.tsx +++ b/src/app/dashboard/leaderboard/page.tsx @@ -29,8 +29,8 @@ export default function LeaderboardPage() {

- - + + Leaderboard

diff --git a/src/app/dashboard/materials/page.tsx b/src/app/dashboard/materials/page.tsx index 4e3a742..aa6588c 100644 --- a/src/app/dashboard/materials/page.tsx +++ b/src/app/dashboard/materials/page.tsx @@ -36,8 +36,8 @@ export default function MaterialsPage() {

- - + + Study Materials & Notes

diff --git a/src/app/dashboard/page.tsx b/src/app/dashboard/page.tsx index 52534c7..278884f 100644 --- a/src/app/dashboard/page.tsx +++ b/src/app/dashboard/page.tsx @@ -45,8 +45,8 @@ export default function DashboardPage() {

- - + + Performance Overview

diff --git a/src/app/dashboard/progress/page.tsx b/src/app/dashboard/progress/page.tsx index 947f757..fb00382 100644 --- a/src/app/dashboard/progress/page.tsx +++ b/src/app/dashboard/progress/page.tsx @@ -108,8 +108,8 @@ export default function ProgressTrackerPage() {

- - + + Syllabus Tracker

diff --git a/src/app/dashboard/settings/page.tsx b/src/app/dashboard/settings/page.tsx index 51e606b..413d07c 100644 --- a/src/app/dashboard/settings/page.tsx +++ b/src/app/dashboard/settings/page.tsx @@ -103,8 +103,8 @@ export default function SettingsPage() {

- - + + Account Settings

diff --git a/src/app/dashboard/streaks/page.tsx b/src/app/dashboard/streaks/page.tsx index a361155..7b94f8d 100644 --- a/src/app/dashboard/streaks/page.tsx +++ b/src/app/dashboard/streaks/page.tsx @@ -20,8 +20,8 @@ export default function StreaksPage() {

- - + + Your Learning Streak