From a69b1b9f876e39b28d9bfc3803999decec22ac3b Mon Sep 17 00:00:00 2001 From: hukuuu Date: Fri, 9 Dec 2016 16:11:53 +0200 Subject: [PATCH 1/7] first day --- 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..3f057a85c9 100644 --- a/01 - JavaScript Drum Kit/index-START.html +++ b/01 - JavaScript Drum Kit/index-START.html @@ -59,6 +59,23 @@ From 40f2608eb0ef0738b47c5918c3cdd0bd593e1a93 Mon Sep 17 00:00:00 2001 From: hukuuu Date: Sun, 11 Dec 2016 17:37:05 +0200 Subject: [PATCH 2/7] second day --- 02 - JS + CSS Clock/index-START.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/02 - JS + CSS Clock/index-START.html b/02 - JS + CSS Clock/index-START.html index 259280d228..4d1fd6ba8c 100644 --- a/02 - JS + CSS Clock/index-START.html +++ b/02 - JS + CSS Clock/index-START.html @@ -61,12 +61,33 @@ background:black; position: absolute; top:50%; + transform-origin: 100%; + transition: transform 0.1s cubic-bezier(1, -0.03, 0.51, 1.6); } From da67b212815dd9164dd8269b1ae7025d42659dcf Mon Sep 17 00:00:00 2001 From: hukuuu Date: Wed, 14 Dec 2016 18:20:12 +0200 Subject: [PATCH 3/7] third day --- 03 - CSS Variables/index-START.html | 147 +++++++++++++++++----------- 1 file changed, 88 insertions(+), 59 deletions(-) diff --git a/03 - CSS Variables/index-START.html b/03 - CSS Variables/index-START.html index bf0f33e3ba..51c3563060 100644 --- a/03 - CSS Variables/index-START.html +++ b/03 - CSS Variables/index-START.html @@ -1,59 +1,88 @@ - - - - - Scoped CSS Variables and JS - - -

Update CSS Variables with JS

- -
- - - - - - - - -
- - - - - - - - - + + + + + + Scoped CSS Variables and JS + + + +

Update CSS Variables with JS

