mirror of
https://github.com/cliffe/HacktivityLabSheets.git
synced 2026-02-21 11:18:09 +00:00
Update theme toggle functionality and default theme settings
- Changed the default theme from light to dark mode in the theme toggle functionality. - Updated the setup documentation to reflect the new default theme. - Added Google Fonts integration for improved typography in the Hacktivity theme. - Enhanced the lab layout with a theme toggle button for user convenience.
This commit is contained in:
4
index.md
4
index.md
@@ -80,8 +80,8 @@ document.addEventListener('DOMContentLoaded', function() {
|
||||
const themeIcon = document.getElementById('theme-icon');
|
||||
const body = document.body;
|
||||
|
||||
// Check for saved theme preference or default to light mode
|
||||
const currentTheme = localStorage.getItem('theme') || 'light';
|
||||
// Check for saved theme preference or default to dark mode
|
||||
const currentTheme = localStorage.getItem('theme') || 'dark';
|
||||
body.setAttribute('data-theme', currentTheme);
|
||||
updateThemeIcon(currentTheme);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user