diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/01 - JavaScript Drum Kit/index-FINISHED.html b/01 - JavaScript Drum Kit/index-FINISHED.html old mode 100644 new mode 100755 diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html old mode 100644 new mode 100755 index 4070d32767..567c3918bd --- a/01 - JavaScript Drum Kit/index-START.html +++ b/01 - JavaScript Drum Kit/index-START.html @@ -1,63 +1,81 @@ - + - + JS Drum Kit - + -
-
+
+
A - clap + clap
-
+
S - hihat + hihat
-
+
D - kick + kick
-
+
F - openhat + openhat
-
+
G - boom + boom
-
+
H - ride + ride
-
+
J - snare + snare
-
+
K - tom + tom
-
+
L - tink + tink
- - - - - - - - - + + + + + + + + + diff --git a/01 - JavaScript Drum Kit/index.html b/01 - JavaScript Drum Kit/index.html old mode 100644 new mode 100755 diff --git a/01 - JavaScript Drum Kit/style.css b/01 - JavaScript Drum Kit/style.css old mode 100644 new mode 100755 diff --git a/02 - JS + CSS Clock/index-FINISHED.html b/02 - JS + CSS Clock/index-FINISHED.html old mode 100644 new mode 100755 diff --git a/02 - JS + CSS Clock/index-START.html b/02 - JS + CSS Clock/index-START.html old mode 100644 new mode 100755 index 2712384201..28bb102015 --- a/02 - JS + CSS Clock/index-START.html +++ b/02 - JS + CSS Clock/index-START.html @@ -61,13 +61,36 @@ background:black; position: absolute; top:50%; + transform-origin: 100%; + transform: rotate(90deg); + transition: all 0.05s; + transition-timing-function: cubic-bezier(0.1, 2.7, 0.56, 1) } diff --git a/02 - JS + CSS Clock/index.html b/02 - JS + CSS Clock/index.html old mode 100644 new mode 100755 diff --git a/03 - CSS Variables/index-FINISHED.html b/03 - CSS Variables/index-FINISHED.html old mode 100644 new mode 100755 diff --git a/03 - CSS Variables/index-START.html b/03 - CSS Variables/index-START.html old mode 100644 new mode 100755 index bf0f33e3ba..70a4934b1e --- a/03 - CSS Variables/index-START.html +++ b/03 - CSS Variables/index-START.html @@ -21,6 +21,21 @@

Update CSS Variables with JS

