From 09d0be4edbe93cad349fc96fef9b7e9e7a54b136 Mon Sep 17 00:00:00 2001 From: Sean Hoar Dev Date: Tue, 13 Dec 2016 07:37:13 -0500 Subject: [PATCH 1/9] Complete JS Drum Kit --- 01 - JavaScript Drum Kit/index-START.html | 18 ++++++++++++++++++ 01 - JavaScript Drum Kit/layout.html | 9 +++++++++ 2 files changed, 27 insertions(+) create mode 100644 01 - JavaScript Drum Kit/layout.html diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html index 4070d32767..73c400eefd 100644 --- a/01 - JavaScript Drum Kit/index-START.html +++ b/01 - JavaScript Drum Kit/index-START.html @@ -58,7 +58,25 @@ diff --git a/01 - JavaScript Drum Kit/layout.html b/01 - JavaScript Drum Kit/layout.html new file mode 100644 index 0000000000..497a0c2dea --- /dev/null +++ b/01 - JavaScript Drum Kit/layout.html @@ -0,0 +1,9 @@ + +
+ + js drum kit +
+ + + + From 83315bd0477b4d302d84c2a95f6fcfa74358c237 Mon Sep 17 00:00:00 2001 From: Sean Hoar Date: Wed, 14 Dec 2016 08:39:19 -0500 Subject: [PATCH 2/9] Complete js clock; change second hand red & hour hand to shorter width --- 02 - JS + CSS Clock/index-START.html | 40 +++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/02 - JS + CSS Clock/index-START.html b/02 - JS + CSS Clock/index-START.html index 2712384201..3e81892a77 100644 --- a/02 - JS + CSS Clock/index-START.html +++ b/02 - JS + CSS Clock/index-START.html @@ -39,7 +39,7 @@ border:20px solid white; border-radius:50%; margin:50px auto; - position: relative; + position: absolute; padding:2rem; box-shadow: 0 0 0 4px rgba(0,0,0,0.1), @@ -61,12 +61,50 @@ background:black; position: absolute; top:50%; + transform-origin: 100%; + transform:rotate(90deg); + transition: all 0.05s; + transition-timing-function:ease-in-out; } + .second-hand + { + width:50%; + height:3px; + background: red; + } + .min-hand { + width: 50%; + transform-origin: 100%; + } + .hour-hand{ + width: 40%; + margin-left: 30px + } From 395e13e35be0311566f8c5948a38735f94ec9969 Mon Sep 17 00:00:00 2001 From: Sean Hoar Date: Wed, 14 Dec 2016 08:41:11 -0500 Subject: [PATCH 3/9] Modify clock-face to position:relative --- 02 - JS + CSS Clock/index-START.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/02 - JS + CSS Clock/index-START.html b/02 - JS + CSS Clock/index-START.html index 3e81892a77..e766db3aa9 100644 --- a/02 - JS + CSS Clock/index-START.html +++ b/02 - JS + CSS Clock/index-START.html @@ -39,7 +39,7 @@ border:20px solid white; border-radius:50%; margin:50px auto; - position: absolute; + position: relative; padding:2rem; box-shadow: 0 0 0 4px rgba(0,0,0,0.1), From 834defabb6477d287127c459002f99d32147443f Mon Sep 17 00:00:00 2001 From: Sean Hoar Date: Fri, 16 Dec 2016 08:12:07 -0500 Subject: [PATCH 4/9] Completed changes to index-START.html for day 03 --- 03 - CSS Variables/index-START.html | 31 +++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/03 - CSS Variables/index-START.html b/03 - CSS Variables/index-START.html index 7171607a8b..554b817542 100644 --- a/03 - CSS Variables/index-START.html +++ b/03 - CSS Variables/index-START.html @@ -5,14 +5,14 @@ Scoped CSS Variables and JS -

Update CSS Variables with JS

+

Update CSS Variables with JS

- + @@ -22,6 +22,21 @@

Update CSS Variables with JS

