From ee9613f5f09234dbeae08a2e73986a0e983088b7 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Wed, 8 Feb 2017 11:57:51 -0700 Subject: [PATCH 01/73] Remove solutions and rename index-START to index --- 01 - JavaScript Drum Kit/index-FINISHED.html | 83 ------ .../{index-START.html => index.html} | 0 02 - JS and CSS Clock/index-FINISHED.html | 98 ------- .../{index-START.html => index.html} | 0 03 - CSS Variables/index-FINISHED.html | 79 ------ .../{index-START.html => index.html} | 0 04 - Array Cardio Day 1/index-FINISHED.html | 106 -------- .../{index-START.html => index.html} | 0 05 - Flex Panel Gallery/index-FINISHED.html | 145 ----------- .../{index-START.html => index.html} | 0 06 - Type Ahead/index-FINISHED.html | 61 ----- .../{index-START.html => index.html} | 0 07 - Array Cardio Day 2/index-FINISHED.html | 68 ----- .../{index-START.html => index.html} | 0 .../index-FINISHED.html | 73 ------ .../{index-START.html => index.html} | 0 09 - Dev Tools Domination/index-FINISHED.html | 89 ------- .../{index-START.html => index.html} | 0 .../index-FINISHED.html | 137 ---------- .../{index-START.html => index.html} | 0 11 - Custom Video Player/scripts-FINISHED.js | 55 ---- .../index-FINISHED.html | 25 -- .../{index-START.html => index.html} | 0 13 - Slide in on Scroll/index-FINISHED.html | 140 ---------- .../{index-START.html => index.html} | 0 .../index-FINISHED.html | 99 ------- .../{index-START.html => index.html} | 0 15 - LocalStorage/index-FINISHED.html | 77 ------ .../{index-START.html => index.html} | 0 16 - Mouse Move Shadow/index-finished.html | 63 ----- .../{index-start.html => index.html} | 0 .../index-FINISHED.html | 64 ----- .../{index-START.html => index.html} | 0 .../index-FINISHED.html | 207 --------------- .../{index-START.html => index.html} | 0 19 - Webcam Fun/scripts-FINISHED.js | 102 -------- 20 - Speech Detection/index-FINISHED.html | 85 ------ .../{index-START.html => index.html} | 0 21 - Geolocation/index-FINISHED.html | 72 ----- .../{index-START.html => index.html} | 0 .../index-FINISHED.html | 55 ---- .../{index-START.html => index.html} | 0 23 - Speech Synthesis/index-FINISHED.html | 75 ------ .../{index-START.html => index.html} | 0 24 - Sticky Nav/index-FINISHED.html | 67 ----- .../{index-START.html => index.html} | 0 24 - Sticky Nav/style-FINISHED.css | 100 ------- .../{style-START.css => style.css} | 0 .../index-FINISHED.html | 64 ----- .../{index-START.html => index.html} | 0 .../index-FINISHED.html | 246 ------------------ .../{index-START.html => index.html} | 0 27 - Click and Drag/index-FINISHED.html | 71 ----- .../{index-START.html => index.html} | 0 .../index-FINISHED.html | 38 --- .../{index-START.html => index.html} | 0 29 - Countdown Timer/scripts-FINISHED.js | 55 ---- .../{scripts-START.js => scripts.js} | 0 30 - Whack A Mole/index-FINISHED.html | 87 ------- .../{index-START.html => index.html} | 0 60 files changed, 2786 deletions(-) delete mode 100644 01 - JavaScript Drum Kit/index-FINISHED.html rename 01 - JavaScript Drum Kit/{index-START.html => index.html} (100%) delete mode 100644 02 - JS and CSS Clock/index-FINISHED.html rename 02 - JS and CSS Clock/{index-START.html => index.html} (100%) delete mode 100644 03 - CSS Variables/index-FINISHED.html rename 03 - CSS Variables/{index-START.html => index.html} (100%) delete mode 100644 04 - Array Cardio Day 1/index-FINISHED.html rename 04 - Array Cardio Day 1/{index-START.html => index.html} (100%) delete mode 100644 05 - Flex Panel Gallery/index-FINISHED.html rename 05 - Flex Panel Gallery/{index-START.html => index.html} (100%) delete mode 100644 06 - Type Ahead/index-FINISHED.html rename 06 - Type Ahead/{index-START.html => index.html} (100%) delete mode 100644 07 - Array Cardio Day 2/index-FINISHED.html rename 07 - Array Cardio Day 2/{index-START.html => index.html} (100%) delete mode 100644 08 - Fun with HTML5 Canvas/index-FINISHED.html rename 08 - Fun with HTML5 Canvas/{index-START.html => index.html} (100%) delete mode 100644 09 - Dev Tools Domination/index-FINISHED.html rename 09 - Dev Tools Domination/{index-START.html => index.html} (100%) delete mode 100644 10 - Hold Shift and Check Checkboxes/index-FINISHED.html rename 10 - Hold Shift and Check Checkboxes/{index-START.html => index.html} (100%) delete mode 100644 11 - Custom Video Player/scripts-FINISHED.js delete mode 100644 12 - Key Sequence Detection/index-FINISHED.html rename 12 - Key Sequence Detection/{index-START.html => index.html} (100%) delete mode 100644 13 - Slide in on Scroll/index-FINISHED.html rename 13 - Slide in on Scroll/{index-START.html => index.html} (100%) delete mode 100644 14 - JavaScript References VS Copying/index-FINISHED.html rename 14 - JavaScript References VS Copying/{index-START.html => index.html} (100%) delete mode 100644 15 - LocalStorage/index-FINISHED.html rename 15 - LocalStorage/{index-START.html => index.html} (100%) delete mode 100644 16 - Mouse Move Shadow/index-finished.html rename 16 - Mouse Move Shadow/{index-start.html => index.html} (100%) delete mode 100644 17 - Sort Without Articles/index-FINISHED.html rename 17 - Sort Without Articles/{index-START.html => index.html} (100%) delete mode 100644 18 - Adding Up Times with Reduce/index-FINISHED.html rename 18 - Adding Up Times with Reduce/{index-START.html => index.html} (100%) delete mode 100755 19 - Webcam Fun/scripts-FINISHED.js delete mode 100644 20 - Speech Detection/index-FINISHED.html rename 20 - Speech Detection/{index-START.html => index.html} (100%) delete mode 100644 21 - Geolocation/index-FINISHED.html rename 21 - Geolocation/{index-START.html => index.html} (100%) delete mode 100644 22 - Follow Along Link Highlighter/index-FINISHED.html rename 22 - Follow Along Link Highlighter/{index-START.html => index.html} (100%) delete mode 100644 23 - Speech Synthesis/index-FINISHED.html rename 23 - Speech Synthesis/{index-START.html => index.html} (100%) delete mode 100644 24 - Sticky Nav/index-FINISHED.html rename 24 - Sticky Nav/{index-START.html => index.html} (100%) delete mode 100644 24 - Sticky Nav/style-FINISHED.css rename 24 - Sticky Nav/{style-START.css => style.css} (100%) delete mode 100644 25 - Event Capture, Propagation, Bubbling and Once/index-FINISHED.html rename 25 - Event Capture, Propagation, Bubbling and Once/{index-START.html => index.html} (100%) delete mode 100644 26 - Stripe Follow Along Nav/index-FINISHED.html rename 26 - Stripe Follow Along Nav/{index-START.html => index.html} (100%) delete mode 100644 27 - Click and Drag/index-FINISHED.html rename 27 - Click and Drag/{index-START.html => index.html} (100%) delete mode 100644 28 - Video Speed Controller/index-FINISHED.html rename 28 - Video Speed Controller/{index-START.html => index.html} (100%) delete mode 100644 29 - Countdown Timer/scripts-FINISHED.js rename 29 - Countdown Timer/{scripts-START.js => scripts.js} (100%) delete mode 100644 30 - Whack A Mole/index-FINISHED.html rename 30 - Whack A Mole/{index-START.html => index.html} (100%) diff --git a/01 - JavaScript Drum Kit/index-FINISHED.html b/01 - JavaScript Drum Kit/index-FINISHED.html deleted file mode 100644 index 1a16d0997c..0000000000 --- a/01 - JavaScript Drum Kit/index-FINISHED.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - JS Drum Kit - - - - - -
-
- A - clap -
-
- S - hihat -
-
- D - kick -
-
- F - openhat -
-
- G - boom -
-
- H - ride -
-
- J - snare -
-
- K - tom -
-
- L - tink -
-
- - - - - - - - - - - - - - - - diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index.html similarity index 100% rename from 01 - JavaScript Drum Kit/index-START.html rename to 01 - JavaScript Drum Kit/index.html diff --git a/02 - JS and CSS Clock/index-FINISHED.html b/02 - JS and CSS Clock/index-FINISHED.html deleted file mode 100644 index ac30c1ef0e..0000000000 --- a/02 - JS and CSS Clock/index-FINISHED.html +++ /dev/null @@ -1,98 +0,0 @@ - - - - - JS + CSS Clock - - - - -
-
-
-
-
-
-
- - - - - - - diff --git a/02 - JS and CSS Clock/index-START.html b/02 - JS and CSS Clock/index.html similarity index 100% rename from 02 - JS and CSS Clock/index-START.html rename to 02 - JS and CSS Clock/index.html diff --git a/03 - CSS Variables/index-FINISHED.html b/03 - CSS Variables/index-FINISHED.html deleted file mode 100644 index 848a0f95f9..0000000000 --- a/03 - CSS Variables/index-FINISHED.html +++ /dev/null @@ -1,79 +0,0 @@ - - - - - Scoped CSS Variables and JS - - -

Update CSS Variables with JS

- -
- - - - - - - - -
- - - - - - - - - - diff --git a/03 - CSS Variables/index-START.html b/03 - CSS Variables/index.html similarity index 100% rename from 03 - CSS Variables/index-START.html rename to 03 - CSS Variables/index.html diff --git a/04 - Array Cardio Day 1/index-FINISHED.html b/04 - Array Cardio Day 1/index-FINISHED.html deleted file mode 100644 index ede883f1f9..0000000000 --- a/04 - Array Cardio Day 1/index-FINISHED.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - Array Cardio 💪 - - -

Psst: have a look at the JavaScript Console 💁

- - - diff --git a/04 - Array Cardio Day 1/index-START.html b/04 - Array Cardio Day 1/index.html similarity index 100% rename from 04 - Array Cardio Day 1/index-START.html rename to 04 - Array Cardio Day 1/index.html diff --git a/05 - Flex Panel Gallery/index-FINISHED.html b/05 - Flex Panel Gallery/index-FINISHED.html deleted file mode 100644 index 243f8a221d..0000000000 --- a/05 - Flex Panel Gallery/index-FINISHED.html +++ /dev/null @@ -1,145 +0,0 @@ - - - - - Flex Panels 💪 - - - - - - -
-
-

Hey

-

Let's

-

Dance

-
-
-

Give

-

Take

-

Receive

-
-
-

Experience

-

It

-

Today

-
-
-

Give

-

All

-

You can

-
-
-

Life

-

In

-

Motion

-
-
- - - - - diff --git a/05 - Flex Panel Gallery/index-START.html b/05 - Flex Panel Gallery/index.html similarity index 100% rename from 05 - Flex Panel Gallery/index-START.html rename to 05 - Flex Panel Gallery/index.html diff --git a/06 - Type Ahead/index-FINISHED.html b/06 - Type Ahead/index-FINISHED.html deleted file mode 100644 index 5902b43936..0000000000 --- a/06 - Type Ahead/index-FINISHED.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - - Type Ahead 👀 - - - - -
- - -
- - - diff --git a/06 - Type Ahead/index-START.html b/06 - Type Ahead/index.html similarity index 100% rename from 06 - Type Ahead/index-START.html rename to 06 - Type Ahead/index.html diff --git a/07 - Array Cardio Day 2/index-FINISHED.html b/07 - Array Cardio Day 2/index-FINISHED.html deleted file mode 100644 index c8e5b25d3b..0000000000 --- a/07 - Array Cardio Day 2/index-FINISHED.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - Array Cardio 💪💪 - - -

Psst: have a look at the JavaScript Console 💁

