add darkmode
All checks were successful
Build and Push Container / build-and-push (push) Successful in 13s

This commit is contained in:
2026-05-05 06:48:29 -04:00
parent fea9449d40
commit e55534b0d5
8 changed files with 375 additions and 4 deletions

View File

@@ -19,9 +19,33 @@
<a href="prompts.html">Prompt Guide</a>
<a href="math.html">Math & Concepts</a>
</div>
<button class="dark-toggle" id="darkToggle" aria-label="Toggle dark mode">🌙</button>
</div>
</nav>
<script>
(function(){
var btn = document.getElementById('darkToggle');
var saved = localStorage.getItem('theme');
if(saved === 'dark' || (!saved && window.matchMedia('(prefers-color-scheme: dark)').matches)){
document.documentElement.setAttribute('data-theme','dark');
btn.textContent = '☀️';
}
btn.addEventListener('click', function(){
var isDark = document.documentElement.getAttribute('data-theme') === 'dark';
if(isDark){
document.documentElement.removeAttribute('data-theme');
btn.textContent = '🌙';
localStorage.setItem('theme','light');
} else {
document.documentElement.setAttribute('data-theme','dark');
btn.textContent = '☀️';
localStorage.setItem('theme','dark');
}
});
})();
</script>
<div class="hero">
<h1>AI Techniques</h1>
<p>How AI models are built, trained, and optimized.</p>