Skip to content

Commit

Permalink
Fix: Added self-trained model
Browse files Browse the repository at this point in the history
  • Loading branch information
hoangsonww committed May 14, 2024
1 parent 66ea379 commit f7020b8
Showing 1 changed file with 27 additions and 14 deletions.
41 changes: 27 additions & 14 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@
border-color: #555;
}

body.dark-mode li {
background: #2e2e2e;
border-left-color: #82b1ff;
}

body.dark-mode code {
background-color: #2e2e2e;
}
Expand Down Expand Up @@ -784,30 +789,37 @@ <h2 id="live-info-website">Live Info Website</h2>

<script>
document.addEventListener('DOMContentLoaded', function () {
const toggleButton = document.getElementById('toggle-dark-mode');
const toggleButton = document.getElementById('toggle-dark-mode');
const scrollToTopButton = document.getElementById('scroll-to-top');

if (localStorage.getItem('dark-mode') === 'enabled') {
document.body.classList.add('dark-mode');
}

toggleButton.addEventListener('click', function () {
toggleButton.addEventListener('click', function () {
document.body.classList.toggle('dark-mode');
if (document.body.classList.contains('dark-mode')) {
localStorage.setItem('dark-mode', 'enabled');
}
else {
localStorage.removeItem('dark-mode');
}
});
});
</script>

<script>
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function(e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
anchor.addEventListener('click', function(e) {
e.preventDefault();
document.querySelector(this.getAttribute('href')).scrollIntoView({
behavior: 'smooth'
});
});
});
});

const scrollToTopButton = document.getElementById('scroll-to-top');

window.addEventListener('scroll', () => {
if (window.pageYOffset > 300) {
scrollToTopButton.style.display = 'block';
} else {
}
else {
scrollToTopButton.style.display = 'none';
}
});
Expand All @@ -818,6 +830,7 @@ <h2 id="live-info-website">Live Info Website</h2>
behavior: 'smooth'
});
});
});
</script>

</html>

0 comments on commit f7020b8

Please sign in to comment.