From cefac52ea767565b73f0c3bd14ee1eaa33709456 Mon Sep 17 00:00:00 2001 From: ola Date: Mon, 19 Aug 2019 12:14:48 +0100 Subject: [PATCH 1/3] drum kit --- 01 - JavaScript Drum Kit/index-START.html | 3 +++ 01 - JavaScript Drum Kit/style.css | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html index 4070d32767..5233500adb 100644 --- a/01 - JavaScript Drum Kit/index-START.html +++ b/01 - JavaScript Drum Kit/index-START.html @@ -59,6 +59,9 @@ diff --git a/01 - JavaScript Drum Kit/style.css b/01 - JavaScript Drum Kit/style.css index 0673a8752a..10f750bfa4 100644 --- a/01 - JavaScript Drum Kit/style.css +++ b/01 - JavaScript Drum Kit/style.css @@ -1,6 +1,6 @@ html { font-size: 10px; - background: url(http://i.imgur.com/b9r5sEL.jpg) bottom center; + background: url(https://images.pexels.com/photos/761963/pexels-photo-761963.jpeg?auto=compress&cs=tinysrgb&dpr=2&w=500) bottom center; background-size: cover; } From 7895ce330fc02c59a3e8c9f2cbaf26d623f7a5a6 Mon Sep 17 00:00:00 2001 From: ola Date: Mon, 19 Aug 2019 14:27:15 +0100 Subject: [PATCH 2/3] drum kit finished --- 01 - JavaScript Drum Kit/index-START.html | 29 ++++++++++++++++++++--- 01 - JavaScript Drum Kit/style.css | 4 ++-- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html index 5233500adb..07078bf779 100644 --- a/01 - JavaScript Drum Kit/index-START.html +++ b/01 - JavaScript Drum Kit/index-START.html @@ -1,4 +1,3 @@ - @@ -58,10 +57,34 @@ diff --git a/01 - JavaScript Drum Kit/style.css b/01 - JavaScript Drum Kit/style.css index 10f750bfa4..59de621cb0 100644 --- a/01 - JavaScript Drum Kit/style.css +++ b/01 - JavaScript Drum Kit/style.css @@ -34,8 +34,8 @@ body,html { .playing { transform: scale(1.1); - border-color: #ffc600; - box-shadow: 0 0 1rem #ffc600; + border-color: red; + box-shadow: 0 0 1rem red; } kbd { From fe772b595d1663457bd98babb092f49c83640aef Mon Sep 17 00:00:00 2001 From: ola Date: Wed, 16 Oct 2019 14:11:20 +0100 Subject: [PATCH 3/3] css and js clock --- 01 - JavaScript Drum Kit/index-START.html | 26 +++++++++++++-------- 02 - JS and CSS Clock/index-START.html | 28 +++++++++++++++++++++-- 27 - Click and Drag/index-START.html | 27 ++++++++++++++++++++++ 27 - Click and Drag/style.css | 3 ++- 29 - Countdown Timer/scripts-START.js | 11 +++++++++ 5 files changed, 83 insertions(+), 12 deletions(-) diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html index 07078bf779..e114883dd2 100644 --- a/01 - JavaScript Drum Kit/index-START.html +++ b/01 - JavaScript Drum Kit/index-START.html @@ -57,7 +57,22 @@ + + + + + + + diff --git a/02 - JS and CSS Clock/index-START.html b/02 - JS and CSS Clock/index-START.html index 12f721b183..494a802ba0 100644 --- a/02 - JS and CSS Clock/index-START.html +++ b/02 - JS and CSS Clock/index-START.html @@ -18,7 +18,7 @@ diff --git a/27 - Click and Drag/index-START.html b/27 - Click and Drag/index-START.html index b8609315f7..959d1d55d7 100644 --- a/27 - Click and Drag/index-START.html +++ b/27 - Click and Drag/index-START.html @@ -35,6 +35,33 @@ diff --git a/27 - Click and Drag/style.css b/27 - Click and Drag/style.css index debd09247a..2ec396e520 100644 --- a/27 - Click and Drag/style.css +++ b/27 - Click and Drag/style.css @@ -26,6 +26,7 @@ body { overflow-x: scroll; overflow-y: hidden; white-space: nowrap; + user-select: none; cursor: pointer; transition: all 0.2s; @@ -34,7 +35,7 @@ body { position: relative; background: rgba(255,255,255,0.1); font-size: 0; - perspective: 500px; + perspective: 500px; */ } .items.active { diff --git a/29 - Countdown Timer/scripts-START.js b/29 - Countdown Timer/scripts-START.js index e69de29bb2..f58a7e004e 100644 --- a/29 - Countdown Timer/scripts-START.js +++ b/29 - Countdown Timer/scripts-START.js @@ -0,0 +1,11 @@ +function timer (seconds) { + const now = Date.now() + const then = now + seconds * 1000 + + setInterval(() => { + const secondsLeft = (then - Date.now()) / 1000 + console.log(secondsLeft) + console.log(timer) + }, 1000) +} +console.log('Ola')