Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
totaro committed Jan 4, 2024
1 parent bb9e963 commit 69d1965
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
<li><a href="#typewritereffect" id="menu-link">Typewriter Effect</a></li>
<li><a href="#mousefollow" id="menu-link">Mouse Follow</a></li>
<li><a href="#slidingcards" id="menu-link">Sliding Cards</a></li>
<li><a href="#changebg" id="menu-link">Change Background</a></li>
<li><a href="#changebgcolor" id="menu-link">Change Color</a></li>
</ul>
</div>

Expand Down Expand Up @@ -246,11 +246,11 @@ <h4>Autumn</h4>

</div>

<a id="changebg"></a>
<a id="changebgcolor"></a>
<div class="entry">
<div class="entry__meta">
<h6>Motion<span></span>#6</h6>
<h4>Change Background</h4><br>
<h6>Motion<span></span>#7</h6>
<h4>Change Color</h4><br>
<h5><ul class="inner-links">
<li><a href="#top">Top <i class="fa-solid fa-arrow-turn-up"></i></a></li>
</ul>
Expand All @@ -259,7 +259,7 @@ <h5><ul class="inner-links">
<figure id="change-bg" class="entry__media">

<button class="togglebutton">
Chance to light &nbsp; <i class="fa-solid fa-sun"></i>
Change background to light &nbsp; <i class="fa-solid fa-sun"></i>
</button>

</figure>
Expand Down
4 changes: 2 additions & 2 deletions script.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,10 @@ document.querySelector('.togglebutton').addEventListener('click', () => {

document.getElementById("change-bg").classList.toggle("change-figure-bg");

const initialText = `Chance to light &nbsp; <i class="fa-solid fa-sun"></i>`;
const initialText = `Change background to light &nbsp; <i class="fa-solid fa-sun"></i>`;

if (btn.innerHTML.toLowerCase().includes(initialText.toLowerCase())) {
btn.innerHTML = `Chance to dark &nbsp; <i class="fa-solid fa-moon">`;
btn.innerHTML = `Change background to dark &nbsp; <i class="fa-solid fa-moon">`;
} else {
btn.innerHTML = initialText;
}
Expand Down

0 comments on commit 69d1965

Please sign in to comment.