- - - diff --git a/07 - Array Cardio Day 2/index-START.html b/07 - Array Cardio Day 2/index.html similarity index 100% rename from 07 - Array Cardio Day 2/index-START.html rename to 07 - Array Cardio Day 2/index.html diff --git a/08 - Fun with HTML5 Canvas/index-FINISHED.html b/08 - Fun with HTML5 Canvas/index-FINISHED.html deleted file mode 100644 index 0791e17d0d..0000000000 --- a/08 - Fun with HTML5 Canvas/index-FINISHED.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - - HTML5 Canvas - - - - - - - - - diff --git a/08 - Fun with HTML5 Canvas/index-START.html b/08 - Fun with HTML5 Canvas/index.html similarity index 100% rename from 08 - Fun with HTML5 Canvas/index-START.html rename to 08 - Fun with HTML5 Canvas/index.html diff --git a/09 - Dev Tools Domination/index-FINISHED.html b/09 - Dev Tools Domination/index-FINISHED.html deleted file mode 100644 index 55cd3a2f42..0000000000 --- a/09 - Dev Tools Domination/index-FINISHED.html +++ /dev/null @@ -1,89 +0,0 @@ - - - - - Console Tricks! - - - -

×BREAK×DOWN×

- - - - diff --git a/09 - Dev Tools Domination/index-START.html b/09 - Dev Tools Domination/index.html similarity index 100% rename from 09 - Dev Tools Domination/index-START.html rename to 09 - Dev Tools Domination/index.html diff --git a/10 - Hold Shift and Check Checkboxes/index-FINISHED.html b/10 - Hold Shift and Check Checkboxes/index-FINISHED.html deleted file mode 100644 index 2b5d39a52c..0000000000 --- a/10 - Hold Shift and Check Checkboxes/index-FINISHED.html +++ /dev/null @@ -1,137 +0,0 @@ - - - - - Hold Shift to Check Multiple Checkboxes - - - - -
-
- -

This is an inbox layout.

-
-
- -

Check one item

-
-
- -

Hold down your Shift key

-
-
- -

Check a lower item

-
-
- -

Everything inbetween should also be set to checked

-
-
- -

Try do it with out any libraries

-
-
- -

Just regular JavaScript

-
-
- -

Good Luck!

-
-
- -

Don't forget to tweet your result!

-
-
- - - - diff --git a/10 - Hold Shift and Check Checkboxes/index-START.html b/10 - Hold Shift and Check Checkboxes/index.html similarity index 100% rename from 10 - Hold Shift and Check Checkboxes/index-START.html rename to 10 - Hold Shift and Check Checkboxes/index.html diff --git a/11 - Custom Video Player/scripts-FINISHED.js b/11 - Custom Video Player/scripts-FINISHED.js deleted file mode 100644 index cedacf2f68..0000000000 --- a/11 - Custom Video Player/scripts-FINISHED.js +++ /dev/null @@ -1,55 +0,0 @@ -/* Get Our Elements */ -const player = document.querySelector('.player'); -const video = player.querySelector('.viewer'); -const progress = player.querySelector('.progress'); -const progressBar = player.querySelector('.progress__filled'); -const toggle = player.querySelector('.toggle'); -const skipButtons = player.querySelectorAll('[data-skip]'); -const ranges = player.querySelectorAll('.player__slider'); - -/* Build out functions */ -function togglePlay() { - const method = video.paused ? 'play' : 'pause'; - video[method](); -} - -function updateButton() { - const icon = this.paused ? '►' : '❚ ❚'; - console.log(icon); - toggle.textContent = icon; -} - -function skip() { - video.currentTime += parseFloat(this.dataset.skip); -} - -function handleRangeUpdate() { - video[this.name] = this.value; -} - -function handleProgress() { - const percent = (video.currentTime / video.duration) * 100; - progressBar.style.flexBasis = `${percent}%`; -} - -function scrub(e) { - const scrubTime = (e.offsetX / progress.offsetWidth) * video.duration; - video.currentTime = scrubTime; -} - -/* Hook up the event listners */ -video.addEventListener('click', togglePlay); -video.addEventListener('play', updateButton); -video.addEventListener('pause', updateButton); -video.addEventListener('timeupdate', handleProgress); - -toggle.addEventListener('click', togglePlay); -skipButtons.forEach(button => button.addEventListener('click', skip)); -ranges.forEach(range => range.addEventListener('change', handleRangeUpdate)); -ranges.forEach(range => range.addEventListener('mousemove', handleRangeUpdate)); - -let mousedown = false; -progress.addEventListener('click', scrub); -progress.addEventListener('mousemove', (e) => mousedown && scrub(e)); -progress.addEventListener('mousedown', () => mousedown = true); -progress.addEventListener('mouseup', () => mousedown = false); diff --git a/12 - Key Sequence Detection/index-FINISHED.html b/12 - Key Sequence Detection/index-FINISHED.html deleted file mode 100644 index 562127a0d2..0000000000 --- a/12 - Key Sequence Detection/index-FINISHED.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - Key Detection - - - - - - diff --git a/12 - Key Sequence Detection/index-START.html b/12 - Key Sequence Detection/index.html similarity index 100% rename from 12 - Key Sequence Detection/index-START.html rename to 12 - Key Sequence Detection/index.html diff --git a/13 - Slide in on Scroll/index-FINISHED.html b/13 - Slide in on Scroll/index-FINISHED.html deleted file mode 100644 index bbaf0b6f22..0000000000 --- a/13 - Slide in on Scroll/index-FINISHED.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - Document - - - -
- -

Slide in on Scroll

- -

Consectetur adipisicing elit. Tempore tempora rerum, est autem cupiditate, corporis a qui libero ipsum delectus quidem dolor at nulla, adipisci veniam in reiciendis aut asperiores omnis blanditiis quod quas laborum nam! Fuga ad tempora in aspernatur pariaturlores sunt esse magni, ut, dignissimos.

-

Lorem ipsum cupiditate, corporis a qui libero ipsum delectus quidem dolor at nulla, adipisci veniam in reiciendis aut asperiores omnis blanditiis quod quas laborum nam! Fuga ad tempora in aspernatur pariatur fugit quibusdam dolores sunt esse magni, ut, dignissimos.

-

Adipisicing elit. Tempore tempora rerum..

-

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tempore tempora rerum, est autem cupiditate, corporis a qui libero ipsum delectus quidem dolor at nulla, adipisci veniam in reiciendis aut asperiores omnis blanditiis quod quas laborum nam! Fuga ad tempora in aspernatur pariatur fugit quibusdam dolores sunt esse magni, ut, dignissimos.

-

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tempore tempora rerum, est autem cupiditate, corporis a qui libero ipsum delectus quidem dolor at nulla, adipisci veniam in reiciendis aut asperiores omnis blanditiis quod quas laborum nam! Fuga ad tempora in aspernatur pariatur fugit quibusdam dolores sunt esse magni, ut, dignissimos.

-

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tempore tempora rerum, est autem cupiditate, corporis a qui libero ipsum delectus quidem dolor at nulla, adipisci veniam in reiciendis aut asperiores omnis blanditiis quod quas laborum nam! Fuga ad tempora in aspernatur pariatur fugit quibusdam dolores sunt esse magni, ut, dignissimos.

- - - -

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptates, deserunt facilis et iste corrupti omnis tenetur est. Iste ut est dicta dolor itaque adipisci, dolorum minima, veritatis earum provident error molestias. Ratione magni illo sint vel velit ut excepturi consectetur suscipit, earum modi accusamus voluptatem nostrum, praesentium numquam, reiciendis voluptas sit id quisquam. Consequatur in quis reprehenderit modi perspiciatis necessitatibus saepe, quidem, suscipit iure natus dignissimos ipsam, eligendi deleniti accusantium, rerum quibusdam fugit perferendis et optio recusandae sed ratione. Culpa, dolorum reprehenderit harum ab voluptas fuga, nisi eligendi natus maiores illum quas quos et aperiam aut doloremque optio maxime fugiat doloribus. Eum dolorum expedita quam, nesciunt

- - - -

at provident praesentium atque quas rerum optio dignissimos repudiandae ullam illum quibusdam. Vel ad error quibusdam, illo ex totam placeat. Quos excepturi fuga, molestiae ea quisquam minus, ratione dicta consectetur officia omnis, doloribus voluptatibus? Veniam ipsum veritatis architecto, provident quas consequatur doloremque quam quidem earum expedita, ad delectus voluptatum, omnis praesentium nostrum qui aspernatur ea eaque adipisci et cumque ab? Ea voluptatum dolore itaque odio. Eius minima distinctio harum, officia ab nihil exercitationem. Tempora rem nemo nam temporibus molestias facilis minus ipsam quam doloribus consequatur debitis nesciunt tempore officiis aperiam quisquam, molestiae voluptates cum, fuga culpa. Distinctio accusamus quibusdam, tempore perspiciatis dolorum optio facere consequatur quidem ullam beatae architecto, ipsam sequi officiis dignissimos amet impedit natus necessitatibus tenetur repellendus dolor rem! Dicta dolorem, iure, facilis illo ex nihil ipsa amet officia, optio temporibus eum autem odit repellendus nisi. Possimus modi, corrupti error debitis doloribus dicta libero earum, sequi porro ut excepturi nostrum ea voluptatem nihil culpa? Ullam expedita eligendi obcaecati reiciendis velit provident omnis quas qui in corrupti est dolore facere ad hic, animi soluta assumenda consequuntur reprehenderit! Voluptate dolor nihil veniam laborum voluptas nisi pariatur sed optio accusantium quam consectetur, corrupti, sequi et consequuntur, excepturi doloremque. Tempore quis velit corporis neque fugit non sequi eaque rem hic. Facere, inventore, aspernatur. Accusantium modi atque, asperiores qui nobis soluta cumque suscipit excepturi possimus doloremque odit saepe perferendis temporibus molestiae nostrum voluptatum quis id sint quidem nesciunt culpa. Rerum labore dolor beatae blanditiis praesentium explicabo velit optio esse aperiam similique, voluptatem cum, maiores ipsa tempore. Reiciendis sed culpa atque inventore, nam ullam enim expedita consectetur id velit iusto alias vitae explicabo nemo neque odio reprehenderit soluta sint eaque. Aperiam, qui ut tenetur, voluptate doloremque officiis dicta quaerat voluptatem rerum natus magni. Eum amet autem dolor ullam.

- - - -

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Distinctio maiores adipisci quibusdam repudiandae dolor vero placeat esse sit! Quibusdam saepe aperiam explicabo placeat optio, consequuntur nihil voluptatibus expedita quia vero perferendis, deserunt et incidunt eveniet temporibus doloremque possimus facilis. Possimus labore, officia dolore! Eaque ratione saepe, alias harum laboriosam deserunt laudantium blanditiis eum explicabo placeat reiciendis labore iste sint. Consectetur expedita dignissimos, non quos distinctio, eos rerum facilis eligendi. Asperiores laudantium, rerum ratione consequatur, culpa consectetur possimus atque ab tempore illum non dolor nesciunt. Neque, rerum. A vel non incidunt, quod doloremque dignissimos necessitatibus aliquid laboriosam architecto at cupiditate commodi expedita in, quae blanditiis. Deserunt labore sequi, repellat laboriosam est, doloremque culpa reiciendis tempore excepturi. Enim nostrum fugit itaque vel corporis ullam sed tenetur ipsa qui rem quam error sint, libero. Laboriosam rem, ratione. Autem blanditiis

- - -

laborum neque repudiandae quam, cumque, voluptate veritatis itaque, placeat veniam ad nisi. Expedita, laborum reprehenderit ratione soluta velit natus, odit mollitia. Corporis rerum minima fugiat in nostrum. Assumenda natus cupiditate hic quidem ex, quas, amet ipsum esse dolore facilis beatae maxime qui inventore, iste? Maiores dignissimos dolore culpa debitis voluptatem harum, excepturi enim reiciendis, tempora ab ipsam illum aspernatur quasi qui porro saepe iure sunt eligendi tenetur quaerat ducimus quas sequi omnis aperiam suscipit! Molestiae obcaecati officiis quo, ratione eveniet, provident pariatur. Veniam quasi expedita distinctio, itaque molestiae sequi, dolorum nisi repellendus quia facilis iusto dignissimos nam? Tenetur fugit quos autem nihil, perspiciatis expedita enim tempore, alias ab maiores quis necessitatibus distinctio molestias eum, quidem. Delectus impedit quidem laborum, fugit vel neque quo, ipsam, quasi aspernatur quas odio nihil? Veniam amet reiciendis blanditiis quis reprehenderit repudiandae neque, ab ducimus, odit excepturi voluptate saepe ipsam. Voluptatem eum error voluptas porro officiis, amet! Molestias, fugit, ut! Tempore non magnam, amet, facere ducimus accusantium eos veritatis neque.