From 162ad04ff5469bc5fea7f7f60e343152e835b269 Mon Sep 17 00:00:00 2001 From: Sean Hoar Date: Mon, 19 Dec 2016 23:44:12 -0500 Subject: [PATCH 5/9] Submit day 04 and day 05 --- 04 - Array Cardio Day 1/index-START.html | 38 +++++++++++++++++++----- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/04 - Array Cardio Day 1/index-START.html b/04 - Array Cardio Day 1/index-START.html index 4162bce339..1fadf3b089 100644 --- a/04 - Array Cardio Day 1/index-START.html +++ b/04 - Array Cardio Day 1/index-START.html @@ -29,33 +29,55 @@ const flavours = ['Chocolate Chip', 'Kulfi', 'Caramel Praline', 'Chocolate', 'Burnt Caramel', 'Pistachio', 'Rose', 'Sweet Coconut', 'Lemon Cookie', 'Toffeeness', 'Toasted Almond', 'Black Raspberry Crunch', 'Chocolate Brownies', 'Pistachio Almond', 'Strawberry', 'Lavender Honey', 'Lychee', 'Peach', 'Black Walnut', 'Birthday Cake', 'Mexican Chocolate', 'Mocha Almond Fudge', 'Raspberry']; - const people = ['Beck, Glenn', 'Becker, Carl', 'Beckett, Samuel', 'Beddoes, Mick', 'Beecher, Henry', 'Beethoven, Ludwig', 'Begin, Menachem', 'Belloc, Hilaire', 'Bellow, Saul', 'Benchley, Robert', 'Benenson, Peter', 'Ben-Gurion, David', 'Benjamin, Walter', 'Benn, Tony', 'Bennington, Chester', 'Benson, Leana', 'Bent, Silas', 'Bentsen, Lloyd', 'Berger, Ric', 'Bergman, Ingmar', 'Berio, Luciano', 'Berle, Milton', 'Berlin, Irving', 'Berne, Eric', 'Bernhard, Sandra', 'Berra, Yogi', 'Berry, Halle', 'Berry, Wendell', 'Bethea, Erin', 'Bevan, Aneurin', 'Bevel, Ken', 'Biden, Joseph', 'Bierce, Ambrose', 'Biko, Steve', 'Billings, Josh', 'Biondo, Frank', 'Birrell, Augustine', 'Black Elk', 'Blair, Robert', 'Blair, Tony', 'Blake, William']; +// // Array.prototype.filter() // 1. Filter the list of inventors for those who were born in the 1500's + const fifteen = inventors.filter(inventor => inventor.year >= 1500 && inventor.year <=1599); + console.table(fifteen); // Array.prototype.map() // 2. Give us an array of the inventors' first and last names - + const justNames = inventors.map(inventor => `${inventor.first} ${inventor.last}`); + console.log(justNames); // Array.prototype.sort() // 3. Sort the inventors by birthdate, oldest to youngest - + const alphabeticInventors = inventors.sort((a,b) => a.year > b.year ? 1 : -1); + console.table(alphabeticInventors); // Array.prototype.reduce() // 4. How many years did all the inventors live? - + const ages = inventors.reduce((total, inventor) =>{ + return total + (inventor.passed - inventor.year); + },0); + console.log(ages); // 5. Sort the inventors by years lived - + const ageIndex = inventors.sort((a,b) => (a.passed - a.year) > (b.passed - b.year) ? a : b ); + console.table(ageIndex); // 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')); + // const de = links.map(link => link.textContent).filter(streetName => streetName.includes('de')); // 7. sort Exercise // Sort the people alphabetically by last name + // const lastNames = people.sort(function(lastguy,nextguy){ + // const [alast,bfirst] = lastguy.split(','); + // const [blast,bfirst] = nextguy.split(','); + // return alast > blast ? 1 : -1; + // }); + // console.log(alast,first); // 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 sums = data.reduce(function (obj, item){ + if (!obj[item]){ + obj [item] = 0; + } + obj[item]++; + return obj; + }, {}); + console.log(sums); From 2a30126f16099b10d6fb3a138d528655e6944718 Mon Sep 17 00:00:00 2001 From: Sean Hoar Date: Tue, 20 Dec 2016 06:19:35 -0500 Subject: [PATCH 6/9] completed Flex Panel Gallery and Array Cardio Day 1 --- 05 - Flex Panel Gallery/index-START.html | 32 ++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/05 - Flex Panel Gallery/index-START.html b/05 - Flex Panel Gallery/index-START.html index e1d643ad5c..ebf7d068d5 100644 --- a/05 - Flex Panel Gallery/index-START.html +++ b/05 - Flex Panel Gallery/index-START.html @@ -3,7 +3,7 @@ Flex Panels 💪 - +