Skip to content

Commit b2fc901

Browse files
committed
Merge branch 'master' of github.com:wesbos/JavaScript30
2 parents 1ec5c17 + d124b95 commit b2fc901

File tree

5 files changed

+3
-125
lines changed

5 files changed

+3
-125
lines changed

01 - JavaScript Drum Kit/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
function playSound(e) {
6464
const audio = document.querySelector(`audio[data-key="${e.keyCode}"]`);
6565
const key = document.querySelector(`.key[data-key="${e.keyCode}"]`);
66-
if (!audio) return; // stop the function from running all together
66+
if (!audio) return; // stop the function from running altogether
6767
audio.currentTime = 0; // rewind to the start
6868
audio.play();
6969
key.classList.add('playing');

02 - JS + CSS Clock/index-FINISHED.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
minsHand.style.transform = `rotate(${minsDegrees}deg)`;
8686

8787
const hour = now.getHours();
88-
const hourDegrees = ((mins / 12) * 360) + 90;
88+
const hourDegrees = ((hour / 12) * 360) + 90;
8989
hourHand.style.transform = `rotate(${hourDegrees}deg)`;
9090
}
9191

02 - JS + CSS Clock/index.html

Lines changed: 0 additions & 96 deletions
This file was deleted.

24 - Sticky Nav/index-START.html

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -54,20 +54,7 @@ <h1>A story about getting lost.</h1>
5454
</div>
5555

5656
<script>
57-
const nav = document.querySelector('#main');
58-
const topOfNav = nav.offsetTop;
59-
60-
function fixNav() {
61-
if(window.scrollY >= topOfNav) {
62-
document.body.style.paddingTop = nav.offsetHeight + 'px';
63-
document.body.classList.add('fixed-nav');
64-
} else {
65-
document.body.style.paddingTop = 0;
66-
document.body.classList.remove('fixed-nav');
67-
}
68-
}
69-
70-
window.addEventListener('scroll', fixNav);
57+
7158
</script>
7259

7360
</body>

24 - Sticky Nav/style-START.css

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@ body {
2323
transition: transform 0.5s;
2424
}
2525

26-
.fixed-nav .site-wrap {
27-
transform: scale(1);
28-
}
29-
3026
header {
3127
text-align: center;
3228
height:50vh;
@@ -52,11 +48,6 @@ nav {
5248
z-index: 1;
5349
}
5450

55-
.fixed-nav nav {
56-
position: fixed;
57-
box-shadow: 0 5px rgba(0,0,0,0.1)
58-
}
59-
6051
nav ul {
6152
margin: 0;
6253
padding:0;
@@ -81,10 +72,6 @@ li.logo {
8172
font-size: 30px;
8273
}
8374

84-
.fixed-nav li.logo {
85-
max-width:500px;
86-
}
87-
8875
li.logo a {
8976
color:black;
9077
}

0 commit comments

Comments
 (0)