- - - -

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Distinctio maiores adipisci quibusdam repudiandae dolor vero placeat esse sit! Quibusdam saepe aperiam explicabo placeat optio, consequuntur nihil voluptatibus expedita quia vero perferendis, deserunt et incidunt eveniet temporibus doloremque possimus facilis. Possimus labore, officia dolore! Eaque ratione saepe, alias harum laboriosam deserunt laudantium blanditiis eum explicabo placeat reiciendis labore iste sint. Consectetur expedita dignissimos, non quos distinctio, eos rerum facilis eligendi. Asperiores laudantium, rerum ratione consequatur, culpa consectetur possimus atque ab tempore illum non dolor nesciunt. Neque, rerum. A vel non incidunt, quod doloremque dignissimos necessitatibus aliquid laboriosam architecto at cupiditate commodi expedita in, quae blanditiis. Deserunt labore sequi, repellat laboriosam est, doloremque culpa reiciendis tempore excepturi. Enim nostrum fugit itaque vel corporis ullam sed tenetur ipsa qui rem quam error sint, libero. Laboriosam rem, ratione. Autem blanditiis laborum neque repudiandae quam, cumque, voluptate veritatis itaque, placeat veniam ad nisi. Expedita, laborum reprehenderit ratione soluta velit natus, odit mollitia. Corporis rerum minima fugiat in nostrum. Assumenda natus cupiditate hic quidem ex, quas, amet ipsum esse dolore facilis beatae maxime qui inventore, iste? Maiores dignissimos dolore culpa debitis voluptatem harum, excepturi enim reiciendis, tempora ab ipsam illum aspernatur quasi qui porro saepe iure sunt eligendi tenetur quaerat ducimus quas sequi omnis aperiam suscipit! Molestiae obcaecati officiis quo, ratione eveniet, provident pariatur. Veniam quasi expedita distinctio, itaque molestiae sequi, dolorum nisi repellendus quia facilis iusto dignissimos nam? Tenetur fugit quos autem nihil, perspiciatis expedita enim tempore, alias ab maiores quis necessitatibus distinctio molestias eum, quidem. Delectus impedit quidem laborum, fugit vel neque quo, ipsam, quasi aspernatur quas odio nihil? Veniam amet reiciendis blanditiis quis reprehenderit repudiandae neque, ab ducimus, odit excepturi voluptate saepe ipsam. Voluptatem eum error voluptas porro officiis, amet! Molestias, fugit, ut! Tempore non magnam, amet, facere ducimus accusantium eos veritatis neque.

-

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Distinctio maiores adipisci quibusdam repudiandae dolor vero placeat esse sit! Quibusdam saepe aperiam explicabo placeat optio, consequuntur nihil voluptatibus expedita quia vero perferendis, deserunt et incidunt eveniet temporibus doloremque possimus facilis. Possimus labore, officia dolore! Eaque ratione saepe, alias harum laboriosam deserunt laudantium blanditiis eum explicabo placeat reiciendis labore iste sint. Consectetur expedita dignissimos, non quos distinctio, eos rerum facilis eligendi. Asperiores laudantium, rerum ratione consequatur, culpa consectetur possimus atque ab tempore illum non dolor nesciunt. Neque, rerum. A vel non incidunt, quod doloremque dignissimos necessitatibus aliquid laboriosam architecto at cupiditate commodi expedita in, quae blanditiis. Deserunt labore sequi, repellat laboriosam est, doloremque culpa reiciendis tempore excepturi. Enim nostrum fugit itaque vel corporis ullam sed tenetur ipsa qui rem quam error sint, libero. Laboriosam rem, ratione. Autem blanditiis laborum neque repudiandae quam, cumque, voluptate veritatis itaque, placeat veniam ad nisi. Expedita, laborum reprehenderit ratione soluta velit natus, odit mollitia. Corporis rerum minima fugiat in nostrum. Assumenda natus cupiditate hic quidem ex, quas, amet ipsum esse dolore facilis beatae maxime qui inventore, iste? Maiores dignissimos dolore culpa debitis voluptatem harum, excepturi enim reiciendis, tempora ab ipsam illum aspernatur quasi qui porro saepe iure sunt eligendi tenetur quaerat ducimus quas sequi omnis aperiam suscipit! Molestiae obcaecati officiis quo, ratione eveniet, provident pariatur. Veniam quasi expedita distinctio, itaque molestiae sequi, dolorum nisi repellendus quia facilis iusto dignissimos nam? Tenetur fugit quos autem nihil, perspiciatis expedita enim tempore, alias ab maiores quis necessitatibus distinctio molestias eum, quidem. Delectus impedit quidem laborum, fugit vel neque quo, ipsam, quasi aspernatur quas odio nihil? Veniam amet reiciendis blanditiis quis reprehenderit repudiandae neque, ab ducimus, odit excepturi voluptate saepe ipsam. Voluptatem eum error voluptas porro officiis, amet! Molestias, fugit, ut! Tempore non magnam, amet, facere ducimus accusantium eos veritatis neque.

- - - - -
- - - - - - - diff --git a/13 - Slide in on Scroll/index-START.html b/13 - Slide in on Scroll/index.html similarity index 100% rename from 13 - Slide in on Scroll/index-START.html rename to 13 - Slide in on Scroll/index.html diff --git a/14 - JavaScript References VS Copying/index-FINISHED.html b/14 - JavaScript References VS Copying/index-FINISHED.html deleted file mode 100644 index be6d1b7646..0000000000 --- a/14 - JavaScript References VS Copying/index-FINISHED.html +++ /dev/null @@ -1,99 +0,0 @@ - - - - - JS Reference VS Copy - - - - - - - diff --git a/14 - JavaScript References VS Copying/index-START.html b/14 - JavaScript References VS Copying/index.html similarity index 100% rename from 14 - JavaScript References VS Copying/index-START.html rename to 14 - JavaScript References VS Copying/index.html diff --git a/15 - LocalStorage/index-FINISHED.html b/15 - LocalStorage/index-FINISHED.html deleted file mode 100644 index 2c492b1088..0000000000 --- a/15 - LocalStorage/index-FINISHED.html +++ /dev/null @@ -1,77 +0,0 @@ - - - - - LocalStorage - - - - - - - -
-

LOCAL TAPAS

-

- -
- - -
-
- - - - - - - diff --git a/15 - LocalStorage/index-START.html b/15 - LocalStorage/index.html similarity index 100% rename from 15 - LocalStorage/index-START.html rename to 15 - LocalStorage/index.html diff --git a/16 - Mouse Move Shadow/index-finished.html b/16 - Mouse Move Shadow/index-finished.html deleted file mode 100644 index 4328eaf6ab..0000000000 --- a/16 - Mouse Move Shadow/index-finished.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - - Mouse Shadow - - - -
-

🔥WOAH!

