From d6c43bc4a0765682aaa1a2f3f566fc15214b0e8b Mon Sep 17 00:00:00 2001 From: Rob Cataneo Date: Wed, 21 Dec 2016 17:55:16 -0600 Subject: [PATCH 1/7] Finished video 1 --- 01 - JavaScript Drum Kit/index-START.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html index 4070d32767..f4fc206d27 100644 --- a/01 - JavaScript Drum Kit/index-START.html +++ b/01 - JavaScript Drum Kit/index-START.html @@ -59,6 +59,25 @@ From 8e0b2e16278f671bb8f5d9bdbc3ab6d81329561d Mon Sep 17 00:00:00 2001 From: Rob Cataneo Date: Wed, 21 Dec 2016 18:33:19 -0600 Subject: [PATCH 2/7] Finished video 2 --- 02 - JS + CSS Clock/index-START.html | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/02 - JS + CSS Clock/index-START.html b/02 - JS + CSS Clock/index-START.html index 240705d8fe..0e6cd7f249 100644 --- a/02 - JS + CSS Clock/index-START.html +++ b/02 - JS + CSS Clock/index-START.html @@ -61,13 +61,37 @@ background:black; position: absolute; top:50%; + transform-origin: 100%; + transform: rotate(90deg); + transition: all 0.05s; + transition-timing-function: cubic-bezier(0.82,-0.82, 0, 3.13); } From b4beb6a66f9f20d84e98f5c44dee9f4bb16a0ca2 Mon Sep 17 00:00:00 2001 From: Rob Cataneo Date: Tue, 3 Jan 2017 21:48:21 -0800 Subject: [PATCH 3/7] Finished video 3 --- 03 - CSS Variables/index-START.html | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/03 - CSS Variables/index-START.html b/03 - CSS Variables/index-START.html index bf0f33e3ba..4cc870e736 100644 --- a/03 - CSS Variables/index-START.html +++ b/03 - CSS Variables/index-START.html @@ -21,7 +21,21 @@

Update CSS Variables with JS

From 37560e4d17fd84054efd960ba4221eccfd59253a Mon Sep 17 00:00:00 2001 From: Rob Cataneo Date: Fri, 17 Feb 2017 19:57:13 -0800 Subject: [PATCH 4/7] Finished video 4 --- 04 - Array Cardio Day 1/index-START.html | 35 +++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/04 - Array Cardio Day 1/index-START.html b/04 - Array Cardio Day 1/index-START.html index 6e28e357d0..ae269854f9 100644 --- a/04 - Array Cardio Day 1/index-START.html +++ b/04 - Array Cardio Day 1/index-START.html @@ -27,29 +27,62 @@ // Array.prototype.filter() // 1. Filter the list of inventors for those who were born in the 1500's + console.table(inventors.filter(inventor => inventor.year > 1500 && inventor.year < 1600)); // Array.prototype.map() // 2. Give us an array of the inventory first and last names + console.log(inventors.map(({first, last}) => `${first} ${last}`)); // Array.prototype.sort() // 3. Sort the inventors by birthdate, oldest to youngest + console.table(inventors.sort((x, y) => x.year > y.year ? 1 : -1)); // Array.prototype.reduce() // 4. How many years did all the inventors live? + console.log(inventors.reduce(((acc, {year, passed}) => acc += (passed - year)), 0)); // 5. Sort the inventors by years lived + console.table(inventors.sort((a,b) => { + const yearsA = a.passed - a.year; + const yearsB = b.passed - b.year; + return yearsA > yearsB ? -1 : 1; + })); // 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 = [...category.querySelectorAll('a')]; + // const links = Array.from(category.querySelectorAll('a')); + // const de = links + // .map((link) => link.textContent) + // // .filter((text) => text.match(/de/)); + // .filter((text) => text.includes('de')); + // console.log(de); // 7. sort Exercise // Sort the people alphabetically by last name + const alpha = people.sort((a, b) => { + const [aLast, aFirst] = a.split(', '); + const [bLast, bFirst] = b.split(', '); + return aLast > bLast ? 1 : -1; + }); + console.log(alpha); + // this doesn't return the whole name: + // const lastNames = people.map((name) => name.split(',')[0]); + // console.log(lastNames.sort()); // 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 dataSum = data.reduce((acc, item) => { + if (!acc[item]) { + acc[item] = 0; + } + acc[item]++; + return acc; + }, {}); + console.log(dataSum); From 3058fd4d9408bd001f4b6fe6ab23e54b3bbc6a98 Mon Sep 17 00:00:00 2001 From: Rob Cataneo Date: Sun, 30 Jul 2017 14:59:57 -0700 Subject: [PATCH 5/7] Finished video 5 --- 05 - Flex Panel Gallery/index-START.html | 37 ++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/05 - Flex Panel Gallery/index-START.html b/05 - Flex Panel Gallery/index-START.html index e1d643ad5c..8413a072fc 100644 --- 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,11 @@ font-size: 20px; background-size:cover; background-position:center; + flex: 1; + justify-content: center; + align-items: center; + display: flex; + flex-direction: column; } @@ -54,6 +60,23 @@ 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 { @@ -68,6 +91,7 @@ .panel.open { font-size:40px; + flex: 5; } .cta { @@ -107,7 +131,20 @@ From cddd03538e602626adf758b78ef48515fb8360f3 Mon Sep 17 00:00:00 2001 From: Rob Cataneo Date: Sun, 30 Jul 2017 15:51:42 -0700 Subject: [PATCH 6/7] Finished video 6 --- 06 - Type Ahead/index-START.html | 40 ++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/06 - Type Ahead/index-START.html b/06 - Type Ahead/index-START.html index 1436886918..49e3e3a907 100644 --- a/06 - Type Ahead/index-START.html +++ b/06 - Type Ahead/index-START.html @@ -17,6 +17,46 @@ From 25a8ea52e6d9fe4e76c76cec6ae23f054fe20f3e Mon Sep 17 00:00:00 2001 From: Rob Cataneo Date: Thu, 3 Aug 2017 08:19:38 -0700 Subject: [PATCH 7/7] Finished video 8 --- 08 - Fun with HTML5 Canvas/index-START.html | 50 +++++++++++++++++++++ 1 file changed, 50 insertions(+) diff --git a/08 - Fun with HTML5 Canvas/index-START.html b/08 - Fun with HTML5 Canvas/index-START.html index 37c148df07..4e41a77018 100644 --- a/08 - Fun with HTML5 Canvas/index-START.html +++ b/08 - Fun with HTML5 Canvas/index-START.html @@ -7,6 +7,56 @@