+ +
+ + + + + + + + +
+ + + + + + + + + + From 6beae2beeefc8d7779932a1043f0047ee5a19ecb Mon Sep 17 00:00:00 2001 From: hukuuu Date: Thu, 15 Dec 2016 17:44:06 +0200 Subject: [PATCH 4/7] day four --- 04 - Array Cardio Day 1/index-START.html | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/04 - Array Cardio Day 1/index-START.html b/04 - Array Cardio Day 1/index-START.html index 089352c8a6..a65644352e 100644 --- a/04 - Array Cardio Day 1/index-START.html +++ b/04 - Array Cardio Day 1/index-START.html @@ -27,17 +27,34 @@ // Array.prototype.filter() // 1. Filter the list of inventors for those who were born in the 1500's + const filtered = inventors.filter( + inventor => + (inventor.year >= 1500 && inventor.year < 1600) || + (inventor.passed >= 1500 && inventor.passed < 1600) + ) + console.log('born in the 1500\'s', filtered); // Array.prototype.map() // 2. Give us an array of the inventory first and last names + console.log('first and last', inventors.map(inventor => inventor.first + ' ' + inventor.last)); + // Array.prototype.sort() // 3. Sort the inventors by birthdate, oldest to youngest + console.log('sorted by birthdate', inventors.sort( (a, b) => { + return b.year - a.year + } ).map(i=> i.first + " " + i.year)); // Array.prototype.reduce() // 4. How many years did all the inventors live? + console.log('lived ', inventors.reduce((acc, inv) => { + return acc + inv.passed - inv.year + }, 0)) // 5. Sort the inventors by years lived + console.log('sorted by years lived', inventors.sort( (a, b) => { + return (b.passed - b.year) - (a.passed - a.year) + } ).map(i=> i.first + " " + (i.passed - i.year))); // 6. create a list of Boulevards in Paris that contain 'de' anywhere in the name // https://en.wikipedia.org/wiki/Category:Boulevards_in_Paris @@ -50,6 +67,11 @@ // Sum up the instances of each of these const data = ['car', 'car', 'truck', 'truck', 'bike', 'walk', 'car', 'van', 'bike', 'walk', 'car', 'van', 'car', 'truck' ]; + console.log(data.reduce((acc, current) => { + acc[current] = acc[current] ? acc[current] + 1 : 1 + return acc + }, {})); + From 762c421cfc7362b17f9b5ad59c648b2eb67cc827 Mon Sep 17 00:00:00 2001 From: hukuuu Date: Sat, 17 Dec 2016 16:56:03 +0200 Subject: [PATCH 5/7] day five --- 05 - Flex Panel Gallery/index-START.html | 41 ++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/05 - Flex Panel Gallery/index-START.html b/05 - Flex Panel Gallery/index-START.html index e1d643ad5c..11fc589c2d 100644 --- a/05 - Flex Panel Gallery/index-START.html +++ b/05 - Flex Panel Gallery/index-START.html @@ -24,9 +24,13 @@ .panels { min-height:100vh; overflow: hidden; + display: flex; } .panel { + display: flex; + flex-direction: column; + flex-grow: 1; background:#6B0F9C; box-shadow:inset 0 0 0 5px rgba(255,255,255,0.1); color:white; @@ -51,9 +55,14 @@ .panel5 { background-image:url(https://source.unsplash.com/3MNzGlQM7qs/1500x1500); } .panel > * { + display: flex; + align-items: center; + justify-content: center; + flex: 1 0 auto; margin:0; width: 100%; transition:transform 0.5s; + } .panel p { @@ -66,7 +75,24 @@ font-size: 4em; } + .panel p:first-child { + transform: translateY(-100%) + } + + .panel p:last-child { + transform: translateY(100%) + } + + .panel.open-active p:first-child { + transform: translateY(0) + } + + .panel.open-active p:last-child { + transform: translateY(0) + } + .panel.open { + flex-grow: 5; font-size:40px; } @@ -108,6 +134,21 @@ From a48f65b5dd70f965390fede446d8d18af42836cf Mon Sep 17 00:00:00 2001 From: hukuuu Date: Fri, 23 Dec 2016 14:20:49 +0200 Subject: [PATCH 6/7] day four??? --- 04 - Array Cardio Day 1/index-START.html | 1 + 1 file changed, 1 insertion(+) diff --git a/04 - Array Cardio Day 1/index-START.html b/04 - Array Cardio Day 1/index-START.html index a65644352e..eaebb6cd3d 100644 --- a/04 - Array Cardio Day 1/index-START.html +++ b/04 - Array Cardio Day 1/index-START.html @@ -51,6 +51,7 @@ return acc + inv.passed - inv.year }, 0)) + // 5. Sort the inventors by years lived console.log('sorted by years lived', inventors.sort( (a, b) => { return (b.passed - b.year) - (a.passed - a.year) From 7dc3353cf9e0bf17dcf4606e84c409e6a86d1d77 Mon Sep 17 00:00:00 2001 From: hukuuu Date: Fri, 23 Dec 2016 14:20:55 +0200 Subject: [PATCH 7/7] day six --- 06 - Type Ahead/index-START.html | 87 ++++++++++++++++++++++++-------- 1 file changed, 65 insertions(+), 22 deletions(-) diff --git a/06 - Type Ahead/index-START.html b/06 - Type Ahead/index-START.html index 1436886918..3967d1cc43 100644 --- a/06 - Type Ahead/index-START.html +++ b/06 - Type Ahead/index-START.html @@ -1,22 +1,65 @@ - - - - - Type Ahead 👀 - - - - -
- -
    -
  • Filter for a city
  • -
  • or a state
  • -
-
- - - + + + + + + Type Ahead 👀 + + + + + +
+ +
    +
  • Filter for a city
  • +
  • or a state
  • +
+
+ + + +