layout | title | nav_order | nav_exclude | permalink | seo | ||||
---|---|---|---|---|---|---|---|---|---|
home |
Home |
1 |
false |
index.html |
|
{: .mb-2 } Instructor: Hao Zhang, UC San Diego, Winter 2025 {: .mb-2 .fs-6 .text-grey-dk-000 }
Toggle Dark Mode
{% assign announcements = site.announcements | reverse %} {% for announcement in announcements %} {{ announcement }} {% endfor %}
{% assign mods = site.modules | where: 'class', 'CSE234' %} {% assign active-mods = '' | split: '' %}
{% for mod in mods %} {% if mod.status == 'Active' %} {% assign active-mods = active-mods | push: mod %} {% endif %} {% endfor %}
{% for module in active-mods %} {{ module }} {% endfor %}
<script src="assets/darkmode.js"></script> <script> const toggleDarkMode = document.querySelector('.js-toggle-dark-mode'); jtd.addEvent(toggleDarkMode, 'click', function(){ if (jtd.getTheme() === 'custom_dark') { jtd.setTheme('light'); localStorage.setItem("darkMode", 0); toggleDarkMode.innerHTML = "Toggle Dark Mode"; toggleDarkMode.classList.add('dm-btn'); toggleDarkMode.classList.remove('dm-dark-btn'); } else { jtd.setTheme('custom_dark'); localStorage.setItem("darkMode", 1); toggleDarkMode.innerHTML = "Return to the Light"; toggleDarkMode.classList.add('dm-dark-btn'); toggleDarkMode.classList.remove('dm-btn'); } }); window.addEventListener("DOMContentLoaded", (event) => { onLoad(); }); </script>