diff --git a/01 - JavaScript Drum Kit/.vscode/settings.json b/01 - JavaScript Drum Kit/.vscode/settings.json new file mode 100644 index 0000000000..6b665aaa0c --- /dev/null +++ b/01 - JavaScript Drum Kit/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html index 8a2f8e8417..dba19368d0 100644 --- a/01 - JavaScript Drum Kit/index-START.html +++ b/01 - JavaScript Drum Kit/index-START.html @@ -59,7 +59,25 @@ diff --git a/02 - JS and CSS Clock/.vscode/settings.json b/02 - JS and CSS Clock/.vscode/settings.json new file mode 100644 index 0000000000..6b665aaa0c --- /dev/null +++ b/02 - JS and CSS Clock/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} diff --git a/02 - JS and CSS Clock/index-START.html b/02 - JS and CSS Clock/index-START.html index 55ab1a5331..0f64bbc1a3 100644 --- a/02 - JS and CSS Clock/index-START.html +++ b/02 - JS and CSS Clock/index-START.html @@ -63,13 +63,39 @@ background: black; position: absolute; top: 50%; + transform-origin: 100%; + transform: rotate(90deg); + transition: all 0.05s; + transition-timing-function: cubic-bezier(0.1, 2.7, 0.58, 1); + } diff --git a/03 - CSS Variables/.vscode/settings.json b/03 - CSS Variables/.vscode/settings.json new file mode 100644 index 0000000000..6b665aaa0c --- /dev/null +++ b/03 - CSS Variables/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} diff --git a/03 - CSS Variables/index-START.html b/03 - CSS Variables/index-START.html index d5fcc3a2ae..866948137c 100644 --- a/03 - CSS Variables/index-START.html +++ b/03 - CSS Variables/index-START.html @@ -19,9 +19,24 @@

Update CSS Variables with JS

