diff --git a/index.html b/index.html index da78416..d86d3a5 100644 --- a/index.html +++ b/index.html @@ -40,14 +40,14 @@

StudyPlan

- +
@@ -137,7 +137,7 @@

StudyPlan

a 45,45 0 1,0 -90,0 "> -
25:00
+
24:00
@@ -389,6 +389,13 @@

{ localStorage.setItem('studyplan_dark_mode', darkModeToggle.checked); diff --git a/js/app.js b/js/app.js index 9bfd993..210f0d7 100644 --- a/js/app.js +++ b/js/app.js @@ -111,6 +111,9 @@ function openNewSubjectModal() { newSubjectName.focus(); } + + + function renderSidebarSubjects() { const listEl = document.getElementById('subjects-sidebar-list'); if (!listEl) return; @@ -918,6 +921,29 @@ document.addEventListener('DOMContentLoaded', () => { const archivedTasksBtn = document.getElementById('archived-tasks-btn'); const focusModeBtn = document.getElementById('focus-mode-btn'); + +window.addEventListener('load', () => { + const params = new URLSearchParams(window.location.search); + const view = params.get('view'); + + if (view === 'tasks') { + allTasksBtn.click(); + } + + if (view === 'calendar') { + calendarBtn.click(); + } +}); + + + const navTasks = document.getElementById('nav-tasks'); + +navTasks.addEventListener('click', (e) => { + e.preventDefault(); + allTasksBtn.click(); +}); + + function updateSidebarActive(id) { document.querySelectorAll('.sidebar .nav-item').forEach(el => el.classList.remove('active')); document.getElementById(id).classList.add('active'); @@ -932,6 +958,21 @@ document.addEventListener('DOMContentLoaded', () => { renderTasks(); }); + const navCalendar = document.getElementById('nav-calendar'); + + navCalendar.addEventListener('click', (e) => { + e.preventDefault(); + calendarBtn.click(); +}); + + +const navDashboard = document.getElementById('nav-dashboard'); + +navDashboard.addEventListener('click', (e) => { + e.preventDefault(); + calendarBtn.click(); +}); + allTasksBtn.addEventListener('click', () => { currentView = 'all-tasks'; document.querySelector('.cal-section').classList.add('hidden'); diff --git a/support-page/index.html b/support-page/index.html index 5315a2a..68fbcd1 100644 --- a/support-page/index.html +++ b/support-page/index.html @@ -17,9 +17,9 @@

StudyPlan

diff --git a/support-page/support.css b/support-page/support.css index 638d7c1..4fffeb0 100644 --- a/support-page/support.css +++ b/support-page/support.css @@ -136,6 +136,13 @@ body { padding-left: 18px; } +.active-card { + border: 2px solid var(--color-text-primary); + box-shadow: var(--shadow-md); + transform: scale(1.02); + transition: all 0.3s ease; +} + /* FOOTER */ .site-footer { display: flex; diff --git a/support-page/support.js b/support-page/support.js index 594afac..170ef7a 100644 --- a/support-page/support.js +++ b/support-page/support.js @@ -1 +1,48 @@ -console.log("Support page loaded"); \ No newline at end of file +console.log("Support page loaded"); + +const darkMode = localStorage.getItem('studyplan_dark_mode'); + +if (darkMode === 'false') { + + document.documentElement.style.setProperty('--color-background-primary', '#ffffff'); + document.documentElement.style.setProperty('--color-background-secondary', '#f7f7f5'); + document.documentElement.style.setProperty('--color-background-tertiary', '#efefec'); + + document.documentElement.style.setProperty('--color-text-primary', '#1a1a18'); + document.documentElement.style.setProperty('--color-text-secondary', '#6b6b66'); + +} + + +const links = document.querySelectorAll('.footer-links a'); + +links.forEach(link => { + link.addEventListener('click', () => { + + document.querySelectorAll('.card').forEach(card => { + card.classList.remove('active-card'); + }); + + const targetId = link.getAttribute('href').split('#')[1]; + const targetSection = document.getElementById(targetId); + + if (targetSection) { + targetSection.classList.add('active-card'); + } + }); +}); + + +window.addEventListener('load', () => { + + const currentHash = window.location.hash.substring(1); + + if (currentHash) { + + const targetSection = document.getElementById(currentHash); + + if (targetSection) { + targetSection.classList.add('active-card'); + } + } +}); \ No newline at end of file