From 14f57bb43dd87039293df48a0762d31aef775f80 Mon Sep 17 00:00:00 2001 From: anouar Date: Mon, 21 May 2018 12:12:51 +0200 Subject: [PATCH 1/2] add the js code fir the first exercice --- 01 - JavaScript Drum Kit/index-START.html | 77 +++++++++++++---------- 1 file changed, 45 insertions(+), 32 deletions(-) diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html index 4070d32767..60f792cd1f 100644 --- a/01 - JavaScript Drum Kit/index-START.html +++ b/01 - JavaScript Drum Kit/index-START.html @@ -1,64 +1,77 @@ - - JS Drum Kit - + + JS Drum Kit + -
+
- A - clap + A + clap
- S - hihat + S + hihat
- D - kick + D + kick
- F - openhat + F + openhat
- G - boom + G + boom
- H - ride + H + ride
- J - snare + J + snare
- K - tom + K + tom
- L - tink + L + tink
-
+
- - - - - - - - - + + + + + + + + + From 7b2aaf7f325e45ea8bfedbd514e623b0ec1f67c5 Mon Sep 17 00:00:00 2001 From: anouar Date: Fri, 25 May 2018 02:48:49 +0200 Subject: [PATCH 2/2] second exercice --- 02 - JS and CSS Clock/index-START.html | 100 +++++++++++++++---------- 1 file changed, 61 insertions(+), 39 deletions(-) diff --git a/02 - JS and CSS Clock/index-START.html b/02 - JS and CSS Clock/index-START.html index ee7eaefb1f..360eb18650 100644 --- a/02 - JS and CSS Clock/index-START.html +++ b/02 - JS and CSS Clock/index-START.html @@ -1,74 +1,96 @@ - - JS + CSS Clock + + JS + CSS Clock -
-
+
+
-
+
- + - + const minutes = now.getMinutes(); + const minutesDegrees = (minutes / 60) * 360 +90; + minuteHand.style.transform = `rotate(${minutesDegrees}deg)`; + + + const hours = now.getHours(); + const hoursDegrees = (hours / 12) * 360 +90; + hourHand.style.transform = `rotate(${hoursDegrees}deg)`; + } + setInterval(setDate, 1000); + +