- + + diff --git a/04 - Array Cardio Day 1/.vscode/settings.json b/04 - Array Cardio Day 1/.vscode/settings.json new file mode 100644 index 0000000000..6b665aaa0c --- /dev/null +++ b/04 - Array Cardio Day 1/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} diff --git a/04 - Array Cardio Day 1/index-START.html b/04 - Array Cardio Day 1/index-START.html index 0dcfd00f40..003d233e0d 100644 --- a/04 - Array Cardio Day 1/index-START.html +++ b/04 - Array Cardio Day 1/index-START.html @@ -35,31 +35,89 @@ 'Berne, Eric', 'Berra, Yogi', 'Berry, Wendell', 'Bevan, Aneurin', 'Ben-Gurion, David', 'Bevel, Ken', 'Biden, Joseph', 'Bennington, Chester', 'Bierce, Ambrose', 'Billings, Josh', 'Birrell, Augustine', 'Blair, Tony', 'Beecher, Henry', 'Biondo, Frank' ]; - + // Array.prototype.filter() // 1. Filter the list of inventors for those who were born in the 1500's + const fifteen = inventors.filter(function(inventor) { + if(inventor.year >= 1500 && inventor.year <= 1599){ + return true; + } else { + return false; + } + + }); + + console.table(fifteen); + // 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 ordered = inventors.sort(function(a, b) { + if(a.year > b.year) { + return 1; + } else { + return -1 + } + }) + console.table(ordered); // Array.prototype.reduce() // 4. How many years did all the inventors live all together? + const totalYears = inventors.reduce((total, inventor) => { + return total + (inventor.passed - inventor.year); + }, 0); + // 5. Sort the inventors by years lived + const yearsLived = inventors.sort(function(a, b) { + const lastGuy = a.passed - a.year; + const nextGuy = b.passed - b.year; + if(lastGuy > nextGuy) { + return -1; + } else { + return 1; + } + }) + + console.table(yearsLived); + // 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(streeName => streetName.includes('de')); // 7. sort Exercise // Sort the people alphabetically by last name + const alpha = people.sort(function(lastOne, nextOne) { + const [aLast, aFirst] = lastOne.split(', '); + const [bLast, bFirst] = nextOne.split(', '); + return aLast > bLast ? 1 : -1; + }); + // 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(function (obj, item){ + if (!obj[item]) { + obj[item] = 0; + } + obj[item]++; + return obj; + }, {}); + + console.log(transportation); diff --git a/05 - Flex Panel Gallery/.vscode/settings.json b/05 - Flex Panel Gallery/.vscode/settings.json new file mode 100644 index 0000000000..6b665aaa0c --- /dev/null +++ b/05 - Flex Panel Gallery/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} diff --git a/05 - Flex Panel Gallery/index-START.html b/05 - Flex Panel Gallery/index-START.html index 88a4f1d1e2..a0eb6063f4 100644 --- a/05 - Flex Panel Gallery/index-START.html +++ b/05 - Flex Panel Gallery/index-START.html @@ -27,6 +27,7 @@ .panels { min-height: 100vh; overflow: hidden; + display:flex; } .panel { @@ -44,21 +45,35 @@ font-size: 20px; background-size: cover; background-position: center; + flex: 1; + justify-content: center; + align-items: center; + display: flex; + flex-direction: column; } - .panel1 { background-image:url(https://source.unsplash.com/gYl-UtwNg_I/1500x1500); } - .panel2 { background-image:url(https://source.unsplash.com/rFKUFzjPYiQ/1500x1500); } + .panel1 { background-image:url(https://plus.unsplash.com/premium_photo-1676496046182-356a6a0ed002?q=80&w=2952&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D); } + .panel2 { background-image:url(https://images.unsplash.com/photo-1494500764479-0c8f2919a3d8?q=80&w=2940&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D); } .panel3 { background-image:url(https://images.unsplash.com/photo-1465188162913-8fb5709d6d57?ixlib=rb-0.3.5&q=80&fm=jpg&crop=faces&cs=tinysrgb&w=1500&h=1500&fit=crop&s=967e8a713a4e395260793fc8c802901d); } - .panel4 { background-image:url(https://source.unsplash.com/ITjiVXcwVng/1500x1500); } - .panel5 { background-image:url(https://source.unsplash.com/3MNzGlQM7qs/1500x1500); } + .panel4 { background-image:url(https://images.unsplash.com/photo-1501785888041-af3ef285b470?q=80&w=2940&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D); } + .panel5 { background-image:url(https://images.unsplash.com/photo-1532274402911-5a369e4c4bb5?q=80&w=2940&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D); } /* Flex Children */ .panel > * { 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: translate(0); } + .panel > *:last-child { transform: translateY(+100%); } + .panel.open-active > *:last-child { transform: translate(0); } + .panel p { text-transform: uppercase; font-family: 'Amatic SC', cursive; @@ -72,6 +87,7 @@ .panel.open { font-size: 40px; + flex: 5; } @@ -107,6 +123,23 @@ diff --git a/06 - Type Ahead/.vscode/settings.json b/06 - Type Ahead/.vscode/settings.json new file mode 100644 index 0000000000..6b665aaa0c --- /dev/null +++ b/06 - Type Ahead/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} diff --git a/06 - Type Ahead/index-START.html b/06 - Type Ahead/index-START.html index 5a9aa7e4e8..b11786cee7 100644 --- a/06 - Type Ahead/index-START.html +++ b/06 - Type Ahead/index-START.html @@ -4,7 +4,7 @@ Type Ahead ๐Ÿ‘€ - + @@ -18,6 +18,45 @@ - + diff --git a/07 - Array Cardio Day 2/.vscode/settings.json b/07 - Array Cardio Day 2/.vscode/settings.json new file mode 100644 index 0000000000..6b665aaa0c --- /dev/null +++ b/07 - Array Cardio Day 2/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} diff --git a/07 - Array Cardio Day 2/index-START.html b/07 - Array Cardio Day 2/index-START.html index 4ca34c7536..dd6f88d525 100644 --- a/07 - Array Cardio Day 2/index-START.html +++ b/07 - Array Cardio Day 2/index-START.html @@ -27,6 +27,7 @@ // Some and Every Checks // Array.prototype.some() // is at least one person 19 or older? + // Array.prototype.every() // is everyone 19 or older? // Array.prototype.find() diff --git a/08 - Fun with HTML5 Canvas/.vscode/settings.json b/08 - Fun with HTML5 Canvas/.vscode/settings.json new file mode 100644 index 0000000000..6b665aaa0c --- /dev/null +++ b/08 - Fun with HTML5 Canvas/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} diff --git a/08 - Fun with HTML5 Canvas/index-START.html b/08 - Fun with HTML5 Canvas/index-START.html index f70ad2059b..9845ff0bbb 100644 --- a/08 - Fun with HTML5 Canvas/index-START.html +++ b/08 - Fun with HTML5 Canvas/index-START.html @@ -8,6 +8,54 @@