From 6842573ca2045515edf8a6f268e1724566b32d59 Mon Sep 17 00:00:00 2001 From: Carlos Filoteo Date: Tue, 13 Dec 2016 19:05:06 -0700 Subject: [PATCH 01/11] Add solution for project 01. --- 01 - JavaScript Drum Kit/index-START.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html index 4070d32767..1b01f50f70 100644 --- a/01 - JavaScript Drum Kit/index-START.html +++ b/01 - JavaScript Drum Kit/index-START.html @@ -58,7 +58,24 @@ From 5e3c3afa74a5c6f37b976a1867fc5f08da089fe9 Mon Sep 17 00:00:00 2001 From: Carlos Filoteo Date: Tue, 13 Dec 2016 19:36:24 -0700 Subject: [PATCH 02/11] Add solution for project 02. --- 02 - JS + CSS Clock/index-START.html | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/02 - JS + CSS Clock/index-START.html b/02 - JS + CSS Clock/index-START.html index 2712384201..4f3ed019a4 100644 --- a/02 - JS + CSS Clock/index-START.html +++ b/02 - JS + CSS Clock/index-START.html @@ -61,13 +61,35 @@ background:black; position: absolute; top:50%; + transform-origin: 100%; + transform: rotate(90deg); + transition: all 0.05s; + transition-timing-function: cubic-bezier(0.42, 0, 0.25, 1.85); } - +function getRotation(timeValue, scale) { + return (timeValue / scale * 360) + 90 +} + +setInterval(setTime, 1000) + From 4e6a9aa3995b1960b0182c4956aa985a9ce77445 Mon Sep 17 00:00:00 2001 From: Carlos Filoteo Date: Tue, 13 Dec 2016 19:58:06 -0700 Subject: [PATCH 03/11] Add solution for project 03. --- 03 - CSS Variables/index-START.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/03 - CSS Variables/index-START.html b/03 - CSS Variables/index-START.html index 7171607a8b..d474124172 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 0c23aca3cac88a32dba92e4dffd040f3666b7a1c Mon Sep 17 00:00:00 2001 From: Carlos Filoteo Date: Thu, 15 Dec 2016 16:22:57 -0700 Subject: [PATCH 04/11] Add solution for project 04. --- 04 - Array Cardio Day 1/index-START.html | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/04 - Array Cardio Day 1/index-START.html b/04 - Array Cardio Day 1/index-START.html index 4162bce339..8e1e4af16f 100644 --- a/04 - Array Cardio Day 1/index-START.html +++ b/04 - Array Cardio Day 1/index-START.html @@ -33,17 +33,27 @@ // Array.prototype.filter() // 1. Filter the list of inventors for those who were born in the 1500's + const inventorsBorn1500 = inventors.filter(person => person.year >= 1500 && person.year < 1599) + // console.table(inventorsBorn1500) // Array.prototype.map() // 2. Give us an array of the inventors' first and last names + const fullNames = inventors.map(inventor => `${ inventor.first } ${ inventor.last }`) + // console.log(fullNames) // Array.prototype.sort() // 3. Sort the inventors by birthdate, oldest to youngest + const birthdaySort = inventors.sort((a, b) => a.year > b.year ? 1 : -1) + // console.table(birthdaySort) // Array.prototype.reduce() // 4. How many years did all the inventors live? + const totalYears = inventors.reduce((total, {year, passed}) => {return total + (passed - year)}, 0) + // console.log(totalYears) // 5. Sort the inventors by years lived + const sortByYearsLived = inventors.sort((a, b) => (a.passed - a.year) > (b.passed - b.year) ? -1 : 1) + // console.table(sortByYearsLived) // 6. create a list of Boulevards in Paris that contain 'de' anywhere in the name // https://en.wikipedia.org/wiki/Category:Boulevards_in_Paris @@ -51,11 +61,22 @@ // 7. sort Exercise // Sort the people alphabetically by last name + const alphaByLastName = people.sort((a, b) => { + const [aLast, ] = a.split(', '), + [bLast, ] = b.split(', ') + return aLast > bLast ? 1 : -1 + }) + // console.log(alphaByLastName) // 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 transportation = data.reduce((options, transport) => { + if(!options[transport]) options[transport] = 0 + options[transport]++ + return options + }, {}) + // console.log(transportation) From aa5d019b1706d953040070b6076dfbfa461ac5ef Mon Sep 17 00:00:00 2001 From: Carlos Filoteo Date: Tue, 20 Dec 2016 14:02:20 -0700 Subject: [PATCH 05/11] Add solution for project 05. --- 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..a01eb01840 100644 --- a/05 - Flex Panel Gallery/index-START.html +++ b/05 - Flex Panel Gallery/index-START.html @@ -22,6 +22,7 @@ } .panels { + display: flex; min-height:100vh; overflow: hidden; } @@ -30,6 +31,11 @@ background:#6B0F9C; box-shadow:inset 0 0 0 5px rgba(255,255,255,0.1); color:white; + flex: 1; + display: flex; + flex-direction: column; + justify-content: center; + align-items: center; text-align: center; align-items:center; /* Safari transitionend event.propertyName === flex */ @@ -54,6 +60,24 @@ 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 { @@ -67,6 +91,7 @@ } .panel.open { + flex: 5; font-size:40px; } @@ -107,7 +132,19 @@ From de0d2f769da4c27c0811e47dc952771992d69ef9 Mon Sep 17 00:00:00 2001 From: Carlos Filoteo Date: Tue, 20 Dec 2016 14:11:38 -0700 Subject: [PATCH 06/11] Modified solution to add keyboard accessibility. Js is no longer required. --- 05 - Flex Panel Gallery/index-START.html | 54 ++++++++++++------------ 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/05 - Flex Panel Gallery/index-START.html b/05 - Flex Panel Gallery/index-START.html index a01eb01840..b84da77b9c 100644 --- a/05 - Flex Panel Gallery/index-START.html +++ b/05 - Flex Panel Gallery/index-START.html @@ -7,6 +7,9 @@