diff --git a/04 - Array Cardio Day 1/index-FINISHED.html b/04 - Array Cardio Day 1/index-FINISHED.html old mode 100644 new mode 100755 diff --git a/04 - Array Cardio Day 1/index-START.html b/04 - Array Cardio Day 1/index-START.html old mode 100644 new mode 100755 index 6e28e357d0..b7e2ba8971 --- a/04 - Array Cardio Day 1/index-START.html +++ b/04 - Array Cardio Day 1/index-START.html @@ -27,28 +27,62 @@ // Array.prototype.filter() // 1. Filter the list of inventors for those who were born in the 1500's + const bornInThe1500s = inventors.filter(inventor => inventor.year >= 1500 && inventor.year < 1600) + console.table(bornInThe1500s) // Array.prototype.map() // 2. Give us an array of the inventory first and last names + const inventorNames = inventors.map(inventor => `${inventor.first} ${inventor.last}`) + console.log(inventorNames) // Array.prototype.sort() // 3. Sort the inventors by birthdate, oldest to youngest + const oldestToYoungest = inventors.sort((inventorA, inventorB) => inventorA.year > inventorB.year ? 1 : -1) + console.table(oldestToYoungest) // Array.prototype.reduce() // 4. How many years did all the inventors live? + const totalYearsLived = inventors.reduce((total, inventor) => { + return total + (inventor.passed - inventor.year) + }, 0) + console.log(totalYearsLived) // 5. Sort the inventors by years lived + const yearsLived = inventor => inventor.passed - inventor.year + const sortedYearsLived = inventors.sort((inventorA, inventorB) => yearsLived(inventorA) > yearsLived(inventorB) ? 1 : -1) + console.table(sortedYearsLived) // 6. create a list of Boulevards in Paris that contain 'de' anywhere in the name // https://en.wikipedia.org/wiki/Category:Boulevards_in_Paris + // const category = document.querySelector('.mw-category') + // const links = Array.from(category.querySelectorAll('a')) // could also do with spread [...NodeList] + // + // const de = links + // .map(link => link.textContent) + // .filter(streetName => streetName.includes('de')) + // Have to run in console on wikipedia page // 7. sort Exercise // Sort the people alphabetically by last name + const sortedAlphabetically = people.sort((previous, next) => { + const [previousLast, previousFirst] = previous.split(', ') + const [nextLast, nextFirst] = next.split(', ') + return previousLast > nextLast ? 1 : -1 + }) + console.log(sortedAlphabetically) // 8. Reduce Exercise // Sum up the instances of each of these const data = ['car', 'car', 'truck', 'truck', 'bike', 'walk', 'car', 'van', 'bike', 'walk', 'car', 'van', 'car', 'truck' ]; + const sumUpInstances = data.reduce((object, item) => { + if (!object[item]) { + object[item] = 0 + } + object[item]++ + return object + }, {}) + console.log(sumUpInstances) diff --git a/05 - Flex Panel Gallery/index-FINISHED.html b/05 - Flex Panel Gallery/index-FINISHED.html old mode 100644 new mode 100755 diff --git a/05 - Flex Panel Gallery/index-START.html b/05 - Flex Panel Gallery/index-START.html old mode 100644 new mode 100755 index e1d643ad5c..e1be9c8e22 --- a/05 - Flex Panel Gallery/index-START.html +++ b/05 - Flex Panel Gallery/index-START.html @@ -24,6 +24,7 @@ .panels { min-height:100vh; overflow: hidden; + display: flex; } .panel { @@ -41,6 +42,10 @@ font-size: 20px; background-size:cover; background-position:center; + flex: 1; + justify-content: center; + display: flex; + flex-direction: column; } @@ -54,8 +59,17 @@ margin:0; width: 100%; transition:transform 0.5s; + flex: 1 0 auto; + display: flex; + justify-content: center; + align-items: center; } + .panel > *:first-child { transform: translateY(-100%);} + .panel.open-active > *:first-child { transform: translateY(0);} + .panel > *:last-child { transform: translateY(100%);} + .panel.open-active > *:last-child { transform: translateY(0);} + .panel p { text-transform: uppercase; font-family: 'Amatic SC', cursive; @@ -67,6 +81,7 @@ } .panel.open { + flex: 5; font-size:40px; } @@ -107,7 +122,20 @@
diff --git a/06 - Type Ahead/index-FINISHED.html b/06 - Type Ahead/index-FINISHED.html old mode 100644 new mode 100755 diff --git a/06 - Type Ahead/index-START.html b/06 - Type Ahead/index-START.html old mode 100644 new mode 100755 index 1436886918..68e00adc58 --- a/06 - Type Ahead/index-START.html +++ b/06 - Type Ahead/index-START.html @@ -17,6 +17,44 @@ diff --git a/06 - Type Ahead/style.css b/06 - Type Ahead/style.css old mode 100644 new mode 100755 diff --git a/07 - Array Cardio Day 2/index-FINISHED.html b/07 - Array Cardio Day 2/index-FINISHED.html old mode 100644 new mode 100755 diff --git a/07 - Array Cardio Day 2/index-START.html b/07 - Array Cardio Day 2/index-START.html old mode 100644 new mode 100755 diff --git a/08 - Fun with HTML5 Canvas/index-FINISHED.html b/08 - Fun with HTML5 Canvas/index-FINISHED.html old mode 100644 new mode 100755 diff --git a/08 - Fun with HTML5 Canvas/index-START.html b/08 - Fun with HTML5 Canvas/index-START.html old mode 100644 new mode 100755 index 37c148df07..52e13dfb1b --- a/08 - Fun with HTML5 Canvas/index-START.html +++ b/08 - Fun with HTML5 Canvas/index-START.html @@ -7,6 +7,65 @@ diff --git a/17 - Sort Without Articles/index-FINISHED.html b/17 - Sort Without Articles/index-FINISHED.html old mode 100644 new mode 100755 diff --git a/17 - Sort Without Articles/index-START.html b/17 - Sort Without Articles/index-START.html old mode 100644 new mode 100755 index cfaf3e0440..92b95f43b8 --- a/17 - Sort Without Articles/index-START.html +++ b/17 - Sort Without Articles/index-START.html @@ -43,8 +43,59 @@
    diff --git a/18 - Adding Up Times with Reduce/index-FINISHED.html b/18 - Adding Up Times with Reduce/index-FINISHED.html old mode 100644 new mode 100755 diff --git a/18 - Adding Up Times with Reduce/index-START.html b/18 - Adding Up Times with Reduce/index-START.html old mode 100644 new mode 100755 diff --git a/19 - Webcam Fun/scripts.js b/19 - Webcam Fun/scripts.js old mode 100644 new mode 100755 diff --git a/20 - Speech Detection/index-FINISHED.html b/20 - Speech Detection/index-FINISHED.html old mode 100644 new mode 100755 diff --git a/20 - Speech Detection/index-START.html b/20 - Speech Detection/index-START.html old mode 100644 new mode 100755 diff --git a/21 - Geolocation/index-FINISHED.html b/21 - Geolocation/index-FINISHED.html old mode 100644 new mode 100755 diff --git a/21 - Geolocation/index-START.html b/21 - Geolocation/index-START.html old mode 100644 new mode 100755 diff --git a/22 - Follow Along Link Highlighter/index-FINISHED.html b/22 - Follow Along Link Highlighter/index-FINISHED.html old mode 100644 new mode 100755 diff --git a/22 - Follow Along Link Highlighter/index-START.html b/22 - Follow Along Link Highlighter/index-START.html old mode 100644 new mode 100755 diff --git a/22 - Follow Along Link Highlighter/style.css b/22 - Follow Along Link Highlighter/style.css old mode 100644 new mode 100755 diff --git a/23 - Speech Synthesis/index-FINISHED.html b/23 - Speech Synthesis/index-FINISHED.html old mode 100644 new mode 100755 diff --git a/23 - Speech Synthesis/index-START.html b/23 - Speech Synthesis/index-START.html old mode 100644 new mode 100755 diff --git a/23 - Speech Synthesis/style.css b/23 - Speech Synthesis/style.css old mode 100644 new mode 100755 diff --git a/24 - Sticky Nav/index-FINISHED.html b/24 - Sticky Nav/index-FINISHED.html old mode 100644 new mode 100755 diff --git a/24 - Sticky Nav/index-START.html b/24 - Sticky Nav/index-START.html old mode 100644 new mode 100755 diff --git a/24 - Sticky Nav/style-FINISHED.css b/24 - Sticky Nav/style-FINISHED.css old mode 100644 new mode 100755 diff --git a/24 - Sticky Nav/style-START.css b/24 - Sticky Nav/style-START.css old mode 100644 new mode 100755 diff --git a/25 - Event Capture, Propagation, Bubbling and Once/index-FINISHED.html b/25 - Event Capture, Propagation, Bubbling and Once/index-FINISHED.html old mode 100644 new mode 100755 diff --git a/25 - Event Capture, Propagation, Bubbling and Once/index-START.html b/25 - Event Capture, Propagation, Bubbling and Once/index-START.html old mode 100644 new mode 100755 diff --git a/26 - Stripe Follow Along Nav/index-FINISHED.html b/26 - Stripe Follow Along Nav/index-FINISHED.html old mode 100644 new mode 100755 diff --git a/26 - Stripe Follow Along Nav/index-START.html b/26 - Stripe Follow Along Nav/index-START.html old mode 100644 new mode 100755 diff --git a/27 - Click and Drag/index-FINISHED.html b/27 - Click and Drag/index-FINISHED.html old mode 100644 new mode 100755 diff --git a/27 - Click and Drag/index-START.html b/27 - Click and Drag/index-START.html old mode 100644 new mode 100755 diff --git a/27 - Click and Drag/style.css b/27 - Click and Drag/style.css old mode 100644 new mode 100755 diff --git a/28 - Video Speed Controller/index-FINISHED.html b/28 - Video Speed Controller/index-FINISHED.html old mode 100644 new mode 100755 diff --git a/28 - Video Speed Controller/index-START.html b/28 - Video Speed Controller/index-START.html old mode 100644 new mode 100755 diff --git a/28 - Video Speed Controller/style.css b/28 - Video Speed Controller/style.css old mode 100644 new mode 100755 diff --git a/29 - Countown Timer/index.html b/29 - Countown Timer/index.html old mode 100644 new mode 100755 diff --git a/29 - Countown Timer/scripts-FINISHED.js b/29 - Countown Timer/scripts-FINISHED.js old mode 100644 new mode 100755 diff --git a/29 - Countown Timer/scripts-START.js b/29 - Countown Timer/scripts-START.js old mode 100644 new mode 100755 diff --git a/29 - Countown Timer/style.css b/29 - Countown Timer/style.css old mode 100644 new mode 100755 diff --git a/30 - Whack A Mole/dirt.svg b/30 - Whack A Mole/dirt.svg old mode 100644 new mode 100755 diff --git a/30 - Whack A Mole/index-FINISHED.html b/30 - Whack A Mole/index-FINISHED.html old mode 100644 new mode 100755 diff --git a/30 - Whack A Mole/index-START.html b/30 - Whack A Mole/index-START.html old mode 100644 new mode 100755 diff --git a/30 - Whack A Mole/mole.svg b/30 - Whack A Mole/mole.svg old mode 100644 new mode 100755 diff --git a/30 - Whack A Mole/style.css b/30 - Whack A Mole/style.css old mode 100644 new mode 100755 diff --git a/readme.md b/readme.md old mode 100644 new mode 100755