From dff210c89630a13dc61db22012a665b32892f192 Mon Sep 17 00:00:00 2001 From: Robbie Hickey Date: Tue, 5 Sep 2017 15:58:25 -0500 Subject: [PATCH 01/14] progress day 1 --- 01 - JavaScript Drum Kit/index-START.html | 25 ++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html index 4070d32767..764cdd26d7 100644 --- a/01 - JavaScript Drum Kit/index-START.html +++ b/01 - JavaScript Drum Kit/index-START.html @@ -1,10 +1,12 @@ + Codestin Search App + @@ -57,10 +59,27 @@ - + let keys = document.getElementsByClassName("keys")[0]; + keys.addEventListener("click", (e) => { + if (e.target && e.target.parentElement !== "BODY") { + let key = e.target.parentElement.attributes["data-key"].nodeValue; + playSample(key); + } + }) + + function playSample(key) { + let sound = soundMap.filter(m => m.key === key)[0]; + new Audio(sound.file).play(); + } + - + + \ No newline at end of file From 9a2f730d9f6730b51adfd52e5c2a119704a37a46 Mon Sep 17 00:00:00 2001 From: Robbie Hickey Date: Wed, 6 Sep 2017 11:59:33 -0500 Subject: [PATCH 02/14] completed day 1 --- 01 - JavaScript Drum Kit/index-START.html | 26 +++++++++++------------ 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html index 764cdd26d7..143c16f9fc 100644 --- a/01 - JavaScript Drum Kit/index-START.html +++ b/01 - JavaScript Drum Kit/index-START.html @@ -60,22 +60,22 @@ From b6b632d55ca1675d2cf9e9a4d548dc4ca654c4fc Mon Sep 17 00:00:00 2001 From: Robbie Hickey Date: Wed, 6 Sep 2017 12:00:08 -0500 Subject: [PATCH 03/14] get rid of needless instantiation --- 01 - JavaScript Drum Kit/index-START.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html index 143c16f9fc..21c5f297cb 100644 --- a/01 - JavaScript Drum Kit/index-START.html +++ b/01 - JavaScript Drum Kit/index-START.html @@ -68,7 +68,7 @@ function playSample(key) { let sample = document.querySelector(`audio[data-key="${key}"]`) if (!sample) return; - new Audio(sample.src).play(); + sample.play(); } function coolEffect(key) { From 8701faf39036f8403d14439aef65d25e6dcf8323 Mon Sep 17 00:00:00 2001 From: Robbie Hickey Date: Wed, 6 Sep 2017 12:19:35 -0500 Subject: [PATCH 04/14] shortcircuit playback on consecutive clicks --- 01 - JavaScript Drum Kit/index-START.html | 1 + 1 file changed, 1 insertion(+) diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html index 21c5f297cb..b3113e579e 100644 --- a/01 - JavaScript Drum Kit/index-START.html +++ b/01 - JavaScript Drum Kit/index-START.html @@ -68,6 +68,7 @@ function playSample(key) { let sample = document.querySelector(`audio[data-key="${key}"]`) if (!sample) return; + sample.currentTime = 0; sample.play(); } From ee9548d14b3bdaffb69616eea874f287211bbb7b Mon Sep 17 00:00:00 2001 From: Robbie Hickey Date: Wed, 6 Sep 2017 15:33:15 -0500 Subject: [PATCH 05/14] day 2 complete --- 02 - JS and CSS Clock/index-START.html | 88 ++++++++++++++++++-------- 1 file changed, 61 insertions(+), 27 deletions(-) diff --git a/02 - JS and CSS Clock/index-START.html b/02 - JS and CSS Clock/index-START.html index ee7eaefb1f..e3396f5afd 100644 --- a/02 - JS and CSS Clock/index-START.html +++ b/02 - JS and CSS Clock/index-START.html @@ -1,26 +1,28 @@ + Codestin Search App + -
-
-
-
-
-
+
+
+
+
+
+
- + + \ No newline at end of file From b0093ba1f2ad73457e5245dd11becc4f788128f3 Mon Sep 17 00:00:00 2001 From: Robbie Hickey Date: Fri, 8 Sep 2017 13:37:33 -0500 Subject: [PATCH 06/14] day 3 --- 03 - CSS Variables/index-START.html | 32 ++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/03 - CSS Variables/index-START.html b/03 - CSS Variables/index-START.html index 8a4f0d556e..bf86700e1a 100644 --- a/03 - CSS Variables/index-START.html +++ b/03 - CSS Variables/index-START.html @@ -1,9 +1,11 @@ + Codestin Search App +

Update CSS Variables with JS

@@ -21,11 +23,25 @@

Update CSS Variables with JS

- + + \ No newline at end of file From 98b5fd26c9b36fe48ed3f4e4fd9cc103bfe19e9f Mon Sep 17 00:00:00 2001 From: Robbie Hickey Date: Fri, 8 Sep 2017 14:04:10 -0500 Subject: [PATCH 07/14] day 4 --- 04 - Array Cardio Day 1/index-START.html | 133 ++++++++++++++++++++--- 1 file changed, 116 insertions(+), 17 deletions(-) diff --git a/04 - Array Cardio Day 1/index-START.html b/04 - Array Cardio Day 1/index-START.html index eec0ffc31d..6949af06d5 100644 --- a/04 - Array Cardio Day 1/index-START.html +++ b/04 - Array Cardio Day 1/index-START.html @@ -1,9 +1,11 @@ + Codestin Search App +

Psst: have a look at the JavaScript Console 💁

- + + \ No newline at end of file From 4f020aca1d29a96e1fe3ac568a058fd169f1eb32 Mon Sep 17 00:00:00 2001 From: Robbie Hickey Date: Fri, 8 Sep 2017 14:51:43 -0500 Subject: [PATCH 08/14] day 5 --- 05 - Flex Panel Gallery/index-START.html | 113 +++++++++++++++++------ 1 file changed, 87 insertions(+), 26 deletions(-) diff --git a/05 - Flex Panel Gallery/index-START.html b/05 - Flex Panel Gallery/index-START.html index 31c9167e16..110b5e158b 100644 --- a/05 - Flex Panel Gallery/index-START.html +++ b/05 - Flex Panel Gallery/index-START.html @@ -1,75 +1,122 @@ + Codestin Search App + @@ -102,10 +149,24 @@
- + + \ No newline at end of file From 59d11e2bdbb57d000c67bbc65c9b705643aab033 Mon Sep 17 00:00:00 2001 From: Robbie Hickey Date: Fri, 8 Sep 2017 20:35:19 -0500 Subject: [PATCH 09/14] day 6 --- 06 - Type Ahead/index-START.html | 50 ++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/06 - Type Ahead/index-START.html b/06 - Type Ahead/index-START.html index 1436886918..7d7b34d668 100644 --- a/06 - Type Ahead/index-START.html +++ b/06 - Type Ahead/index-START.html @@ -1,10 +1,12 @@ + Codestin Search App +
@@ -14,9 +16,47 @@
  • or a state
  • - + - - - + \ No newline at end of file From 5ad16e9e1b51712fb45a246e87a1905f32cc8e44 Mon Sep 17 00:00:00 2001 From: Robbie Hickey Date: Fri, 8 Sep 2017 20:45:17 -0500 Subject: [PATCH 10/14] day 7 --- 07 - Array Cardio Day 2/index-START.html | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/07 - Array Cardio Day 2/index-START.html b/07 - Array Cardio Day 2/index-START.html index 969566ff78..5065185953 100644 --- a/07 - Array Cardio Day 2/index-START.html +++ b/07 - Array Cardio Day 2/index-START.html @@ -1,9 +1,11 @@ + Codestin Search App +

    Psst: have a look at the JavaScript Console 💁

    - + + \ No newline at end of file From b0a29a3c6ca7743a2eea2409f9fc2200c58df366 Mon Sep 17 00:00:00 2001 From: Robbie Hickey Date: Fri, 8 Sep 2017 21:06:37 -0500 Subject: [PATCH 11/14] day 8 --- 08 - Fun with HTML5 Canvas/index-START.html | 68 ++++++++++++++++++--- 1 file changed, 59 insertions(+), 9 deletions(-) diff --git a/08 - Fun with HTML5 Canvas/index-START.html b/08 - Fun with HTML5 Canvas/index-START.html index 37c148df07..e121ada0cd 100644 --- a/08 - Fun with HTML5 Canvas/index-START.html +++ b/08 - Fun with HTML5 Canvas/index-START.html @@ -1,19 +1,69 @@ + Codestin Search App + - - + + + + - + + \ No newline at end of file From d116d191afb6a848eac656f68eeb518538e5b457 Mon Sep 17 00:00:00 2001 From: Robbie Hickey Date: Fri, 8 Sep 2017 21:17:51 -0500 Subject: [PATCH 12/14] day 9 --- 09 - Dev Tools Domination/index-START.html | 31 +++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/09 - Dev Tools Domination/index-START.html b/09 - Dev Tools Domination/index-START.html index 196fffd719..c6d9c4c76d 100644 --- a/09 - Dev Tools Domination/index-START.html +++ b/09 - Dev Tools Domination/index-START.html @@ -1,9 +1,11 @@ + Codestin Search App +

    ×BREAK×DOWN×

    @@ -18,29 +20,56 @@ } // Regular + console.log('hello') // Interpolated + console.log('hello I am a %s string!', 'terrible') // Styled + //console.log('%c Cool text', 'font-size:50px;background:red;') // warning! + console.warn('oh dear'); // Error :| + console.error('uh oh'); // Info + console.info('some sort of fun fact') // Testing + console.assert(1 === 2, 'something failed') // clearing + console.clear(); // Viewing DOM Elements + console.log(document.querySelector('p')) + console.dir(document.querySelector('p')) // Grouping together + console.clear(); + dogs.forEach(dog => { + console.group(`${dog.name}`); + console.log('This is ' + dog.name); + console.log(`${dog.name} is ${dog.age} years old`); + console.groupEnd(`${dog.name}`); + }) // counting + console.count('Wes'); + console.count('Wes'); + console.count('Rob'); + console.count('Wes'); + console.count('Wes'); // timing + console.time('fetching data'); + setTimeout(() => console.timeEnd('fetching data') && console.log('long running'), 1000); + // table + console.table(dogs); - + + \ No newline at end of file From 679b9f5b5308c7e0f93a17f96cbaa1692b7b8738 Mon Sep 17 00:00:00 2001 From: Robbie Hickey Date: Fri, 8 Sep 2017 22:03:19 -0500 Subject: [PATCH 13/14] day 10 --- .../index-START.html | 65 ++++++++++++------- 1 file changed, 41 insertions(+), 24 deletions(-) diff --git a/10 - Hold Shift and Check Checkboxes/index-START.html b/10 - Hold Shift and Check Checkboxes/index-START.html index aeac48e7f9..18b49ab9a5 100644 --- a/10 - Hold Shift and Check Checkboxes/index-START.html +++ b/10 - Hold Shift and Check Checkboxes/index-START.html @@ -1,59 +1,58 @@ + Codestin Search App + -