π³ 25/03 - 14:34 - Build a responsive interactive learning app called Vedic Maths Visual Coach using only:- HTML- CSS- vanilla JavaScriptDo not use React, Next.js, Vue, Angular, Tailwind, Bootstrap, o
4abae96 verified Download components/progress.js from onlyoneritz/deepsite-project-p0ofg: direct link, hf CLI and curl.
- Browser
- Download file 4 kB
-
https://huggingface.co/spaces/onlyoneritz/deepsite-project-p0ofg/resolve/main/components/progress.js
- Command line
-
hf download hf://spaces/onlyoneritz/deepsite-project-p0ofg/components/progress.js
-
curl -L -o progress.js https://huggingface.co/spaces/onlyoneritz/deepsite-project-p0ofg/resolve/main/components/progress.js
4 kB
| // components/progress.js | |
| // Visual chart of student progress | |
| window.renderProgress = function() { | |
| const content = document.getElementById('content'); | |
| const days = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']; | |
| const today = new Date().getDay(); // 0 = Sun, 1 = Mon... | |
| const adjustedToday = today === 0 ? 6 : today - 1; // Make Mon = 0 | |
| content.innerHTML = ` | |
| <div class="progress-section section active" id="progress"> | |
| <h1 class="progress-title">π Your Progress</h1> | |
| <div class="progress-dashboard"> | |
| <div class="stat-cards"> | |
| <div class="stat-card concepts-card"> | |
| <div class="stat-icon">π§ </div> | |
| <h3>Concepts Mastered</h3> | |
| <div class="stat-number">${state.conceptsCompleted.length}</div> | |
| <div class="stat-total">of 5 total</div> | |
| <div class="mini-progress"> | |
| <div class="mini-bar" style="width: ${(state.conceptsCompleted.length/5)*100}%"></div> | |
| </div> | |
| </div> | |
| <div class="stat-card streak-card"> | |
| <div class="stat-icon">π₯</div> | |
| <h3>Current Streak</h3> | |
| <div class="stat-number">${state.streak}</div> | |
| <div class="stat-label">days strong!</div> | |
| <p class="streak-message">${getStreakMessage()}</p> | |
| </div> | |
| <div class="stat-card weekly-card"> | |
| <div class="stat-icon">π</div> | |
| <h3>Weekly Goal</h3> | |
| <div class="stat-number">${state.weekProgress}%</div> | |
| <div class="circular-progress"> | |
| <svg viewBox="0 0 36 36"> | |
| <path d="M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831" fill="none" stroke="#e2e8f0" stroke-width="3" /> | |
| <path d="M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831" fill="none" stroke="#6366f1" stroke-width="3" | |
| stroke-dasharray="${state.weekProgress}, 100" /> | |
| </svg> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="weekly-calendar"> | |
| <h3>This Week's Activity</h3> | |
| <div class="calendar-grid"> | |
| ${days.map((day, idx) => ` | |
| <div class="calendar-day ${idx < adjustedToday ? 'completed' : ''} ${idx === adjustedToday ? 'today' : ''}"> | |
| <span class="day-name">${day}</span> | |
| <span class="day-status">${idx < adjustedToday ? 'β' : (idx === adjustedToday ? 'β’' : '')}</span> | |
| </div> | |
| `).join('')} | |
| </div> | |
| <p class="calendar-note">${getWeeklyMessage()}</p> | |
| </div> | |
| <div class="insights-card"> | |
| <h3>π‘ Insights</h3> | |
| <div class="insight-list"> | |
| <div class="insight-item"> | |
| <i data-lucide="trending-up"></i> | |
| <div> | |
| <strong>Strongest Area:</strong> Urdhva-Tiryak multiplication | |
| </div> | |
| </div> | |
| <div class="insight-item"> | |
| <i data-lucide="target"></i> | |
| <div> | |
| <strong>Focus Next:</strong> Base method (Nikhilam) | |
| </div> | |
| </div> | |
| <div class="insight-item"> | |
| <i data-lucide="award"></i> | |
| <div> | |
| <strong>Recent Win:</strong> Solved 67 Γ 38 in under 10 seconds! | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| `; | |
| if (window.lucide) lucide.createIcons(); | |
| }; | |
| function getStreakMessage() { | |
| if (state.streak < 2) return "Start your streak today! π₯"; | |
| if (state.streak < 7) return "Building momentum! πͺ"; | |
| return "Amazing consistency! π"; | |
| } | |
| function getWeeklyMessage() { | |
| if (state.weekProgress < 30) return "Start gentle β just 5 minutes today!"; | |
| if (state.weekProgress < 70) return "You're halfway there! Keep going! π"; | |
| return "Almost at your weekly goal! Finish strong! πͺ"; | |
| } |