From 6e91734830435a4dfee52f338d0298ab5813faf7 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 19 Nov 2025 03:08:28 +0000 Subject: [PATCH 1/2] Add learning path progress widget to lamad toolbar Add a small widget to the lamad toolbar that displays: - Learning path name: "Elohim Protocol" - Progress percentage to mastery based on user's average affinity across all content nodes Features: - Real-time updates when user interacts with content - Dark theme styling with indigo/purple gradients matching the existing design - Responsive layout for mobile devices - Progress bar visualization with smooth transitions - Integrated with AffinityTrackingService for accurate progress calculation Component updates: - Inject AffinityTrackingService to calculate mastery percentage - Subscribe to graph and affinity changes for real-time updates - Calculate progress based on average affinity across all nodes --- .../lamad-layout/lamad-layout.component.css | 61 +++++++++++++++++++ .../lamad-layout/lamad-layout.component.html | 13 ++++ .../lamad-layout/lamad-layout.component.ts | 23 +++++++ 3 files changed, 97 insertions(+) diff --git a/elohim-app/src/app/lamad/components/lamad-layout/lamad-layout.component.css b/elohim-app/src/app/lamad/components/lamad-layout/lamad-layout.component.css index f943ea9ce..90aa9a71d 100644 --- a/elohim-app/src/app/lamad/components/lamad-layout/lamad-layout.component.css +++ b/elohim-app/src/app/lamad/components/lamad-layout/lamad-layout.component.css @@ -75,6 +75,62 @@ opacity: 0.7; } +/* Learning Path Widget */ +.learning-path-widget { + display: flex; + align-items: center; + background: rgba(15, 23, 42, 0.6); + border: 1px solid rgba(99, 102, 241, 0.3); + border-radius: 0.5rem; + padding: 0.75rem 1rem; + backdrop-filter: blur(10px); + min-width: 280px; +} + +.path-info { + width: 100%; +} + +.path-name { + font-size: 0.875rem; + font-weight: 600; + color: #e0e6ed; + margin-bottom: 0.5rem; + background: linear-gradient(135deg, #6366f1, #8b5cf6); + -webkit-background-clip: text; + -webkit-text-fill-color: transparent; + background-clip: text; +} + +.path-progress { + display: flex; + flex-direction: column; + gap: 0.25rem; +} + +.progress-bar-container { + width: 100%; + height: 6px; + background: rgba(15, 23, 42, 0.8); + border-radius: 3px; + overflow: hidden; + border: 1px solid rgba(99, 102, 241, 0.2); +} + +.progress-bar { + height: 100%; + background: linear-gradient(90deg, #6366f1, #8b5cf6); + border-radius: 3px; + transition: width 0.3s ease; + box-shadow: 0 0 8px rgba(99, 102, 241, 0.5); +} + +.progress-text { + font-size: 0.75rem; + color: #94a3b8; + font-weight: 500; +} + /* Search */ .search-container { max-width: 1400px; @@ -187,4 +243,9 @@ .lamad-main { padding: 1rem; } + + .learning-path-widget { + width: 100%; + min-width: unset; + } } diff --git a/elohim-app/src/app/lamad/components/lamad-layout/lamad-layout.component.html b/elohim-app/src/app/lamad/components/lamad-layout/lamad-layout.component.html index 6dfc00a28..a882962f3 100644 --- a/elohim-app/src/app/lamad/components/lamad-layout/lamad-layout.component.html +++ b/elohim-app/src/app/lamad/components/lamad-layout/lamad-layout.component.html @@ -9,6 +9,19 @@

📚 Lamad

Learning Platform - Where Understanding is Earned

+ +
+
+
{{ learningPathName }}
+
+
+
+
+
{{ masteryPercentage }}% to mastery
+
+
+
+