-
- - - - - - diff --git a/16 - Mouse Move Shadow/index-start.html b/16 - Mouse Move Shadow/index.html similarity index 100% rename from 16 - Mouse Move Shadow/index-start.html rename to 16 - Mouse Move Shadow/index.html diff --git a/17 - Sort Without Articles/index-FINISHED.html b/17 - Sort Without Articles/index-FINISHED.html deleted file mode 100644 index 5de851cbbd..0000000000 --- a/17 - Sort Without Articles/index-FINISHED.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - Sort Without Articles - - - - - - - - - - - diff --git a/17 - Sort Without Articles/index-START.html b/17 - Sort Without Articles/index.html similarity index 100% rename from 17 - Sort Without Articles/index-START.html rename to 17 - Sort Without Articles/index.html diff --git a/18 - Adding Up Times with Reduce/index-FINISHED.html b/18 - Adding Up Times with Reduce/index-FINISHED.html deleted file mode 100644 index 20d099644c..0000000000 --- a/18 - Adding Up Times with Reduce/index-FINISHED.html +++ /dev/null @@ -1,207 +0,0 @@ - - - - - Videos - - - - - - diff --git a/18 - Adding Up Times with Reduce/index-START.html b/18 - Adding Up Times with Reduce/index.html similarity index 100% rename from 18 - Adding Up Times with Reduce/index-START.html rename to 18 - Adding Up Times with Reduce/index.html diff --git a/19 - Webcam Fun/scripts-FINISHED.js b/19 - Webcam Fun/scripts-FINISHED.js deleted file mode 100755 index 0d62c8dc23..0000000000 --- a/19 - Webcam Fun/scripts-FINISHED.js +++ /dev/null @@ -1,102 +0,0 @@ -const video = document.querySelector('.player'); -const canvas = document.querySelector('.photo'); -const ctx = canvas.getContext('2d'); -const strip = document.querySelector('.strip'); -const snap = document.querySelector('.snap'); - -function getVideo() { - navigator.mediaDevices.getUserMedia({ video: true, audio: false }) - .then(localMediaStream => { - console.log(localMediaStream); - video.src = window.URL.createObjectURL(localMediaStream); - video.play(); - }) - .catch(err => { - console.error(`OH NO!!!`, err); - }); -} - -function paintToCanavas() { - const width = video.videoWidth; - const height = video.videoHeight; - canvas.width = width; - canvas.height = height; - - return setInterval(() => { - ctx.drawImage(video, 0, 0, width, height); - // take the pixels out - let pixels = ctx.getImageData(0, 0, width, height); - // mess with them - // pixels = redEffect(pixels); - - pixels = rgbSplit(pixels); - // ctx.globalAlpha = 0.8; - - // pixels = greenScreen(pixels); - // put them back - ctx.putImageData(pixels, 0, 0); - }, 16); -} - -function takePhoto() { - // played the sound - snap.currentTime = 0; - snap.play(); - - // take the data out of the canvas - const data = canvas.toDataURL('image/jpeg'); - const link = document.createElement('a'); - link.href = data; - link.setAttribute('download', 'handsome'); - link.innerHTML = `Handsome Man`; - strip.insertBefore(link, strip.firsChild); -} - -function redEffect(pixels) { - for(let i = 0; i < pixels.data.length; i+=4) { - pixels.data[i + 0] = pixels.data[i + 0] + 200; // RED - pixels.data[i + 1] = pixels.data[i + 1] - 50; // GREEN - pixels.data[i + 2] = pixels.data[i + 2] * 0.5; // Blue - } - return pixels; -} - -function rgbSplit(pixels) { - for(let i = 0; i < pixels.data.length; i+=4) { - pixels.data[i - 150] = pixels.data[i + 0]; // RED - pixels.data[i + 500] = pixels.data[i + 1]; // GREEN - pixels.data[i - 550] = pixels.data[i + 2]; // Blue - } - return pixels; -} - -function greenScreen(pixels) { - const levels = {}; - - document.querySelectorAll('.rgb input').forEach((input) => { - levels[input.name] = input.value; - }); - - for (i = 0; i < pixels.data.length; i = i + 4) { - red = pixels.data[i + 0]; - green = pixels.data[i + 1]; - blue = pixels.data[i + 2]; - alpha = pixels.data[i + 3]; - - if (red >= levels.rmin - && green >= levels.gmin - && blue >= levels.bmin - && red <= levels.rmax - && green <= levels.gmax - && blue <= levels.bmax) { - // take it out! - pixels.data[i + 3] = 0; - } - } - - return pixels; -} - -getVideo(); - -video.addEventListener('canplay', paintToCanavas); diff --git a/20 - Speech Detection/index-FINISHED.html b/20 - Speech Detection/index-FINISHED.html deleted file mode 100644 index 413c3eeaaf..0000000000 --- a/20 - Speech Detection/index-FINISHED.html +++ /dev/null @@ -1,85 +0,0 @@ - - - - - Speech Detection - - - -
-
- - - - - - - - diff --git a/20 - Speech Detection/index-START.html b/20 - Speech Detection/index.html similarity index 100% rename from 20 - Speech Detection/index-START.html rename to 20 - Speech Detection/index.html diff --git a/21 - Geolocation/index-FINISHED.html b/21 - Geolocation/index-FINISHED.html deleted file mode 100644 index 0f2ddecf2a..0000000000 --- a/21 - Geolocation/index-FINISHED.html +++ /dev/null @@ -1,72 +0,0 @@ - - - - - Document - - - - - - -

- 0 - KM/H -

- - - - - diff --git a/21 - Geolocation/index-START.html b/21 - Geolocation/index.html similarity index 100% rename from 21 - Geolocation/index-START.html rename to 21 - Geolocation/index.html diff --git a/22 - Follow Along Link Highlighter/index-FINISHED.html b/22 - Follow Along Link Highlighter/index-FINISHED.html deleted file mode 100644 index 869d8dab94..0000000000 --- a/22 - Follow Along Link Highlighter/index-FINISHED.html +++ /dev/null @@ -1,55 +0,0 @@ - - - - - 👀👀👀Follow Along Nav - - - - - - -
-

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Est explicabo unde natus necessitatibus esse obcaecati distinctio, aut itaque, qui vitae!

-

Aspernatur sapiente quae sint soluta modi, atque praesentium laborum pariatur earum quaerat cupiditate consequuntur facilis ullam dignissimos, aperiam quam veniam.

-

Cum ipsam quod, incidunt sit ex tempore placeat maxime corrupti possimus veritatis ipsum fugit recusandae est doloremque? Hic, quibusdam, nulla.

-

Esse quibusdam, ad, ducimus cupiditate nulla, quae magni odit totam ut consequatur eveniet sunt quam provident sapiente dicta neque quod.

-

Aliquam dicta sequi culpa fugiat consequuntur pariatur optio ad minima, maxime odio, distinctio magni impedit tempore enim repellendus repudiandae quas!

-
- - - - - diff --git a/22 - Follow Along Link Highlighter/index-START.html b/22 - Follow Along Link Highlighter/index.html similarity index 100% rename from 22 - Follow Along Link Highlighter/index-START.html rename to 22 - Follow Along Link Highlighter/index.html diff --git a/23 - Speech Synthesis/index-FINISHED.html b/23 - Speech Synthesis/index-FINISHED.html deleted file mode 100644 index 5ea9a4a8e7..0000000000 --- a/23 - Speech Synthesis/index-FINISHED.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - - Speech Synthesis - - - - - -
- -

The Voiceinator 5000

- - - - - - - - - - - - - -
- - - - - diff --git a/23 - Speech Synthesis/index-START.html b/23 - Speech Synthesis/index.html similarity index 100% rename from 23 - Speech Synthesis/index-START.html rename to 23 - Speech Synthesis/index.html diff --git a/24 - Sticky Nav/index-FINISHED.html b/24 - Sticky Nav/index-FINISHED.html deleted file mode 100644 index 2e5961192c..0000000000 --- a/24 - Sticky Nav/index-FINISHED.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - - Document - - - - -
-

A story about getting lost.

-
- - - -
-

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tempore tempora rerum, est autem cupiditate, corporis a qui libero ipsum delectus quidem dolor at nulla, adipisci veniam in reiciendis aut asperiores omnis blanditiis quod quas laborum nam! Fuga ad tempora in aspernatur pariatur fugit quibusdam dolores sunt esse magni, ut, dignissimos.

-

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tempore tempora rerum, est autem cupiditate, corporis a qui libero ipsum delectus quidem dolor at nulla, adipisci veniam in reiciendis aut asperiores omnis blanditiis quod quas laborum nam! Fuga ad tempora in aspernatur pariatur fugit quibusdam dolores sunt esse magni, ut, dignissimos.

-

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tempore tempora rerum, est autem cupiditate, corporis a qui libero ipsum delectus quidem dolor at nulla, adipisci veniam in reiciendis aut asperiores omnis blanditiis quod quas laborum nam! Fuga ad tempora in aspernatur pariatur fugit quibusdam dolores sunt esse magni, ut, dignissimos.

-

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tempore tempora rerum, est autem cupiditate, corporis a qui libero ipsum delectus quidem dolor at nulla, adipisci veniam in reiciendis aut asperiores omnis blanditiis quod quas laborum nam! Fuga ad tempora in aspernatur pariatur fugit quibusdam dolores sunt esse magni, ut, dignissimos.

-

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tempore tempora rerum, est autem cupiditate, corporis a qui libero ipsum delectus quidem dolor at nulla, adipisci veniam in reiciendis aut asperiores omnis blanditiis quod quas laborum nam! Fuga ad tempora in aspernatur pariatur fugit quibusdam dolores sunt esse magni, ut, dignissimos.

-

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tempore tempora rerum, est autem cupiditate, corporis a qui libero ipsum delectus quidem dolor at nulla, adipisci veniam in reiciendis aut asperiores omnis blanditiis quod quas laborum nam! Fuga ad tempora in aspernatur pariatur fugit quibusdam dolores sunt esse magni, ut, dignissimos.

-

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tempore tempora rerum, est autem cupiditate, corporis a qui libero ipsum delectus quidem dolor at nulla, adipisci veniam in reiciendis aut asperiores omnis blanditiis quod quas laborum nam! Fuga ad tempora in aspernatur pariatur fugit quibusdam dolores sunt esse magni, ut, dignissimos.

-

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tempore tempora rerum, est autem cupiditate, corporis a qui libero ipsum delectus quidem dolor at nulla, adipisci veniam in reiciendis aut asperiores omnis blanditiis quod quas laborum nam! Fuga ad tempora in aspernatur pariatur fugit quibusdam dolores sunt esse magni, ut, dignissimos.

-

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tempore tempora rerum, est autem cupiditate, corporis a qui libero ipsum delectus quidem dolor at nulla, adipisci veniam in reiciendis aut asperiores omnis blanditiis quod quas laborum nam! Fuga ad tempora in aspernatur pariatur fugit quibusdam dolores sunt esse magni, ut, dignissimos.

-

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tempore tempora rerum, est autem cupiditate, corporis a qui libero ipsum delectus quidem dolor at nulla, adipisci veniam in reiciendis aut asperiores omnis blanditiis quod quas laborum nam! Fuga ad tempora in aspernatur pariatur fugit quibusdam dolores sunt esse magni, ut, dignissimos.

- -

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Voluptates, deserunt facilis et iste corrupti omnis tenetur est. Iste ut est dicta dolor itaque adipisci, dolorum minima, veritatis earum provident error molestias. Ratione magni illo sint vel velit ut excepturi consectetur suscipit, earum modi accusamus voluptatem nostrum, praesentium numquam, reiciendis voluptas sit id quisquam. Consequatur in quis reprehenderit modi perspiciatis necessitatibus saepe, quidem, suscipit iure natus dignissimos ipsam, eligendi deleniti accusantium, rerum quibusdam fugit perferendis et optio recusandae sed ratione. Culpa, dolorum reprehenderit harum ab voluptas fuga, nisi eligendi natus maiores illum quas quos et aperiam aut doloremque optio maxime fugiat doloribus. Eum dolorum expedita quam, nesciunt

- -

at provident praesentium atque quas rerum optio dignissimos repudiandae ullam illum quibusdam. Vel ad error quibusdam, illo ex totam placeat. Quos excepturi fuga, molestiae ea quisquam minus, ratione dicta consectetur officia omnis, doloribus voluptatibus? Veniam ipsum veritatis architecto, provident quas consequatur doloremque quam quidem earum expedita, ad delectus voluptatum, omnis praesentium nostrum qui aspernatur ea eaque adipisci et cumque ab? Ea voluptatum dolore itaque odio. Eius minima distinctio harum, officia ab nihil exercitationem. Tempora rem nemo nam temporibus molestias facilis minus ipsam quam doloribus consequatur debitis nesciunt tempore officiis aperiam quisquam, molestiae voluptates cum, fuga culpa. Distinctio accusamus quibusdam, tempore perspiciatis dolorum optio facere consequatur quidem ullam beatae architecto, ipsam sequi officiis dignissimos amet impedit natus necessitatibus tenetur repellendus dolor rem! Dicta dolorem, iure, facilis illo ex nihil ipsa amet officia, optio temporibus eum autem odit repellendus nisi. Possimus modi, corrupti error debitis doloribus dicta libero earum, sequi porro ut excepturi nostrum ea voluptatem nihil culpa? Ullam expedita eligendi obcaecati reiciendis velit provident omnis quas qui in corrupti est dolore facere ad hic, animi soluta assumenda consequuntur reprehenderit! Voluptate dolor nihil veniam laborum voluptas nisi pariatur sed optio accusantium quam consectetur, corrupti, sequi et consequuntur, excepturi doloremque. Tempore quis velit corporis neque fugit non sequi eaque rem hic. Facere, inventore, aspernatur. Accusantium modi atque, asperiores qui nobis soluta cumque suscipit excepturi possimus doloremque odit saepe perferendis temporibus molestiae nostrum voluptatum quis id sint quidem nesciunt culpa. Rerum labore dolor beatae blanditiis praesentium explicabo velit optio esse aperiam similique, voluptatem cum, maiores ipsa tempore. Reiciendis sed culpa atque inventore, nam ullam enim expedita consectetur id velit iusto alias vitae explicabo nemo neque odio reprehenderit soluta sint eaque. Aperiam, qui ut tenetur, voluptate doloremque officiis dicta quaerat voluptatem rerum natus magni. Eum amet autem dolor ullam.

-

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Distinctio maiores adipisci quibusdam repudiandae dolor vero placeat esse sit! Quibusdam saepe aperiam explicabo placeat optio, consequuntur nihil voluptatibus expedita quia vero perferendis, deserunt et incidunt eveniet temporibus doloremque possimus facilis. Possimus labore, officia dolore! Eaque ratione saepe, alias harum laboriosam deserunt laudantium blanditiis eum explicabo placeat reiciendis labore iste sint. Consectetur expedita dignissimos, non quos distinctio, eos rerum facilis eligendi. Asperiores laudantium, rerum ratione consequatur, culpa consectetur possimus atque ab tempore illum non dolor nesciunt. Neque, rerum. A vel non incidunt, quod doloremque dignissimos necessitatibus aliquid laboriosam architecto at cupiditate commodi expedita in, quae blanditiis. Deserunt labore sequi, repellat laboriosam est, doloremque culpa reiciendis tempore excepturi. Enim nostrum fugit itaque vel corporis ullam sed tenetur ipsa qui rem quam error sint, libero. Laboriosam rem, ratione. Autem blanditiis laborum neque repudiandae quam, cumque, voluptate veritatis itaque, placeat veniam ad nisi. Expedita, laborum reprehenderit ratione soluta velit natus, odit mollitia. Corporis rerum minima fugiat in nostrum. Assumenda natus cupiditate hic quidem ex, quas, amet ipsum esse dolore facilis beatae maxime qui inventore, iste? Maiores dignissimos dolore culpa debitis voluptatem harum, excepturi enim reiciendis, tempora ab ipsam illum aspernatur quasi qui porro saepe iure sunt eligendi tenetur quaerat ducimus quas sequi omnis aperiam suscipit! Molestiae obcaecati officiis quo, ratione eveniet, provident pariatur. Veniam quasi expedita distinctio, itaque molestiae sequi, dolorum nisi repellendus quia facilis iusto dignissimos nam? Tenetur fugit quos autem nihil, perspiciatis expedita enim tempore, alias ab maiores quis necessitatibus distinctio molestias eum, quidem. Delectus impedit quidem laborum, fugit vel neque quo, ipsam, quasi aspernatur quas odio nihil? Veniam amet reiciendis blanditiis quis reprehenderit repudiandae neque, ab ducimus, odit excepturi voluptate saepe ipsam. Voluptatem eum error voluptas porro officiis, amet! Molestias, fugit, ut! Tempore non magnam, amet, facere ducimus accusantium eos veritatis neque.

- -

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Distinctio maiores adipisci quibusdam repudiandae dolor vero placeat esse sit! Quibusdam saepe aperiam explicabo placeat optio, consequuntur nihil voluptatibus expedita quia vero perferendis, deserunt et incidunt eveniet temporibus doloremque possimus facilis. Possimus labore, officia dolore! Eaque ratione saepe, alias harum laboriosam deserunt laudantium blanditiis eum explicabo placeat reiciendis labore iste sint. Consectetur expedita dignissimos, non quos distinctio, eos rerum facilis eligendi. Asperiores laudantium, rerum ratione consequatur, culpa consectetur possimus atque ab tempore illum non dolor nesciunt. Neque, rerum. A vel non incidunt, quod doloremque dignissimos necessitatibus aliquid laboriosam architecto at cupiditate commodi expedita in, quae blanditiis. Deserunt labore sequi, repellat laboriosam est, doloremque culpa reiciendis tempore excepturi. Enim nostrum fugit itaque vel corporis ullam sed tenetur ipsa qui rem quam error sint, libero. Laboriosam rem, ratione. Autem blanditiis laborum neque repudiandae quam, cumque, voluptate veritatis itaque, placeat veniam ad nisi. Expedita, laborum reprehenderit ratione soluta velit natus, odit mollitia. Corporis rerum minima fugiat in nostrum. Assumenda natus cupiditate hic quidem ex, quas, amet ipsum esse dolore facilis beatae maxime qui inventore, iste? Maiores dignissimos dolore culpa debitis voluptatem harum, excepturi enim reiciendis, tempora ab ipsam illum aspernatur quasi qui porro saepe iure sunt eligendi tenetur quaerat ducimus quas sequi omnis aperiam suscipit! Molestiae obcaecati officiis quo, ratione eveniet, provident pariatur. Veniam quasi expedita distinctio, itaque molestiae sequi, dolorum nisi repellendus quia facilis iusto dignissimos nam? Tenetur fugit quos autem nihil, perspiciatis expedita enim tempore, alias ab maiores quis necessitatibus distinctio molestias eum, quidem. Delectus impedit quidem laborum, fugit vel neque quo, ipsam, quasi aspernatur quas odio nihil? Veniam amet reiciendis blanditiis quis reprehenderit repudiandae neque, ab ducimus, odit excepturi voluptate saepe ipsam. Voluptatem eum error voluptas porro officiis, amet! Molestias, fugit, ut! Tempore non magnam, amet, facere ducimus accusantium eos veritatis neque.

-

Lorem ipsum dolor sit amet, consectetur adipisicing elit. Distinctio maiores adipisci quibusdam repudiandae dolor vero placeat esse sit! Quibusdam saepe aperiam explicabo placeat optio, consequuntur nihil voluptatibus expedita quia vero perferendis, deserunt et incidunt eveniet temporibus doloremque possimus facilis. Possimus labore, officia dolore! Eaque ratione saepe, alias harum laboriosam deserunt laudantium blanditiis eum explicabo placeat reiciendis labore iste sint. Consectetur expedita dignissimos, non quos distinctio, eos rerum facilis eligendi. Asperiores laudantium, rerum ratione consequatur, culpa consectetur possimus atque ab tempore illum non dolor nesciunt. Neque, rerum. A vel non incidunt, quod doloremque dignissimos necessitatibus aliquid laboriosam architecto at cupiditate commodi expedita in, quae blanditiis. Deserunt labore sequi, repellat laboriosam est, doloremque culpa reiciendis tempore excepturi. Enim nostrum fugit itaque vel corporis ullam sed tenetur ipsa qui rem quam error sint, libero. Laboriosam rem, ratione. Autem blanditiis laborum neque repudiandae quam, cumque, voluptate veritatis itaque, placeat veniam ad nisi. Expedita, laborum reprehenderit ratione soluta velit natus, odit mollitia. Corporis rerum minima fugiat in nostrum. Assumenda natus cupiditate hic quidem ex, quas, amet ipsum esse dolore facilis beatae maxime qui inventore, iste? Maiores dignissimos dolore culpa debitis voluptatem harum, excepturi enim reiciendis, tempora ab ipsam illum aspernatur quasi qui porro saepe iure sunt eligendi tenetur quaerat ducimus quas sequi omnis aperiam suscipit! Molestiae obcaecati officiis quo, ratione eveniet, provident pariatur. Veniam quasi expedita distinctio, itaque molestiae sequi, dolorum nisi repellendus quia facilis iusto dignissimos nam? Tenetur fugit quos autem nihil, perspiciatis expedita enim tempore, alias ab maiores quis necessitatibus distinctio molestias eum, quidem. Delectus impedit quidem laborum, fugit vel neque quo, ipsam, quasi aspernatur quas odio nihil? Veniam amet reiciendis blanditiis quis reprehenderit repudiandae neque, ab ducimus, odit excepturi voluptate saepe ipsam. Voluptatem eum error voluptas porro officiis, amet! Molestias, fugit, ut! Tempore non magnam, amet, facere ducimus accusantium eos veritatis neque.

-
- - - - - - diff --git a/24 - Sticky Nav/index-START.html b/24 - Sticky Nav/index.html similarity index 100% rename from 24 - Sticky Nav/index-START.html rename to 24 - Sticky Nav/index.html diff --git a/24 - Sticky Nav/style-FINISHED.css b/24 - Sticky Nav/style-FINISHED.css deleted file mode 100644 index b551473357..0000000000 --- a/24 - Sticky Nav/style-FINISHED.css +++ /dev/null @@ -1,100 +0,0 @@ -html { - box-sizing: border-box; - background:#eeeeee; - font-family:'helvetica neue'; - font-size: 20px; - font-weight: 200; -} -body { - margin: 0; -} -*, *:before, *:after { - box-sizing: inherit; -} - -.site-wrap { - max-width: 700px; - margin: 70px auto; - background:white; - padding:40px; - text-align: justify; - box-shadow: 0 0 10px 5px rgba(0, 0, 0, 0.05); - transform: scale(0.98); - transition: transform 0.5s; -} - -body.fixed-nav .site-wrap { - transform: scale(1); -} - - -header { - text-align: center; - height:50vh; - background:url(http://wes.io/iEgP/wow-so-deep.jpg) bottom center no-repeat; - background-size:cover; - display:flex; - align-items:center; - justify-content: center; -} - -h1 { - color:white; - font-size: 7vw; - text-shadow: 3px 4px 0 rgba(0,0,0,0.2) -} - -nav { - background:black; - top:0; - width: 100%; - transition:all 0.5s; - position: relative; - z-index: 1; -} - -body.fixed-nav nav { - position: fixed; - box-shadow:0 5px 0 rgba(0,0,0,0.1); -} - -nav ul { - margin: 0; - padding:0; - list-style: none; - display:flex; -} - -nav li { - flex:1; - text-align: center; - display: flex; - justify-content: center; - align-items: center; -} - -li.logo { - max-width:0; - overflow: hidden; - background: white; - transition: all 0.5s; - font-weight: 600; - font-size: 30px; -} - -li.logo a { - color:black; -} - -.fixed-nav li.logo { - max-width:500px; -} - -nav a { - text-decoration: none; - padding:20px; - display: inline-block; - color:white; - transition:all 0.2s; - text-transform: uppercase; -} diff --git a/24 - Sticky Nav/style-START.css b/24 - Sticky Nav/style.css similarity index 100% rename from 24 - Sticky Nav/style-START.css rename to 24 - Sticky Nav/style.css diff --git a/25 - Event Capture, Propagation, Bubbling and Once/index-FINISHED.html b/25 - Event Capture, Propagation, Bubbling and Once/index-FINISHED.html deleted file mode 100644 index 8856df9d89..0000000000 --- a/25 - Event Capture, Propagation, Bubbling and Once/index-FINISHED.html +++ /dev/null @@ -1,64 +0,0 @@ - - - - - Understanding JavaScript's Capture - - - -
-
-
-
-
-
- - - - - - - diff --git a/25 - Event Capture, Propagation, Bubbling and Once/index-START.html b/25 - Event Capture, Propagation, Bubbling and Once/index.html similarity index 100% rename from 25 - Event Capture, Propagation, Bubbling and Once/index-START.html rename to 25 - Event Capture, Propagation, Bubbling and Once/index.html diff --git a/26 - Stripe Follow Along Nav/index-FINISHED.html b/26 - Stripe Follow Along Nav/index-FINISHED.html deleted file mode 100644 index 9cf05f388d..0000000000 --- a/26 - Stripe Follow Along Nav/index-FINISHED.html +++ /dev/null @@ -1,246 +0,0 @@ - - - - - Follow Along Nav - - -

Cool

- - - - - - - - diff --git a/26 - Stripe Follow Along Nav/index-START.html b/26 - Stripe Follow Along Nav/index.html similarity index 100% rename from 26 - Stripe Follow Along Nav/index-START.html rename to 26 - Stripe Follow Along Nav/index.html diff --git a/27 - Click and Drag/index-FINISHED.html b/27 - Click and Drag/index-FINISHED.html deleted file mode 100644 index 52eb86628c..0000000000 --- a/27 - Click and Drag/index-FINISHED.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - Click and Drag - - - -
-
01
-
02
-
03
-
04
-
05
-
06
-
07
-
08
-
09
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
- - - - - diff --git a/27 - Click and Drag/index-START.html b/27 - Click and Drag/index.html similarity index 100% rename from 27 - Click and Drag/index-START.html rename to 27 - Click and Drag/index.html diff --git a/28 - Video Speed Controller/index-FINISHED.html b/28 - Video Speed Controller/index-FINISHED.html deleted file mode 100644 index a7d2f3e38c..0000000000 --- a/28 - Video Speed Controller/index-FINISHED.html +++ /dev/null @@ -1,38 +0,0 @@ - - - - - Video Speed Scrubber - - - - -
- -
-
-
-
- - - - diff --git a/28 - Video Speed Controller/index-START.html b/28 - Video Speed Controller/index.html similarity index 100% rename from 28 - Video Speed Controller/index-START.html rename to 28 - Video Speed Controller/index.html diff --git a/29 - Countdown Timer/scripts-FINISHED.js b/29 - Countdown Timer/scripts-FINISHED.js deleted file mode 100644 index 581cadb270..0000000000 --- a/29 - Countdown Timer/scripts-FINISHED.js +++ /dev/null @@ -1,55 +0,0 @@ -let countdown; -const timerDisplay = document.querySelector('.display__time-left'); -const endTime = document.querySelector('.display__end-time'); -const buttons = document.querySelectorAll('[data-time]'); - -function timer(seconds) { - // clear any existing timers - clearInterval(countdown); - - const now = Date.now(); - const then = now + seconds * 1000; - displayTimeLeft(seconds); - displayEndTime(then); - - countdown = setInterval(() => { - const secondsLeft = Math.round((then - Date.now()) / 1000); - // check if we should stop it! - if(secondsLeft < 0) { - clearInterval(countdown); - return; - } - // display it - displayTimeLeft(secondsLeft); - }, 1000); -} - -function displayTimeLeft(seconds) { - const minutes = Math.floor(seconds / 60); - const remainderSeconds = seconds % 60; - const display = `${minutes}:${remainderSeconds < 10 ? '0' : '' }${remainderSeconds}`; - document.title = display; - timerDisplay.textContent = display; -} - -function displayEndTime(timestamp) { - const end = new Date(timestamp); - const hour = end.getHours(); - const adjustedHour = hour > 12 ? hour - 12 : hour; - const minutes = end.getMinutes(); - endTime.textContent = `Be Back At ${adjustedHour}:${minutes < 10 ? '0' : ''}${minutes}`; -} - -function startTimer() { - const seconds = parseInt(this.dataset.time); - timer(seconds); -} - -buttons.forEach(button => button.addEventListener('click', startTimer)); -document.customForm.addEventListener('submit', function(e) { - e.preventDefault(); - const mins = this.minutes.value; - console.log(mins); - timer(mins * 60); - this.reset(); -}); diff --git a/29 - Countdown Timer/scripts-START.js b/29 - Countdown Timer/scripts.js similarity index 100% rename from 29 - Countdown Timer/scripts-START.js rename to 29 - Countdown Timer/scripts.js diff --git a/30 - Whack A Mole/index-FINISHED.html b/30 - Whack A Mole/index-FINISHED.html deleted file mode 100644 index 8d741d5bf0..0000000000 --- a/30 - Whack A Mole/index-FINISHED.html +++ /dev/null @@ -1,87 +0,0 @@ - - - - - Whack A Mole! - - - - - -

Whack-a-mole! 0

- - -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- - - - diff --git a/30 - Whack A Mole/index-START.html b/30 - Whack A Mole/index.html similarity index 100% rename from 30 - Whack A Mole/index-START.html rename to 30 - Whack A Mole/index.html From f38525612fde762d0b6ab5ac99294e4a2953b677 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Wed, 8 Feb 2017 14:00:58 -0700 Subject: [PATCH 02/73] Update readme with reachback to the original repo --- readme.md | 64 +++++++++++++++++++++++++++++++------------------------ 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/readme.md b/readme.md index 23b4764c2e..dc882adfc0 100644 --- a/readme.md +++ b/readme.md @@ -2,31 +2,39 @@ # JavaScript30 -Starter Files + Completed solutions for the JavaScript 30 Day Challenge. - -Grab the course at [https://JavaScript30.com](https://JavaScript30.com) - -## Community #JavaScript30 Content - -Feel free to submit a PR adding a link to your own recaps, guides or reviews! - -* [Arjun Khode’s blog](http://thesagittariusme.blogspot.com/search/label/JS30) about summaries for each day, including fixed glitches, bugs and extra features -* [Nitish Dayal's Text Guides](https://github.com/nitishdayal/JavaScript30) are great for those who like reading over watching -* [Meredith Underell's](http://blog.meredithunderell.com/tag/javascript30/) Quick Lessons Learned -* [Rowan Weismiller's](http://rowanweismiller.com/blog/javascript-30/) Recaps + Lessons Learned -* [Thorsten Frommen](https://tfrommen.de/tag/javascript-30/) shares how he solved the exercises before viewing the answers -* [Soyaine 写的中文指南](https://github.com/soyaine/JavaScript30)包含了过程记录和难点解释 -* [Ayo Isaiah's](https://freshman.tech/archive/#javascript30) Recaps and Lessons Learned -* [Adriana Rios](https://stpcollabr8nlstn.github.io/JavaScript30/) shares her alternative solutions -* [Michael Einsohn](http://30daysofjs.michaeleinsohn.com) publishes each challenge after watching the video once -* [Mike Ekkel](https://medium.com/@mike_ekkel/javascript-30-a-30-day-vanilla-js-challenge-6a733fc9f62c#.9frjtaje9) -* [Akinjide Bankole](https://github.com/akinjide/JS30days) used Node.js with [Jade](http://jadelang.net) to solve the exercises -* [Yusef Habib](https://github.com/yhabib/JavaScript30) lessons and tricks learned, and a [gh-page](https://yhabib.github.io/JavaScript30/) to see working all the mini-projects. - -## A note on Pull Requests - -These are meant to be 1:1 copies of what is done in the video. If you found a better / different way to do things, great, but I will be keeping them the same as the videos. - -The starter files + solutions will be updated if/when the videos are updated. - -Thanks! +This is my take on the JavaScript 30 Day Challenge. I'll be checking these out as I build them. + +- [ ] [JavaScript Drum Kit](./01 - JavaScript Drum Kit/index.html) +- [ ] [JS and CSS Clock](./02 - JS and CSS Clock/index.html) +- [ ] [CSS Variables](./03 - CSS Variables/index.html) +- [ ] [Array Cardio Day 1](./04 - Array Cardio Day 1/index.html) +- [ ] [Flex Panel Gallery](./05 - Flex Panel Gallery/index.html) +- [ ] [Type Ahead](./06 - Type Ahead/index.html) +- [ ] [Array Cardio Day 2](./07 - Array Cardio Day 2/index.html) +- [ ] [Fun with HTML5 Canvas](./08 - Fun with HTML5 Canvas/index.html) +- [ ] [Dev Tools Domination](./09 - Dev Tools Domination/index.html) +- [ ] [Hold Shift and Check Checkboxes](./10 - Hold Shift and Check Checkboxes/index.html) +- [ ] [Custom Video Player](./11 - Custom Video Player/index.html) +- [ ] [Key Sequence Detection](./12 - Key Sequence Detection/index.html) +- [ ] [Slide in on Scroll](./13 - Slide in on Scroll/index.html) +- [ ] [JavaScript References VS Copying](./14 - JavaScript References VS Copying/index.html) +- [ ] [LocalStorage](./15 - LocalStorage/index.html) +- [ ] [Mouse Move Shadow](./16 - Mouse Move Shadow/index.html) +- [ ] [Sort Without Articles](./17 - Sort Without Articles/index.html) +- [ ] [Adding Up Times with Reduce](./18 - Adding Up Times with Reduce/index.html) +- [ ] [Webcam Fun](./19 - Webcam Fun/index.html) +- [ ] [Speech Detection](./20 - Speech Detection/index.html) +- [ ] [Geolocation](./21 - Geolocation/index.html) +- [ ] [Follow Along Link Highlighter](./22 - Follow Along Link Highlighter/index.html) +- [ ] [Speech Synthesis](./23 - Speech Synthesis/index.html) +- [ ] [Sticky Nav](./24 - Sticky Nav/index.html) +- [ ] [Event Capture, Propagation, Bubbling and Once](./25 - Event Capture, Propagation, Bubbling and Once/index.html) +- [ ] [Stripe Follow Along Nav](./26 - Stripe Follow Along Nav/index.html) +- [ ] [Click and Drag](./27 - Click and Drag/index.html) +- [ ] [Video Speed Controller](./28 - Video Speed Controller/index.html) +- [ ] [Countdown Timer](./29 - Countdown Timer/index.html) +- [ ] [Whack A Mole](./30 - Whack A Mole/index.html) + +## Credit + +This is a fork of Wes Bos's 30 Day JavaScript Challenge, original [README](https://github.com/wesbos/JavaScript30) \ No newline at end of file From 0183af2f198ba62da2b172464b6bac955b604dbf Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Wed, 8 Feb 2017 14:18:02 -0700 Subject: [PATCH 03/73] Switch keys to match DVORAK layout --- 01 - JavaScript Drum Kit/index.html | 48 ++++++++++++++--------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/01 - JavaScript Drum Kit/index.html b/01 - JavaScript Drum Kit/index.html index 4070d32767..0da31d374b 100644 --- a/01 - JavaScript Drum Kit/index.html +++ b/01 - JavaScript Drum Kit/index.html @@ -13,49 +13,49 @@ A clap -
- S +
+ O hihat
-
- D +
+ E kick
-
- F +
+ U openhat
-
- G +
+ I boom
-
- H +
+ D ride
-
- J +
+ H snare
-
- K +
+ T tom
-
- L +
+ N tink
- - - - - - - - + + + + + + + + From 71d324be9dd2145c6888df5027c9b5861bac8eb9 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Thu, 9 Feb 2017 00:04:56 -0700 Subject: [PATCH 05/73] Add and remove proper CSS class to show the key pressed --- 01 - JavaScript Drum Kit/index.html | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/01 - JavaScript Drum Kit/index.html b/01 - JavaScript Drum Kit/index.html index 6d20e568ec..7ea6df9411 100644 --- a/01 - JavaScript Drum Kit/index.html +++ b/01 - JavaScript Drum Kit/index.html @@ -58,12 +58,25 @@ From 6ffd8d404a40eb3183510badd05d3644f9606820 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Thu, 9 Feb 2017 00:05:34 -0700 Subject: [PATCH 06/73] Mark Day 1 complete --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index dc882adfc0..c859410e2a 100644 --- a/readme.md +++ b/readme.md @@ -4,7 +4,7 @@ This is my take on the JavaScript 30 Day Challenge. I'll be checking these out as I build them. -- [ ] [JavaScript Drum Kit](./01 - JavaScript Drum Kit/index.html) +- [x] [JavaScript Drum Kit](./01 - JavaScript Drum Kit/index.html) - [ ] [JS and CSS Clock](./02 - JS and CSS Clock/index.html) - [ ] [CSS Variables](./03 - CSS Variables/index.html) - [ ] [Array Cardio Day 1](./04 - Array Cardio Day 1/index.html) From 1b6d1e0ce2764356a65b2521f036ad53038d90fd Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Thu, 9 Feb 2017 14:25:31 -0700 Subject: [PATCH 07/73] Set theme jekyll-theme-modernist --- _config.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 _config.yml diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000000..cc35c1df2c --- /dev/null +++ b/_config.yml @@ -0,0 +1 @@ +theme: jekyll-theme-modernist \ No newline at end of file From 00bc41d32dd0569bdfc99635f6f303b13e8e1313 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Fri, 10 Feb 2017 12:01:52 -0700 Subject: [PATCH 08/73] Set hand transform origin to 100%, or right most --- 02 - JS and CSS Clock/index.html | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/02 - JS and CSS Clock/index.html b/02 - JS and CSS Clock/index.html index 2712384201..92e54f487d 100644 --- a/02 - JS and CSS Clock/index.html +++ b/02 - JS and CSS Clock/index.html @@ -5,8 +5,6 @@ JS + CSS Clock - -
@@ -14,8 +12,6 @@
- - From f4244b70164f1b38948d925d4da996c19ae3274a Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Fri, 10 Feb 2017 19:22:21 -0700 Subject: [PATCH 11/73] Mark Day 2 Complete --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index c859410e2a..76c8890a9d 100644 --- a/readme.md +++ b/readme.md @@ -5,7 +5,7 @@ This is my take on the JavaScript 30 Day Challenge. I'll be checking these out as I build them. - [x] [JavaScript Drum Kit](./01 - JavaScript Drum Kit/index.html) -- [ ] [JS and CSS Clock](./02 - JS and CSS Clock/index.html) +- [x] [JS and CSS Clock](./02 - JS and CSS Clock/index.html) - [ ] [CSS Variables](./03 - CSS Variables/index.html) - [ ] [Array Cardio Day 1](./04 - Array Cardio Day 1/index.html) - [ ] [Flex Panel Gallery](./05 - Flex Panel Gallery/index.html) From 18cbee6f32d2e2b364576f1ffb53662989c1eca0 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Sat, 11 Feb 2017 13:25:32 -0700 Subject: [PATCH 12/73] Add css variables for spacing, blur, and base color --- 03 - CSS Variables/index.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/03 - CSS Variables/index.html b/03 - CSS Variables/index.html index ca2b59d077..7f96fa6b07 100644 --- a/03 - CSS Variables/index.html +++ b/03 - CSS Variables/index.html @@ -21,6 +21,21 @@

Update CSS Variables with JS

From f86d1917dc575b4e840207eb8caac01d1fab3d9c Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Sat, 11 Feb 2017 13:37:45 -0700 Subject: [PATCH 14/73] Mark Day 3 Complete --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 76c8890a9d..32facb2210 100644 --- a/readme.md +++ b/readme.md @@ -6,7 +6,7 @@ This is my take on the JavaScript 30 Day Challenge. I'll be checking these out a - [x] [JavaScript Drum Kit](./01 - JavaScript Drum Kit/index.html) - [x] [JS and CSS Clock](./02 - JS and CSS Clock/index.html) -- [ ] [CSS Variables](./03 - CSS Variables/index.html) +- [x] [CSS Variables](./03 - CSS Variables/index.html) - [ ] [Array Cardio Day 1](./04 - Array Cardio Day 1/index.html) - [ ] [Flex Panel Gallery](./05 - Flex Panel Gallery/index.html) - [ ] [Type Ahead](./06 - Type Ahead/index.html) From aacabe321b0b87d617e15d8f34cd173596dd491d Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Sat, 11 Feb 2017 14:01:16 -0700 Subject: [PATCH 15/73] Filter all inventors born in the 1500s --- 04 - Array Cardio Day 1/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/04 - Array Cardio Day 1/index.html b/04 - Array Cardio Day 1/index.html index eec0ffc31d..9ba1f45d92 100644 --- a/04 - Array Cardio Day 1/index.html +++ b/04 - Array Cardio Day 1/index.html @@ -31,6 +31,8 @@ // Array.prototype.filter() // 1. Filter the list of inventors for those who were born in the 1500's + const filter = inventors.filter(inventor => inventor.year < 1600 && inventor.year >= 1500) + console.log(filter) // Array.prototype.map() // 2. Give us an array of the inventors' first and last names From 99168a3e17387dc84a036c75a1979b5f5efb733b Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Sat, 11 Feb 2017 14:02:41 -0700 Subject: [PATCH 16/73] Map all inventors to first and last name --- 04 - Array Cardio Day 1/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/04 - Array Cardio Day 1/index.html b/04 - Array Cardio Day 1/index.html index 9ba1f45d92..65345cbd14 100644 --- a/04 - Array Cardio Day 1/index.html +++ b/04 - Array Cardio Day 1/index.html @@ -36,6 +36,8 @@ // Array.prototype.map() // 2. Give us an array of the inventors' first and last names + const map = inventors.map(inventor => `${inventor.first} ${inventor.last}`) + console.log(map) // Array.prototype.sort() // 3. Sort the inventors by birthdate, oldest to youngest From 69cefb273965608ee607585f9a05f93a2aeff84a Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Sat, 11 Feb 2017 14:09:46 -0700 Subject: [PATCH 17/73] Sort inventors from oldest to youngest --- 04 - Array Cardio Day 1/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/04 - Array Cardio Day 1/index.html b/04 - Array Cardio Day 1/index.html index 65345cbd14..1ebe0120a1 100644 --- a/04 - Array Cardio Day 1/index.html +++ b/04 - Array Cardio Day 1/index.html @@ -41,6 +41,8 @@ // Array.prototype.sort() // 3. Sort the inventors by birthdate, oldest to youngest + const sort = inventors.sort((a, b) => a.year - b.year) + console.log(sort) // Array.prototype.reduce() // 4. How many years did all the inventors live? From ca1a82cf5d4291414a4de481bfca0528c045443b Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Sat, 11 Feb 2017 14:14:33 -0700 Subject: [PATCH 18/73] Sum the amount of years all of the inventors lived --- 04 - Array Cardio Day 1/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/04 - Array Cardio Day 1/index.html b/04 - Array Cardio Day 1/index.html index 1ebe0120a1..0c834857ee 100644 --- a/04 - Array Cardio Day 1/index.html +++ b/04 - Array Cardio Day 1/index.html @@ -46,6 +46,8 @@ // Array.prototype.reduce() // 4. How many years did all the inventors live? + const reduce = inventors.reduce((years, inventor) => years + (inventor.passed - inventor.year), 0) + console.log(reduce) // 5. Sort the inventors by years lived From 21511efe23bce5faf02a86c48fd00cfee32eea1f Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Sat, 11 Feb 2017 14:17:43 -0700 Subject: [PATCH 19/73] Sort inventors by years lived, least to most --- 04 - Array Cardio Day 1/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/04 - Array Cardio Day 1/index.html b/04 - Array Cardio Day 1/index.html index 0c834857ee..e676eba486 100644 --- a/04 - Array Cardio Day 1/index.html +++ b/04 - Array Cardio Day 1/index.html @@ -50,6 +50,8 @@ console.log(reduce) // 5. Sort the inventors by years lived + const sortLived = inventors.sort((a, b) => (a.passed - a.year) - (b.passed - b.year)) + console.log(sortLived) // 6. create a list of Boulevards in Paris that contain 'de' anywhere in the name // https://en.wikipedia.org/wiki/Category:Boulevards_in_Paris From 25c88f570f55069ec1f868acfcd598fc3183a70a Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Sun, 12 Feb 2017 11:12:20 -0700 Subject: [PATCH 20/73] Create a list of blvds with the word 'de' in them --- 04 - Array Cardio Day 1/index.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/04 - Array Cardio Day 1/index.html b/04 - Array Cardio Day 1/index.html index e676eba486..0ff3b70dbe 100644 --- a/04 - Array Cardio Day 1/index.html +++ b/04 - Array Cardio Day 1/index.html @@ -56,6 +56,23 @@ // 6. create a list of Boulevards in Paris that contain 'de' anywhere in the name // https://en.wikipedia.org/wiki/Category:Boulevards_in_Paris + // Without converting NodeListto Array + const boulevards = [] + const groups = document.querySelectorAll('.mw-category-group') + groups.forEach(group => { + group + .querySelectorAll('a') + .forEach(link => link.text.includes('de') ? boulevards.push(link.textContent) : '') + }) + console.log(boulevards) + + // Converting NodeList to Array + const category = document.querySelector('.mw-category') + const links = Array.from(category.querySelectorAll('a')) + const de = links + .map(link => link.textContent) + .filter(name => name.includes('de')) + console.log(de) // 7. sort Exercise // Sort the people alphabetically by last name From e3218d0ac43bc4520b00276b61af4ec4454cd8d8 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Sun, 12 Feb 2017 11:14:04 -0700 Subject: [PATCH 21/73] Change console.log to console.table for nicer display --- 04 - Array Cardio Day 1/index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/04 - Array Cardio Day 1/index.html b/04 - Array Cardio Day 1/index.html index 0ff3b70dbe..1933cccadd 100644 --- a/04 - Array Cardio Day 1/index.html +++ b/04 - Array Cardio Day 1/index.html @@ -32,26 +32,26 @@ // Array.prototype.filter() // 1. Filter the list of inventors for those who were born in the 1500's const filter = inventors.filter(inventor => inventor.year < 1600 && inventor.year >= 1500) - console.log(filter) + console.table(filter) // Array.prototype.map() // 2. Give us an array of the inventors' first and last names const map = inventors.map(inventor => `${inventor.first} ${inventor.last}`) - console.log(map) + console.table(map) // Array.prototype.sort() // 3. Sort the inventors by birthdate, oldest to youngest const sort = inventors.sort((a, b) => a.year - b.year) - console.log(sort) + console.table(sort) // Array.prototype.reduce() // 4. How many years did all the inventors live? const reduce = inventors.reduce((years, inventor) => years + (inventor.passed - inventor.year), 0) - console.log(reduce) + console.table(reduce) // 5. Sort the inventors by years lived const sortLived = inventors.sort((a, b) => (a.passed - a.year) - (b.passed - b.year)) - console.log(sortLived) + console.table(sortLived) // 6. create a list of Boulevards in Paris that contain 'de' anywhere in the name // https://en.wikipedia.org/wiki/Category:Boulevards_in_Paris From a246a427d831bc18249e2bfbb7bfd9698d9b94f3 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Sun, 12 Feb 2017 11:35:54 -0700 Subject: [PATCH 22/73] Comment out section boulevard section, requires external HTML --- 04 - Array Cardio Day 1/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/04 - Array Cardio Day 1/index.html b/04 - Array Cardio Day 1/index.html index 1933cccadd..0993ae9313 100644 --- a/04 - Array Cardio Day 1/index.html +++ b/04 - Array Cardio Day 1/index.html @@ -57,6 +57,7 @@ // https://en.wikipedia.org/wiki/Category:Boulevards_in_Paris // Without converting NodeListto Array + /* const boulevards = [] const groups = document.querySelectorAll('.mw-category-group') groups.forEach(group => { @@ -73,6 +74,7 @@ .map(link => link.textContent) .filter(name => name.includes('de')) console.log(de) + */ // 7. sort Exercise // Sort the people alphabetically by last name From fe9c8ad72df11755254d09acd2365496456ce910 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Sun, 12 Feb 2017 11:36:25 -0700 Subject: [PATCH 23/73] Sort people alphabetically --- 04 - Array Cardio Day 1/index.html | 3 +++ 1 file changed, 3 insertions(+) diff --git a/04 - Array Cardio Day 1/index.html b/04 - Array Cardio Day 1/index.html index 0993ae9313..5eb702844d 100644 --- a/04 - Array Cardio Day 1/index.html +++ b/04 - Array Cardio Day 1/index.html @@ -78,6 +78,9 @@ // 7. sort Exercise // Sort the people alphabetically by last name + const getLastName = p => p.split(', ')[0] + const sortPeople = people.sort((p1, p2) => getLastName(p1) < getLastName(p2) ? -1 : 1) + console.log(sortPeople) // 8. Reduce Exercise // Sum up the instances of each of these From 8442a003469c72c943cc8bfbe4d39d6075885cfa Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Sun, 12 Feb 2017 11:38:04 -0700 Subject: [PATCH 24/73] Not everything can be printed as a table, change console.table->log --- 04 - Array Cardio Day 1/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/04 - Array Cardio Day 1/index.html b/04 - Array Cardio Day 1/index.html index 5eb702844d..2661778bcb 100644 --- a/04 - Array Cardio Day 1/index.html +++ b/04 - Array Cardio Day 1/index.html @@ -37,7 +37,7 @@ // Array.prototype.map() // 2. Give us an array of the inventors' first and last names const map = inventors.map(inventor => `${inventor.first} ${inventor.last}`) - console.table(map) + console.log(map) // Array.prototype.sort() // 3. Sort the inventors by birthdate, oldest to youngest @@ -47,7 +47,7 @@ // Array.prototype.reduce() // 4. How many years did all the inventors live? const reduce = inventors.reduce((years, inventor) => years + (inventor.passed - inventor.year), 0) - console.table(reduce) + console.log(reduce) // 5. Sort the inventors by years lived const sortLived = inventors.sort((a, b) => (a.passed - a.year) - (b.passed - b.year)) From 0b535dc33cb4ccf4eeb66d926d13c5170ee1c3b9 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Sun, 12 Feb 2017 12:04:52 -0700 Subject: [PATCH 25/73] Sum instances of transportation vehicles --- 04 - Array Cardio Day 1/index.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/04 - Array Cardio Day 1/index.html b/04 - Array Cardio Day 1/index.html index 2661778bcb..6991747377 100644 --- a/04 - Array Cardio Day 1/index.html +++ b/04 - Array Cardio Day 1/index.html @@ -56,7 +56,7 @@ // 6. create a list of Boulevards in Paris that contain 'de' anywhere in the name // https://en.wikipedia.org/wiki/Category:Boulevards_in_Paris - // Without converting NodeListto Array + // Without converting NodeList to Array /* const boulevards = [] const groups = document.querySelectorAll('.mw-category-group') @@ -85,7 +85,12 @@ // 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 reduceVehicles = data.reduce((vehicles, vehicle) => { + vehicles[vehicle] = vehicles[vehicle] ? vehicles[vehicle] + 1 : 1 + return vehicles + }, {}) + console.log(reduceVehicles) From cab2956ce0b4ac9a4d17530ef042ad49b5af5bf5 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Sun, 12 Feb 2017 12:05:28 -0700 Subject: [PATCH 26/73] Mark Day 4 Complete --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 32facb2210..303533a0c9 100644 --- a/readme.md +++ b/readme.md @@ -7,7 +7,7 @@ This is my take on the JavaScript 30 Day Challenge. I'll be checking these out a - [x] [JavaScript Drum Kit](./01 - JavaScript Drum Kit/index.html) - [x] [JS and CSS Clock](./02 - JS and CSS Clock/index.html) - [x] [CSS Variables](./03 - CSS Variables/index.html) -- [ ] [Array Cardio Day 1](./04 - Array Cardio Day 1/index.html) +- [x] [Array Cardio Day 1](./04 - Array Cardio Day 1/index.html) - [ ] [Flex Panel Gallery](./05 - Flex Panel Gallery/index.html) - [ ] [Type Ahead](./06 - Type Ahead/index.html) - [ ] [Array Cardio Day 2](./07 - Array Cardio Day 2/index.html) From fba93628938c4674c1aaaeffbccda8ebd0b7ee01 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Sun, 12 Feb 2017 16:23:33 -0700 Subject: [PATCH 27/73] Set the display to flex and equally space out all containers and items --- 05 - Flex Panel Gallery/index.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/05 - Flex Panel Gallery/index.html b/05 - Flex Panel Gallery/index.html index e1d643ad5c..ce58ef707a 100644 --- a/05 - Flex Panel Gallery/index.html +++ b/05 - Flex Panel Gallery/index.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-content: center; + display: flex; + flex-direction: column } @@ -54,6 +60,11 @@ margin:0; width: 100%; transition:transform 0.5s; + border: 1px solid red; + flex: 1 0 auto; + justify-content: center; + align-items: center; + display: flex; } .panel p { @@ -62,6 +73,7 @@ text-shadow:0 0 4px rgba(0, 0, 0, 0.72), 0 0 14px rgba(0, 0, 0, 0.45); font-size: 2em; } + .panel p:nth-child(2) { font-size: 4em; } From 5a94021c36939204300f273721e6c8908660ce0f Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Sun, 12 Feb 2017 16:29:15 -0700 Subject: [PATCH 28/73] Translate panel children based on applied class --- 05 - Flex Panel Gallery/index.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/05 - Flex Panel Gallery/index.html b/05 - Flex Panel Gallery/index.html index ce58ef707a..917e8b3ead 100644 --- a/05 - Flex Panel Gallery/index.html +++ b/05 - Flex Panel Gallery/index.html @@ -67,6 +67,22 @@ display: flex; } + .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 { text-transform: uppercase; font-family: 'Amatic SC', cursive; From 61d659285eea51793b0c82110629fa3c3e3f6143 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Sun, 12 Feb 2017 16:31:18 -0700 Subject: [PATCH 29/73] Grow panel to flex 5 --- 05 - Flex Panel Gallery/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/05 - Flex Panel Gallery/index.html b/05 - Flex Panel Gallery/index.html index 917e8b3ead..5914c50e1d 100644 --- a/05 - Flex Panel Gallery/index.html +++ b/05 - Flex Panel Gallery/index.html @@ -96,6 +96,7 @@ .panel.open { font-size:40px; + flex: 5; } .cta { From a412037d3731487938a322e10623a6b1de09d816 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Mon, 13 Feb 2017 10:12:40 -0700 Subject: [PATCH 30/73] Add listener to all panels, and toggle open classes on click --- 05 - Flex Panel Gallery/index.html | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/05 - Flex Panel Gallery/index.html b/05 - Flex Panel Gallery/index.html index 5914c50e1d..c3506d7f77 100644 --- a/05 - Flex Panel Gallery/index.html +++ b/05 - Flex Panel Gallery/index.html @@ -60,7 +60,6 @@ margin:0; width: 100%; transition:transform 0.5s; - border: 1px solid red; flex: 1 0 auto; justify-content: center; align-items: center; @@ -136,10 +135,21 @@
- + function toggleOpen() { + this.classList.toggle('open') + } + function toggleActive(e) { + if(e.propertyName.includes('flex')) + this.classList.toggle('open-active') + } + panels.forEach(panel => { + panel.addEventListener('click', toggleOpen) + panel.addEventListener('transitionend', toggleActive) + }) + From 346fcfc1ece207adf798c08622c8aabb94aa5700 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Mon, 13 Feb 2017 10:25:53 -0700 Subject: [PATCH 31/73] Mark Day 5 Complete --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 303533a0c9..bc96fb79f1 100644 --- a/readme.md +++ b/readme.md @@ -8,7 +8,7 @@ This is my take on the JavaScript 30 Day Challenge. I'll be checking these out a - [x] [JS and CSS Clock](./02 - JS and CSS Clock/index.html) - [x] [CSS Variables](./03 - CSS Variables/index.html) - [x] [Array Cardio Day 1](./04 - Array Cardio Day 1/index.html) -- [ ] [Flex Panel Gallery](./05 - Flex Panel Gallery/index.html) +- [x] [Flex Panel Gallery](./05 - Flex Panel Gallery/index.html) - [ ] [Type Ahead](./06 - Type Ahead/index.html) - [ ] [Array Cardio Day 2](./07 - Array Cardio Day 2/index.html) - [ ] [Fun with HTML5 Canvas](./08 - Fun with HTML5 Canvas/index.html) From 2f59229a47bdb94c170f7ff733ff1b1676a34e52 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Mon, 13 Feb 2017 10:53:06 -0700 Subject: [PATCH 32/73] Fetch cities and store them in a variable --- 06 - Type Ahead/index.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/06 - Type Ahead/index.html b/06 - Type Ahead/index.html index 1436886918..58f426c809 100644 --- a/06 - Type Ahead/index.html +++ b/06 - Type Ahead/index.html @@ -15,7 +15,13 @@ From 6950a92ad094420fae47d6f196e64d84cf7e3593 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Mon, 13 Feb 2017 11:40:46 -0700 Subject: [PATCH 33/73] Create findMatches fn that returns cities that match an input --- 06 - Type Ahead/index.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/06 - Type Ahead/index.html b/06 - Type Ahead/index.html index 58f426c809..a008ce3863 100644 --- a/06 - Type Ahead/index.html +++ b/06 - Type Ahead/index.html @@ -22,7 +22,12 @@ .then(response => response.json()) .then(data => cities.push(...data)) - + function findMatches(input, cities) { + return cities.filter(city => { + const match = new RegExp(input, 'gi') + return match.test(city.city) + }) + } From 1d62165258353842e708cc7415115d68d1353891 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Mon, 13 Feb 2017 13:30:57 -0700 Subject: [PATCH 34/73] Set backup fonts, I don't have neue on my system --- 06 - Type Ahead/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/06 - Type Ahead/style.css b/06 - Type Ahead/style.css index 36dc55f30e..a45808ad43 100644 --- a/06 - Type Ahead/style.css +++ b/06 - Type Ahead/style.css @@ -1,7 +1,7 @@ html { box-sizing: border-box; background:#ffc600; - font-family:'helvetica neue'; + font-family:'helvetica neue', 'helvetica', 'arial'; font-size: 20px; font-weight: 200; } From a5f70f94f30adf6d8214547e0816484b4cb7bdb2 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Mon, 13 Feb 2017 13:31:18 -0700 Subject: [PATCH 35/73] Hook up findMatches to the UI and display results --- 06 - Type Ahead/index.html | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/06 - Type Ahead/index.html b/06 - Type Ahead/index.html index a008ce3863..1b1e521001 100644 --- a/06 - Type Ahead/index.html +++ b/06 - Type Ahead/index.html @@ -24,10 +24,37 @@ function findMatches(input, cities) { return cities.filter(city => { - const match = new RegExp(input, 'gi') - return match.test(city.city) + const regex = new RegExp(input, 'gi') + return city.city.match(regex) || city.state.match(regex) }) } + + function numberWithCommas(num) { + return num.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',') + } + + function displayMatches() { + const matches = findMatches(this.value, cities) + + const html = matches.map(match => { + const regex = new RegExp(this.value, 'gi') + const cityName = match.city.replace(regex, `${this.value}`) + const stateName = match.state.replace(regex, `${this.value}`) + return ` +
  • + ${cityName}, ${stateName} + ${numberWithCommas(match.population)} +
  • + ` + }).join('') + suggestions.innerHTML = html + } + + const searchInput = document.querySelector('.search') + const suggestions = document.querySelector('.suggestions') + + searchInput.addEventListener('change', displayMatches) + searchInput.addEventListener('keyup', displayMatches) From cc9ba3e4be8091988e0805dc74841b874ea52476 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Mon, 13 Feb 2017 13:32:58 -0700 Subject: [PATCH 36/73] Mark Day 6 Complete --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index bc96fb79f1..7b3449ad31 100644 --- a/readme.md +++ b/readme.md @@ -9,7 +9,7 @@ This is my take on the JavaScript 30 Day Challenge. I'll be checking these out a - [x] [CSS Variables](./03 - CSS Variables/index.html) - [x] [Array Cardio Day 1](./04 - Array Cardio Day 1/index.html) - [x] [Flex Panel Gallery](./05 - Flex Panel Gallery/index.html) -- [ ] [Type Ahead](./06 - Type Ahead/index.html) +- [x] [Type Ahead](./06 - Type Ahead/index.html) - [ ] [Array Cardio Day 2](./07 - Array Cardio Day 2/index.html) - [ ] [Fun with HTML5 Canvas](./08 - Fun with HTML5 Canvas/index.html) - [ ] [Dev Tools Domination](./09 - Dev Tools Domination/index.html) From 089114f75f3c610f16ec68d40a70d634107ed529 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Wed, 15 Feb 2017 16:30:24 -0700 Subject: [PATCH 37/73] Check if at least one person is over 19 --- 07 - Array Cardio Day 2/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/07 - Array Cardio Day 2/index.html b/07 - Array Cardio Day 2/index.html index 969566ff78..eb74bf6a8b 100644 --- a/07 - Array Cardio Day 2/index.html +++ b/07 - Array Cardio Day 2/index.html @@ -26,6 +26,8 @@ // Some and Every Checks // Array.prototype.some() // is at least one person 19 or older? + const some = people.some(person => (new Date().getFullYear()- person.year) >= 19) + console.log(some) // Array.prototype.every() // is everyone 19 or older? // Array.prototype.find() From 7aaadc252bd753006396ad0beee614641499623a Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Wed, 15 Feb 2017 16:31:12 -0700 Subject: [PATCH 38/73] Check that every person is at least 19 --- 07 - Array Cardio Day 2/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/07 - Array Cardio Day 2/index.html b/07 - Array Cardio Day 2/index.html index eb74bf6a8b..ab438f60da 100644 --- a/07 - Array Cardio Day 2/index.html +++ b/07 - Array Cardio Day 2/index.html @@ -29,6 +29,8 @@ const some = people.some(person => (new Date().getFullYear()- person.year) >= 19) console.log(some) // Array.prototype.every() // is everyone 19 or older? + const every = people.every(person => (new Date().getFullYear() - person.year) >= 19) + console.log(every) // Array.prototype.find() // Find is like filter, but instead returns just the one you are looking for From 5ea7bff17dbec721aa98584607739a48cf693389 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Wed, 15 Feb 2017 16:52:21 -0700 Subject: [PATCH 39/73] Find comment with id === 823423 --- 07 - Array Cardio Day 2/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/07 - Array Cardio Day 2/index.html b/07 - Array Cardio Day 2/index.html index ab438f60da..605a71af2f 100644 --- a/07 - Array Cardio Day 2/index.html +++ b/07 - Array Cardio Day 2/index.html @@ -35,6 +35,8 @@ // Array.prototype.find() // Find is like filter, but instead returns just the one you are looking for // find the comment with the ID of 823423 + const find = comments.find(comment => comment.id === 823423) + console.log(find) // Array.prototype.findIndex() // Find the comment with this ID From 865e68d64c026c28abbeff3c157c2023f1be89d5 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Wed, 15 Feb 2017 16:53:11 -0700 Subject: [PATCH 40/73] Find index of comment with id === 823423 --- 07 - Array Cardio Day 2/index.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/07 - Array Cardio Day 2/index.html b/07 - Array Cardio Day 2/index.html index 605a71af2f..05517a5fa2 100644 --- a/07 - Array Cardio Day 2/index.html +++ b/07 - Array Cardio Day 2/index.html @@ -40,8 +40,10 @@ // Array.prototype.findIndex() // Find the comment with this ID - // delete the comment with the ID of 823423 + const id = comments.findIndex(comment => comment.id === 823423) + console.log(id) + // delete the comment with the ID of 823423 From dd02c84e30f3c46eaea5d94fef06e79371cee735 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Wed, 15 Feb 2017 17:55:44 -0700 Subject: [PATCH 41/73] Remove comment with id 823423 --- 07 - Array Cardio Day 2/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/07 - Array Cardio Day 2/index.html b/07 - Array Cardio Day 2/index.html index 05517a5fa2..7de79ec28f 100644 --- a/07 - Array Cardio Day 2/index.html +++ b/07 - Array Cardio Day 2/index.html @@ -44,6 +44,8 @@ console.log(id) // delete the comment with the ID of 823423 + console.table(comments.splice(id, 1)) + console.table(comments) From ab58b2300e3c4d45481c3dc88dbebdee943c28d0 Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Wed, 15 Feb 2017 17:56:10 -0700 Subject: [PATCH 42/73] Mark Day 7 Complete --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 7b3449ad31..004d6afe03 100644 --- a/readme.md +++ b/readme.md @@ -10,7 +10,7 @@ This is my take on the JavaScript 30 Day Challenge. I'll be checking these out a - [x] [Array Cardio Day 1](./04 - Array Cardio Day 1/index.html) - [x] [Flex Panel Gallery](./05 - Flex Panel Gallery/index.html) - [x] [Type Ahead](./06 - Type Ahead/index.html) -- [ ] [Array Cardio Day 2](./07 - Array Cardio Day 2/index.html) +- [x] [Array Cardio Day 2](./07 - Array Cardio Day 2/index.html) - [ ] [Fun with HTML5 Canvas](./08 - Fun with HTML5 Canvas/index.html) - [ ] [Dev Tools Domination](./09 - Dev Tools Domination/index.html) - [ ] [Hold Shift and Check Checkboxes](./10 - Hold Shift and Check Checkboxes/index.html) From a26291bd5da4541302ddf7f7d82205398de2f65a Mon Sep 17 00:00:00 2001 From: "Jose V. Trigueros" Date: Wed, 15 Feb 2017 20:06:49 -0700 Subject: [PATCH 43/73] Create a 2D context with a width and height of the window --- 08 - Fun with HTML5 Canvas/index.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/08 - Fun with HTML5 Canvas/index.html b/08 - Fun with HTML5 Canvas/index.html index 37c148df07..929f56228f 100644 --- a/08 - Fun with HTML5 Canvas/index.html +++ b/08 - Fun with HTML5 Canvas/index.html @@ -7,6 +7,10 @@