Add initial website setup: Created essential files including package-lock.json, setup documentation, and foundational Blade templates. Implemented PageController for homepage and page display, integrated navigation and footer components, and established dark mode functionality. Enhanced CSS for custom scrollbar and smooth scrolling. Added SVG logos for branding. Updated routes for page handling.
This commit is contained in:
@@ -1,3 +1,23 @@
|
||||
import './bootstrap';
|
||||
|
||||
// Dark mode initialization
|
||||
document.addEventListener('DOMContentLoaded', function() {
|
||||
// Check for saved theme preference or default to 'light'
|
||||
const savedTheme = localStorage.getItem('darkMode');
|
||||
|
||||
if (savedTheme === null) {
|
||||
// If no saved preference, check system preference
|
||||
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
localStorage.setItem('darkMode', prefersDark.toString());
|
||||
}
|
||||
|
||||
// Listen for system theme changes
|
||||
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {
|
||||
if (localStorage.getItem('darkMode') === null) {
|
||||
localStorage.setItem('darkMode', e.matches.toString());
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user