Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<title>TTC</title>
<!--Adding Favicon-->
<link rel="shortcut icon" href="favicon.png" type="image/x-icon">
<script src="https://kit.fontawesome.com/f96226a298.js" crossorigin="anonymous"></script>

<!-- Add mute button icon library -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
Expand Down Expand Up @@ -36,12 +37,12 @@
<body>

<nav class="navbar fixed-top" id="hero">
<button class="btn btn-primary" onclick="playAudio(this)" type="button">Play Music</button>
<button class="btn btn-primary" onclick="playAudio(this)" type="button"><i class="fa-solid fa-music"></i></button>
<input type="range" id="volume-slider">
<a class="navbar-brand" href="about.html">About</a>
<a class="navbar-brand" href="#">Play Game</a>
<a class="navbar-brand" href="contributors.html">Contributors</a>
<button class="btn btn-info" onclick="myFunction()">Dark Mode</button>
<button class="btn btn-info" onclick="myFunction()"><i class="fa-solid fa-moon"></i></button>
</nav>
</br>

Expand All @@ -60,11 +61,11 @@
function playAudio(btn) {
if(x.paused) {
x.play();
document.querySelector(".btn-primary").innerHTML = "Pause Music";
document.querySelector(".btn-primary").innerHTML = "&#9654;";
}
else {
x.pause();
document.querySelector(".btn-primary").innerHTML = "Play Music";
document.querySelector(".btn-primary").innerHTML = "&#9612;&#9612;";
}
}
</script>
Expand Down Expand Up @@ -152,9 +153,9 @@ <h4>Scoreboard</h4>
});

if (darkToggle[1].textContent === "Dark Mode"){
darkToggle[1].textContent = "Light Mode"
darkToggle[1].textContent.innerHTML = "&#9789;"
} else {
darkToggle[1].textContent = "Dark Mode"
darkToggle[1].textContent.innerHTML = "&#9790;"
}

hero.classList.toggle("dark-hero");
Expand Down
7 changes: 5 additions & 2 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ nav {
padding: 3px;
text-align: center;
}

nav input {
margin-left: 10px;
width: 15%;
}
button {
outline: none;
border: 4px solid green;
Expand Down Expand Up @@ -461,4 +464,4 @@ thead{

.btn-sound:hover {
background-color: rgb(94, 143, 206);
}
}