From f815508651c20c2f7384db6f8470a139aa24fa5e Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Tue, 3 Sep 2019 18:18:17 +0000 Subject: [PATCH 001/191] =?UTF-8?q?=F0=9F=8C=A0=F0=9F=91=80=20Checkpoint?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shrinkwrap.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 shrinkwrap.yaml diff --git a/shrinkwrap.yaml b/shrinkwrap.yaml new file mode 100644 index 00000000..86c7048d --- /dev/null +++ b/shrinkwrap.yaml @@ -0,0 +1,15 @@ +dependencies: + mime: 2.4.4 +packages: + /mime/2.4.4: + dev: false + engines: + node: '>=4.0.0' + hasBin: true + resolution: + integrity: sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA== +registry: 'https://registry.npmjs.org/' +shrinkwrapMinorVersion: 9 +shrinkwrapVersion: 3 +specifiers: + mime: ^2.4.4 From c15e2a59a6f7586736b4cda16960c6fe046a79a8 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Tue, 3 Sep 2019 18:53:15 +0000 Subject: [PATCH 002/191] =?UTF-8?q?=F0=9F=93=BA=F0=9F=8F=B0=20Checkpoint?= =?UTF-8?q?=20./public/index.html:6266626/43?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/public/index.html b/public/index.html index c56d620e..581b2049 100755 --- a/public/index.html +++ b/public/index.html @@ -26,6 +26,7 @@ }) .then( function( response ) { // do something with the reponse + alert(input.value) console.log( response ) }) From 59f5e509062c38283fe1693796e20a486d970f89 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Wed, 4 Sep 2019 13:30:09 +0000 Subject: [PATCH 003/191] =?UTF-8?q?=F0=9F=91=A8=E2=80=8D=E2=9D=A4=EF=B8=8F?= =?UTF-8?q?=E2=80=8D=F0=9F=92=8B=E2=80=8D=F0=9F=91=A8=F0=9F=8D=9A=20Checkp?= =?UTF-8?q?oint=20./public/css/style.css:6266626/2=20./public/index.html:6?= =?UTF-8?q?266626/343=20./package.json:6266626/15?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- public/css/style.css | 3 ++- public/index.html | 7 ++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 988f135f..6f08b507 100755 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "", + "name": "Paris Lopez", "version": "", "description": "", "author": "", diff --git a/public/css/style.css b/public/css/style.css index d5f842ab..e5b73639 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -1 +1,2 @@ -/*Style your own assignment! This is fun! */ \ No newline at end of file +/*Style your own assignment! This is fun! */ + diff --git a/public/index.html b/public/index.html index 581b2049..c6265615 100755 --- a/public/index.html +++ b/public/index.html @@ -6,12 +6,14 @@
- +
+
+ Your Name +
@@ -67,9 +68,12 @@
+
- +
diff --git a/public/js/scripts.js b/public/js/scripts.js index de052eae..d2aba24b 100755 --- a/public/js/scripts.js +++ b/public/js/scripts.js @@ -1,3 +1,10 @@ // Add some Javascript code here, to run on the front end. -console.log("Welcome to assignment 2!") \ No newline at end of file +console.log("Welcome to assignment 2!") + +const days = [ + "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" +] +//.boardsection[data-board] +const nextButton = document.querySelector( '' ); +console.log(nextButton) \ No newline at end of file From 331abc2c3a903f8b3f4472ceedcbf3c1b0509227 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Sun, 8 Sep 2019 20:25:21 +0000 Subject: [PATCH 035/191] =?UTF-8?q?=F0=9F=8F=8C=F0=9F=9A=9E=20Checkpoint?= =?UTF-8?q?=20./public/js/scripts.js:6266626/233=20./public/index.html:626?= =?UTF-8?q?6626/167=20./public/css/style.css:6266626/393?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 15 +++++++++++++++ public/index.html | 5 ++++- public/js/scripts.js | 7 +++++-- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 6fe0bbf1..2f8c7946 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -31,6 +31,7 @@ body { border: 1px solid white; display: flex; flex-direction: column; + animation-name } .board[data-board] .tasklist { @@ -53,4 +54,18 @@ body { #next { left: 200px; +} + +@keyframes dailyTransition { + 0% { + translateX: -100%; + translateY: -100% + } + 50% { + translateX: 300%; + } + 100% { + translateY: 100%; + translateX: -200% + } } \ No newline at end of file diff --git a/public/index.html b/public/index.html index cb3662b9..c63ba76b 100755 --- a/public/index.html +++ b/public/index.html @@ -143,8 +143,11 @@ } window.onload = function() { - const button = document.querySelector( 'button' ) + const button = document.querySelector( '#submit' ) button.onclick = submit + + const nextButton = document.querySelector( '#next' ) + nextButton.onclick = nextAction } diff --git a/public/js/scripts.js b/public/js/scripts.js index d2aba24b..9cbf690d 100755 --- a/public/js/scripts.js +++ b/public/js/scripts.js @@ -6,5 +6,8 @@ const days = [ "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" ] //.boardsection[data-board] -const nextButton = document.querySelector( '' ); -console.log(nextButton) \ No newline at end of file +//const nextButton = document.querySelector( '#next' ); + +const nextAction = function() { + document.querySelector( '.boardsection' ).css('transform: 50%' ); +} \ No newline at end of file From f03ed7f2e5014ddb7fa9dad8208cc60048562e1e Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Sun, 8 Sep 2019 20:37:20 +0000 Subject: [PATCH 036/191] =?UTF-8?q?=F0=9F=99=8B=F0=9F=95=B9=20Checkpoint?= =?UTF-8?q?=20./public/css/style.css:6266626/1577?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 2f8c7946..8c9fdbf9 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -31,7 +31,8 @@ body { border: 1px solid white; display: flex; flex-direction: column; - animation-name + animation-name: next; + animation-duration: 2s; } .board[data-board] .tasklist { @@ -56,16 +57,22 @@ body { left: 200px; } -@keyframes dailyTransition { +@keyframes next { 0% { - translateX: -100%; - translateY: -100% + transform: translateX(-200%); + transform: translateX(-200%); + translateY: -100%; } 50% { translateX: 300%; } 100% { - translateY: 100%; - translateX: -200% + transform: translateX(-200%); + } +} + +@keyframes color { + 100% { + background-color: white; } } \ No newline at end of file From 276a12ca0e36e68bb5db715a6a5ea39819da2c91 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Sun, 8 Sep 2019 20:49:24 +0000 Subject: [PATCH 037/191] =?UTF-8?q?=F0=9F=8E=BA=F0=9F=92=97=20Checkpoint?= =?UTF-8?q?=20./public/css/style.css:6266626/1170?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 8c9fdbf9..7716c8a5 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -19,6 +19,7 @@ body { } .board { + overflow: hidden; display: flex; flex-direction: row; width: 98vw; @@ -31,8 +32,11 @@ body { border: 1px solid white; display: flex; flex-direction: column; - animation-name: next; - animation-duration: 2s; +} + +.boardsection:first-child{ + flex-direction: column; + animation: next 6s; } .board[data-board] .tasklist { @@ -58,21 +62,37 @@ body { } @keyframes next { - 0% { - transform: translateX(-200%); - transform: translateX(-200%); - translateY: -100%; + 10% { + transform: translateX(-150%); + } + 25% { + transform: translateY(-300%); } 50% { - translateX: 300%; + transform: translateX(1000%); + } + 75% { + transform: translateY(0%); } 100% { - transform: translateX(-200%); + transform: translateX(0%); } } -@keyframes color { +@keyframes nextbody { + 10% { + transform: translateX(0%; + } + 25% { + transform: translateY(-300%); + } + 50% { + transform: translateX(1000%); + } + 75% { + transform: translateY(0%); + } 100% { - background-color: white; + transform: translateX(0%); } } \ No newline at end of file From 10bc24f5360b2468e810d586ebe51a7e0a298c31 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Sun, 8 Sep 2019 21:01:31 +0000 Subject: [PATCH 038/191] =?UTF-8?q?=F0=9F=95=8D=F0=9F=8C=84=20Checkpoint?= =?UTF-8?q?=20./public/css/style.css:6266626/1473?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 28 ++++++++-------------------- 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 7716c8a5..f3edf040 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -32,11 +32,11 @@ body { border: 1px solid white; display: flex; flex-direction: column; + animation: nextbody 1s forwards; } .boardsection:first-child{ - flex-direction: column; - animation: next 6s; + animation: next 3s forwards; } .board[data-board] .tasklist { @@ -63,36 +63,24 @@ body { @keyframes next { 10% { - transform: translateX(-150%); + transform: translateX(-150%) translateY(0%); } 25% { - transform: translateY(-300%); + transform: translateX(-150%) translateY(-300%); } 50% { - transform: translateX(1000%); + transform: translateX(1000%) translateY(-300%); } 75% { - transform: translateY(0%); + transform: translateX(1000%) translateY(0%); } 100% { - transform: translateX(0%); + transform: translateX(600%) translateY(0%); } } @keyframes nextbody { - 10% { - transform: translateX(0%; - } - 25% { - transform: translateY(-300%); - } - 50% { - transform: translateX(1000%); - } - 75% { - transform: translateY(0%); - } 100% { - transform: translateX(0%); + transform: translateX(-100%) translateY(0%); } } \ No newline at end of file From 8d390643dc2dcdf457a77ff5985d665d49e22b3a Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Sun, 8 Sep 2019 21:13:29 +0000 Subject: [PATCH 039/191] =?UTF-8?q?=E2=98=94=EF=B8=8F=F0=9F=90=92=20Checkp?= =?UTF-8?q?oint=20./public/css/style.css:6266626/591=20./public/js/scripts?= =?UTF-8?q?.js:6266626/191?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 7 +++++-- public/js/scripts.js | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index f3edf040..9ae64e51 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -36,7 +36,7 @@ body { } .boardsection:first-child{ - animation: next 3s forwards; + animation: next 1s forwards; } .board[data-board] .tasklist { @@ -62,7 +62,7 @@ body { } @keyframes next { - 10% { + 20% { transform: translateX(-150%) translateY(0%); } 25% { @@ -80,6 +80,9 @@ body { } @keyframes nextbody { + 0% { + transform: translateX(0%) translateY(0%); + } 100% { transform: translateX(-100%) translateY(0%); } diff --git a/public/js/scripts.js b/public/js/scripts.js index 9cbf690d..dcd7c57d 100755 --- a/public/js/scripts.js +++ b/public/js/scripts.js @@ -9,5 +9,6 @@ const days = [ //const nextButton = document.querySelector( '#next' ); const nextAction = function() { - document.querySelector( '.boardsection' ).css('transform: 50%' ); -} \ No newline at end of file + document.querySelector( '.boardsection' ).css(); +} + From f6964d2f56366943713c08fe044d4bfeabb71f3b Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Sun, 8 Sep 2019 21:25:31 +0000 Subject: [PATCH 040/191] =?UTF-8?q?=F0=9F=8C=84=F0=9F=93=AE=20Checkpoint?= =?UTF-8?q?=20./public/js/scripts.js:6266626/381=20./public/index.html:626?= =?UTF-8?q?6626/107?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 14 +++++++------- public/js/scripts.js | 8 ++++++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/public/index.html b/public/index.html index c63ba76b..18f13640 100755 --- a/public/index.html +++ b/public/index.html @@ -11,7 +11,7 @@ Daily Schedule
-
+
Sunday
@@ -19,7 +19,7 @@ thing
-
+
Monday
@@ -27,7 +27,7 @@ thing
-
+
Tuesday
@@ -35,7 +35,7 @@ thing
-
+
Wednesday
@@ -43,7 +43,7 @@ thing
-
+
Thursday
@@ -51,7 +51,7 @@ thing
-
+
Friday
@@ -59,7 +59,7 @@ thing
-
+
Saturday
diff --git a/public/js/scripts.js b/public/js/scripts.js index dcd7c57d..32106a81 100755 --- a/public/js/scripts.js +++ b/public/js/scripts.js @@ -8,7 +8,11 @@ const days = [ //.boardsection[data-board] //const nextButton = document.querySelector( '#next' ); -const nextAction = function() { - document.querySelector( '.boardsection' ).css(); +const nextAction = function(num) { + var day = document.querySelector( '.boardsection[data-board=day_' + num + ']' ); + var body = document.querySelector( ':not(.boardsection[data-board=day_' + num + '])' ); + day.animate('next', '1s', 'forwards'); + body.animate('nextbody', '1s', 'forwards'); + } From 7d5f3f96fb856f25f35f67b6e3a47441957b6de2 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Sun, 8 Sep 2019 21:37:25 +0000 Subject: [PATCH 041/191] =?UTF-8?q?=F0=9F=90=9A=F0=9F=8F=99=20Checkpoint?= =?UTF-8?q?=20./public/js/scripts.js:6266626/681=20./public/index.html:626?= =?UTF-8?q?6626/214?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/js/scripts.js | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/public/js/scripts.js b/public/js/scripts.js index 32106a81..9a94109d 100755 --- a/public/js/scripts.js +++ b/public/js/scripts.js @@ -9,10 +9,30 @@ const days = [ //const nextButton = document.querySelector( '#next' ); const nextAction = function(num) { + alert("Hello") var day = document.querySelector( '.boardsection[data-board=day_' + num + ']' ); var body = document.querySelector( ':not(.boardsection[data-board=day_' + num + '])' ); - day.animate('next', '1s', 'forwards'); + day.animate([ + + ],{ + duration: 1, + + }, + 'forwards'); body.animate('nextbody', '1s', 'forwards'); } + +/* + +document.getElementById("tunnel").animate([ + // keyframes + { transform: 'translateY(0px)' }, + { transform: 'translateY(-300px)' } +], { + // timing options + duration: 1000, + iterations: Infinity +}) +*/ \ No newline at end of file From 2b581da8562506bdfdf4ec282bd0394fe19c2eb8 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Sun, 8 Sep 2019 21:48:34 +0000 Subject: [PATCH 042/191] =?UTF-8?q?=F0=9F=97=83=F0=9F=98=84=20Checkpoint?= =?UTF-8?q?=20./public/js/scripts.js:6266626/700=20./public/css/style.css:?= =?UTF-8?q?6266626/96=20./public/index.html:6266626/276?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 5 ----- public/index.html | 6 +----- public/js/scripts.js | 26 +++++++++++++------------- 3 files changed, 14 insertions(+), 23 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 9ae64e51..93ae4be2 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -32,11 +32,6 @@ body { border: 1px solid white; display: flex; flex-direction: column; - animation: nextbody 1s forwards; -} - -.boardsection:first-child{ - animation: next 1s forwards; } .board[data-board] .tasklist { diff --git a/public/index.html b/public/index.html index 18f13640..554d6284 100755 --- a/public/index.html +++ b/public/index.html @@ -4,7 +4,6 @@ CS4241 Assignment 2 -
@@ -77,11 +76,8 @@ - +
diff --git a/public/js/scripts.js b/public/js/scripts.js index a5c4ed8a..16e98d4d 100755 --- a/public/js/scripts.js +++ b/public/js/scripts.js @@ -7,12 +7,14 @@ const days = [ ]; */ - - $('#next').on('click', function() { - alert("Hello"); - $(".boardsection[data-board='day_1']").css({animation: "body 1s forwards"}); +$(document).ready(function () { + $("#next").on('click', function() { + $(".boardsection[data-board='day_0']").css({animation: "next 1s forwards"}); + $("(.boardsection[data-board])").css({animation: "next 1s forwards"}); + //$(':not(.boardsection[data-board=day_' + num + '])').css({animation: "body 1s forwards"}); }) +}) From 1170a79400a48dc09f33eefc6ec946a56fe04097 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Sun, 8 Sep 2019 22:24:29 +0000 Subject: [PATCH 045/191] =?UTF-8?q?=F0=9F=90=9C=F0=9F=98=8B=20Checkpoint?= =?UTF-8?q?=20./public/js/scripts.js:6266626/1100=20./public/index.html:62?= =?UTF-8?q?66626/93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 2 -- public/js/scripts.js | 9 ++++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/public/index.html b/public/index.html index 931640e0..9ba9b054 100755 --- a/public/index.html +++ b/public/index.html @@ -143,8 +143,6 @@ const button = document.querySelector( '#submit' ) button.onclick = submit - const nextButton = document.querySelector( '#next' ) - nextButton.onclick = nextAction } diff --git a/public/js/scripts.js b/public/js/scripts.js index 16e98d4d..f3475e41 100755 --- a/public/js/scripts.js +++ b/public/js/scripts.js @@ -9,11 +9,14 @@ const days = [ $(document).ready(function () { $("#next").on('click', function() { + $(".boardsection[data-board]").css({animation: "nextbody 1s forwards"}); $(".boardsection[data-board='day_0']").css({animation: "next 1s forwards"}); - $("(.boardsection[data-board])").css({animation: "next 1s forwards"}); - - //$(':not(.boardsection[data-board=day_' + num + '])').css({animation: "body 1s forwards"}); }) + $(".boardsection[data-board]").on('animationEnd', function() { + + console.log($(this).order); + }) + }) From 8b70c7dc1d1e7e4f0ebfa5e21a470e8474ca6718 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Sun, 8 Sep 2019 22:36:32 +0000 Subject: [PATCH 046/191] =?UTF-8?q?=F0=9F=90=83=F0=9F=91=93=20Checkpoint?= =?UTF-8?q?=20./public/js/scripts.js:6266626/1271=20./public/css/style.css?= =?UTF-8?q?:6266626/1169=20./public/index.html:6266626/14?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 49 ++++++++++++++++++++++++++++++++++++++++++++ public/index.html | 14 ++++++------- public/js/scripts.js | 16 ++++++++------- 3 files changed, 65 insertions(+), 14 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 93ae4be2..799b0d32 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -33,6 +33,55 @@ body { display: flex; flex-direction: column; } +.boardsection:nth-child(1){ + width: 15%; + border: 1px solid white; + display: flex; + flex-direction: column; + order:1; +} +.boardsection:nth-child(2){ + width: 15%; + border: 1px solid white; + display: flex; + flex-direction: column; + order:2; +} +.boardsection:nth-child(3){ + width: 15%; + border: 1px solid white; + display: flex; + flex-direction: column; + order:3; +} +.boardsection:nth-child(4){ + width: 15%; + border: 1px solid white; + display: flex; + flex-direction: column; + order:4; +} +.boardsection:nth-child(5){ + width: 15%; + border: 1px solid white; + display: flex; + flex-direction: column; + order:5; +} +.boardsection:nth-child(6){ + width: 15%; + border: 1px solid white; + display: flex; + flex-direction: column; + order:6; +} +.boardsection:nth-child(7){ + width: 15%; + border: 1px solid white; + display: flex; + flex-direction: column; + order:7; +} .board[data-board] .tasklist { width:100%; diff --git a/public/index.html b/public/index.html index 9ba9b054..3d6d06d4 100755 --- a/public/index.html +++ b/public/index.html @@ -11,7 +11,7 @@ Daily Schedule
-
+
Sunday
@@ -19,7 +19,7 @@ thing
-
+
Monday
@@ -27,7 +27,7 @@ thing
-
+
Tuesday
@@ -35,7 +35,7 @@ thing
-
+
Wednesday
@@ -43,7 +43,7 @@ thing
-
+
Thursday
@@ -51,7 +51,7 @@ thing
-
+
Friday
@@ -59,7 +59,7 @@ thing
-
+
Saturday
diff --git a/public/js/scripts.js b/public/js/scripts.js index f3475e41..cc9fb1f1 100755 --- a/public/js/scripts.js +++ b/public/js/scripts.js @@ -9,17 +9,19 @@ const days = [ $(document).ready(function () { $("#next").on('click', function() { - $(".boardsection[data-board]").css({animation: "nextbody 1s forwards"}); - $(".boardsection[data-board='day_0']").css({animation: "next 1s forwards"}); + var tests = $('.boardsection[data]'); + tests.first().insertAfter(tests.last()); + //$(".boardsection[data-board]").css({animation: "nextbody 1s forwards"}); + //$(".boardsection[data-board='day_0']").css({animation: "next 1s forwards"}); + $(".boardsection[data-board='day_1']").css({ + 'order': "1" + }); + console.log($(".boardsection[data-board='day_1']").order) }) - $(".boardsection[data-board]").on('animationEnd', function() { - - console.log($(this).order); - }) - }) +// /$(".boardsection[data-board]").style.order + 1 > 7 ? 7 : $(".boardsection[data-board]").style.order + 1 From 1832c293c35992c10e4bc0dc80a427bbfab445b6 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Sun, 8 Sep 2019 22:48:25 +0000 Subject: [PATCH 047/191] =?UTF-8?q?=F0=9F=8E=BE=F0=9F=8C=84=20Checkpoint?= =?UTF-8?q?=20./public/js/scripts.js:6266626/667=20./public/css/style.css:?= =?UTF-8?q?6266626/545?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 14 ++++++++++++-- public/js/scripts.js | 15 ++++++++------- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 799b0d32..82a0b107 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -105,7 +105,7 @@ body { left: 200px; } -@keyframes next { +@keyframes next-dep { 20% { transform: translateX(-150%) translateY(0%); } @@ -119,7 +119,17 @@ body { transform: translateX(1000%) translateY(0%); } 100% { - transform: translateX(600%) translateY(0%); + transform: translateX(500%) translateY(0%); + } +} + +@keyframes next { + 0% { + transform: translateX(150%) translateY(0%); + } + + 100% { + transform: translateX(-100%) translateY(0%); } } diff --git a/public/js/scripts.js b/public/js/scripts.js index cc9fb1f1..b66a3af7 100755 --- a/public/js/scripts.js +++ b/public/js/scripts.js @@ -9,14 +9,15 @@ const days = [ $(document).ready(function () { $("#next").on('click', function() { - var tests = $('.boardsection[data]'); - tests.first().insertAfter(tests.last()); //$(".boardsection[data-board]").css({animation: "nextbody 1s forwards"}); - //$(".boardsection[data-board='day_0']").css({animation: "next 1s forwards"}); - $(".boardsection[data-board='day_1']").css({ - 'order': "1" - }); - console.log($(".boardsection[data-board='day_1']").order) + $(".boardsection[data-board]:first-child").css({animation: "next 1s forwards"}); + var sections = $('.boardsection[data-board]'); + sections.first().insertAfter(sections.last()).animate({ + + }, 'slow'); + //$(".boardsection[data-board='day_1']").css({ + // 'order': "1" + //}); }) }) From 4712b9d547421bb29629b76307378a354cddeb82 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Sun, 8 Sep 2019 22:59:30 +0000 Subject: [PATCH 048/191] =?UTF-8?q?=F0=9F=8F=9D=F0=9F=8D=A2=20Checkpoint?= =?UTF-8?q?=20./public/js/scripts.js:6266626/1215=20./public/css/style.css?= =?UTF-8?q?:6266626/11?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 4 ++-- public/js/scripts.js | 13 +++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 82a0b107..af2c3110 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -125,11 +125,11 @@ body { @keyframes next { 0% { - transform: translateX(150%) translateY(0%); + transform: translateX(300%) translateY(0%); } 100% { - transform: translateX(-100%) translateY(0%); + transform: translateX(200%) translateY(0%); } } diff --git a/public/js/scripts.js b/public/js/scripts.js index b66a3af7..0475d0c3 100755 --- a/public/js/scripts.js +++ b/public/js/scripts.js @@ -10,14 +10,19 @@ const days = [ $(document).ready(function () { $("#next").on('click', function() { //$(".boardsection[data-board]").css({animation: "nextbody 1s forwards"}); - $(".boardsection[data-board]:first-child").css({animation: "next 1s forwards"}); + //$(".boardsection[data-board]:first-child").css({animation: "next 1s forwards"}); var sections = $('.boardsection[data-board]'); - sections.first().insertAfter(sections.last()).animate({ - - }, 'slow'); + sections.css({ + animation: "nextbody 1s forwards" + }); + $.when( sections ).done( function() { + console.log( 'Task finished.' ); +} ); + sections.promise().done.first().insertAfter(sections.last()); //$(".boardsection[data-board='day_1']").css({ // 'order': "1" //}); + }) }) From fb4e900cc65e395058d1f1297e54c6176edb5e59 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Sun, 8 Sep 2019 23:11:30 +0000 Subject: [PATCH 049/191] =?UTF-8?q?=F0=9F=92=8B=F0=9F=9B=B3=20Checkpoint?= =?UTF-8?q?=20./public/js/scripts.js:6266626/1603=20./public/css/style.css?= =?UTF-8?q?:6266626/28?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 4 ++-- public/js/scripts.js | 17 +++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index af2c3110..29cbfae1 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -125,11 +125,11 @@ body { @keyframes next { 0% { - transform: translateX(300%) translateY(0%); + transform: translateX(100%) translateY(0%); } 100% { - transform: translateX(200%) translateY(0%); + transform: translateX(0%) translateY(0%); } } diff --git a/public/js/scripts.js b/public/js/scripts.js index 0475d0c3..804ece28 100755 --- a/public/js/scripts.js +++ b/public/js/scripts.js @@ -10,15 +10,16 @@ const days = [ $(document).ready(function () { $("#next").on('click', function() { //$(".boardsection[data-board]").css({animation: "nextbody 1s forwards"}); - //$(".boardsection[data-board]:first-child").css({animation: "next 1s forwards"}); var sections = $('.boardsection[data-board]'); - sections.css({ - animation: "nextbody 1s forwards" - }); - $.when( sections ).done( function() { - console.log( 'Task finished.' ); -} ); - sections.promise().done.first().insertAfter(sections.last()); + sections.first().insertAfter(sections.last()); + $(".boardsection[data-board]:first-child").css({animation: "next 1s"}); + $(".boardsection[data-board]:nth-child(2)").css({animation: "next 1s"}); + $(".boardsection[data-board]:nth-child(3)").css({animation: "next 1s"}); + $(".boardsection[data-board]:nth-child(4)").css({animation: "next 1s"}); + $(".boardsection[data-board]:nth-child(5)").css({animation: "next 1s"}); + $(".boardsection[data-board]:nth-child(6)").css({animation: "next 1s"}); + $(".boardsection[data-board]:last-child").css({animation: "next 1s"}); + //$(".boardsection[data-board='day_1']").css({ // 'order': "1" //}); From 91cf707260e7006b537e61d3ffceb6efbe9a4089 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Sun, 8 Sep 2019 23:23:29 +0000 Subject: [PATCH 050/191] =?UTF-8?q?=E2=9B=84=EF=B8=8F=F0=9F=99=8D=20Checkp?= =?UTF-8?q?oint=20./public/js/scripts.js:6266626/2223=20./public/css/style?= =?UTF-8?q?.css:6266626/527?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 29 ++------------------- public/js/scripts.js | 62 +++----------------------------------------- 2 files changed, 6 insertions(+), 85 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 29cbfae1..fff903cf 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -105,39 +105,14 @@ body { left: 200px; } -@keyframes next-dep { - 20% { - transform: translateX(-150%) translateY(0%); - } - 25% { - transform: translateX(-150%) translateY(-300%); - } - 50% { - transform: translateX(1000%) translateY(-300%); - } - 75% { - transform: translateX(1000%) translateY(0%); - } - 100% { - transform: translateX(500%) translateY(0%); - } -} - @keyframes next { 0% { - transform: translateX(100%) translateY(0%); + transform: translateX(100%) } 100% { - transform: translateX(0%) translateY(0%); + transform: translateX(0%) } } -@keyframes nextbody { - 0% { - transform: translateX(0%) translateY(0%); - } - 100% { - transform: translateX(-100%) translateY(0%); - } } \ No newline at end of file diff --git a/public/js/scripts.js b/public/js/scripts.js index 804ece28..5d5a0d71 100755 --- a/public/js/scripts.js +++ b/public/js/scripts.js @@ -1,66 +1,12 @@ -// Add some Javascript code here, to run on the front end. -/* console.log("Welcome to assignment 2!") -const days = [ - "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" -]; -*/ $(document).ready(function () { - $("#next").on('click', function() { - //$(".boardsection[data-board]").css({animation: "nextbody 1s forwards"}); + $(document).on('click', "#next", function() { var sections = $('.boardsection[data-board]'); - sections.first().insertAfter(sections.last()); - $(".boardsection[data-board]:first-child").css({animation: "next 1s"}); - $(".boardsection[data-board]:nth-child(2)").css({animation: "next 1s"}); - $(".boardsection[data-board]:nth-child(3)").css({animation: "next 1s"}); - $(".boardsection[data-board]:nth-child(4)").css({animation: "next 1s"}); - $(".boardsection[data-board]:nth-child(5)").css({animation: "next 1s"}); - $(".boardsection[data-board]:nth-child(6)").css({animation: "next 1s"}); - $(".boardsection[data-board]:last-child").css({animation: "next 1s"}); + $(".boardsection[data-board]:first-child").css({animation: "next 1s forwards"}); - //$(".boardsection[data-board='day_1']").css({ - // 'order': "1" - //}); - + sections.first().insertAfter(sections.last()); + $(".boardsection[data-board]").css({animation: "next 1s forwards"}); }) }) - - -// /$(".boardsection[data-board]").style.order + 1 > 7 ? 7 : $(".boardsection[data-board]").style.order + 1 - - - -//.boardsection[data-board] -//const nextButton = document.querySelector( '#next' ); -/* -const nextAction = function() { - var num = 0; - var day = document.getElementById( '.boardsection[data-board=day_' + num + ']' ); - var body = document.getElementById( ':not(.boardsection[data-board=day_' + num + '])' ); - - //day.style.color = "blue"; - body.css({animation: "nextbody 1s forwards"}) -*/ - //day.style.animation = "next 1s forwards"; - //body.css({animation: "nextbody 1s forwards"}); - - - -//animation: nextbody 1s forwards; -//animation: next 1s forwards; - - -/* - -document.getElementById("tunnel").animate([ - // keyframes - { transform: 'translateY(0px)' }, - { transform: 'translateY(-300px)' } -], { - // timing options - duration: 1000, - iterations: Infinity -}) -*/ \ No newline at end of file From 08d37ae54a253cc449f0af75a6ac3253b0227822 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Sun, 8 Sep 2019 23:35:28 +0000 Subject: [PATCH 051/191] =?UTF-8?q?=F0=9F=8E=87=F0=9F=8F=95=20Checkpoint?= =?UTF-8?q?=20./public/css/style.css:6266626/1334=20./public/js/scripts.js?= =?UTF-8?q?:6266626/367=20./public/index.html:6266626/156?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 55 +++++--------------------------------------- public/index.html | 16 +++++++------ public/js/scripts.js | 4 +--- 3 files changed, 16 insertions(+), 59 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index fff903cf..9dde2546 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -33,55 +33,7 @@ body { display: flex; flex-direction: column; } -.boardsection:nth-child(1){ - width: 15%; - border: 1px solid white; - display: flex; - flex-direction: column; - order:1; -} -.boardsection:nth-child(2){ - width: 15%; - border: 1px solid white; - display: flex; - flex-direction: column; - order:2; -} -.boardsection:nth-child(3){ - width: 15%; - border: 1px solid white; - display: flex; - flex-direction: column; - order:3; -} -.boardsection:nth-child(4){ - width: 15%; - border: 1px solid white; - display: flex; - flex-direction: column; - order:4; -} -.boardsection:nth-child(5){ - width: 15%; - border: 1px solid white; - display: flex; - flex-direction: column; - order:5; -} -.boardsection:nth-child(6){ - width: 15%; - border: 1px solid white; - display: flex; - flex-direction: column; - order:6; -} -.boardsection:nth-child(7){ - width: 15%; - border: 1px solid white; - display: flex; - flex-direction: column; - order:7; -} + .board[data-board] .tasklist { width:100%; @@ -102,6 +54,11 @@ body { } #next { + font-size: 30px; + margin-top: .5em; + margin-bottom: .5em; + height: 2em; + width: 50vw; left: 200px; } diff --git a/public/index.html b/public/index.html index 3d6d06d4..66c99b78 100755 --- a/public/index.html +++ b/public/index.html @@ -68,13 +68,15 @@
- -
- - -
+ diff --git a/public/js/scripts.js b/public/js/scripts.js index 5d5a0d71..17fcbf7a 100755 --- a/public/js/scripts.js +++ b/public/js/scripts.js @@ -4,9 +4,7 @@ console.log("Welcome to assignment 2!") $(document).ready(function () { $(document).on('click', "#next", function() { var sections = $('.boardsection[data-board]'); - $(".boardsection[data-board]:first-child").css({animation: "next 1s forwards"}); - sections.first().insertAfter(sections.last()); - $(".boardsection[data-board]").css({animation: "next 1s forwards"}); + sections.css({animation: "next 1s 1"}); }) }) From 7840c848da59408db02282e7d163ceafb50d80d2 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Sun, 8 Sep 2019 23:47:27 +0000 Subject: [PATCH 052/191] =?UTF-8?q?=F0=9F=90=95=F0=9F=8E=A0=20Checkpoint?= =?UTF-8?q?=20./public/css/style.css:6266626/560=20./public/index.html:626?= =?UTF-8?q?6626/785?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 11 ++++++++--- public/index.html | 37 ++++++++++++++++++++++--------------- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 9dde2546..7c79e5e6 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -3,7 +3,6 @@ body { background: #5A5959; font-family: 'Calibri', sans-serif; - } .title { @@ -53,10 +52,16 @@ body { align-items:center; } +.menu { + display: flex; + flex-direction: row; + justify-content: space-around; + margin: 2em; +} + + #next { font-size: 30px; - margin-top: .5em; - margin-bottom: .5em; height: 2em; width: 50vw; left: 200px; diff --git a/public/index.html b/public/index.html index 66c99b78..47962e97 100755 --- a/public/index.html +++ b/public/index.html @@ -12,58 +12,58 @@
-
+
Sunday
-
+
thing
-
+
Monday
-
+
thing
-
+
Tuesday
-
+
thing
-
+
Wednesday
-
+
thing
-
+
Thursday
-
+
thing
-
+
Friday
-
+
thing
-
+
Saturday
-
+
thing
@@ -72,8 +72,15 @@ + Add to Schedule:
- + Day: + + Task: + + Time: + +
From 89d86533858e0c8c9fe0c4a4b29225443293ad96 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Sun, 8 Sep 2019 23:59:28 +0000 Subject: [PATCH 053/191] =?UTF-8?q?=F0=9F=9A=8F=F0=9F=8E=93=20Checkpoint?= =?UTF-8?q?=20./public/index.html:6266626/359=20./public/css/style.css:626?= =?UTF-8?q?6626/1106?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 22 +++++++++++++++------- public/index.html | 9 ++++----- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 7c79e5e6..ef663d3f 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -54,19 +54,27 @@ body { .menu { display: flex; - flex-direction: row; - justify-content: space-around; - margin: 2em; + + justify-content: space-evenly; + margin-top: 2em; + width: 98vw; } +button { + font-size: 25px; +} #next { - font-size: 30px; - height: 2em; - width: 50vw; - left: 200px; + width: 30vw; } +#submit { + margin-left: 2em; + width: 40vw; +} + + + @keyframes next { 0% { transform: translateX(100%) diff --git a/public/index.html b/public/index.html index 47962e97..d1a0c7e0 100755 --- a/public/index.html +++ b/public/index.html @@ -72,16 +72,15 @@ - Add to Schedule:
Day: - + Task: - + Time: - + - +
From 731b5d29fbe5aa5954526f9e9dc4eb94fb6170b2 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Mon, 9 Sep 2019 00:11:32 +0000 Subject: [PATCH 054/191] =?UTF-8?q?=F0=9F=8C=BD=F0=9F=9B=8B=20Checkpoint?= =?UTF-8?q?=20./public/css/style.css:6266626/492=20./public/index.html:626?= =?UTF-8?q?6626/449?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 15 ++++++++++++--- public/index.html | 14 ++++++++------ 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index ef663d3f..9d03dd26 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -54,22 +54,31 @@ body { .menu { display: flex; - - justify-content: space-evenly; + flex-direction: row; + align-content: space-evenly; margin-top: 2em; width: 98vw; } +.menu-data { + background-color: black; + color: white; +} + button { font-size: 25px; } +form { + margin-left: 2em; + +} + #next { width: 30vw; } #submit { - margin-left: 2em; width: 40vw; } diff --git a/public/index.html b/public/index.html index d1a0c7e0..8aba3456 100755 --- a/public/index.html +++ b/public/index.html @@ -73,12 +73,14 @@ Next Day
- Day: - - Task: - - Time: - +
From 54db113ddee02fcfbd198fd5fab6953504a7f0e0 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Mon, 9 Sep 2019 00:23:27 +0000 Subject: [PATCH 055/191] =?UTF-8?q?=F0=9F=8F=8C=F0=9F=9B=A2=20Checkpoint?= =?UTF-8?q?=20./public/css/style.css:6266626/402?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 9d03dd26..c6f2c3a6 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -55,31 +55,28 @@ body { .menu { display: flex; flex-direction: row; - align-content: space-evenly; - margin-top: 2em; + justify-content: space-between; + margin-top: 1em; + height: 10vmin; width: 98vw; } .menu-data { - background-color: black; + padding-bottom: .25em; color: white; } button { font-size: 25px; -} - -form { - margin-left: 2em; - + border-radius: 5px; } #next { - width: 30vw; + width: 40vw; } #submit { - width: 40vw; + width: 55vw; } From 946410e5817ae6a16a8effdcb22ef7a7699a6651 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Mon, 9 Sep 2019 00:35:28 +0000 Subject: [PATCH 056/191] =?UTF-8?q?=E2=AD=90=EF=B8=8F=F0=9F=8D=A6=20Checkp?= =?UTF-8?q?oint=20./public/js/scripts.js:6266626/1172=20./public/css/style?= =?UTF-8?q?.css:6266626/322?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 7 +++++++ public/js/scripts.js | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/public/css/style.css b/public/css/style.css index c6f2c3a6..f2727d04 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -62,6 +62,10 @@ body { } .menu-data { + display: flex; + flex-direction: row; + justify-content: space-evenly; + align-items: flex-end; padding-bottom: .25em; color: white; } @@ -69,6 +73,9 @@ body { button { font-size: 25px; border-radius: 5px; + border-width: 0; + background-color: #1C1C1D; + color: white; } #next { diff --git a/public/js/scripts.js b/public/js/scripts.js index 17fcbf7a..c0e696d4 100755 --- a/public/js/scripts.js +++ b/public/js/scripts.js @@ -7,4 +7,11 @@ $(document).ready(function () { sections.first().insertAfter(sections.last()); sections.css({animation: "next 1s 1"}); }) + $('button').hover( function() { + $(this).css({'background-color':'#D6DADA'}) + $(this).css({'color':'#1C1C1D'}) + }, function () { + $(this).css({'background-color':'#1C1C1D'}) + $(this).css({'color':'#1C1C1D'}) + }) }) From c13345bfd0ee77a487d9ed42c8788c083e88c72c Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Mon, 9 Sep 2019 00:47:24 +0000 Subject: [PATCH 057/191] =?UTF-8?q?=F0=9F=9A=94=F0=9F=8E=92=20Checkpoint?= =?UTF-8?q?=20./public/js/scripts.js:6266626/50=20./public/css/style.css:6?= =?UTF-8?q?266626/607?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 17 +++++++++-------- public/js/scripts.js | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index f2727d04..f0c8ce89 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -18,6 +18,7 @@ body { } .board { + border: .5px solid #CDD0D0; overflow: hidden; display: flex; flex-direction: row; @@ -26,15 +27,16 @@ body { background: #1C1C1D; } -.boardsection{ +.boardsection { width: 15%; - border: 1px solid white; display: flex; flex-direction: column; + border-right: .5px solid #CDD0D0; + } -.board[data-board] .tasklist { +.boardsection[data-board] .tasklist { width:100%; color: white; padding-top: .5em; @@ -42,14 +44,13 @@ body { padding-left: .25em; } -.board[data-board] .header { +.boardsection[data-board] .header { color: white; text-align: center; background-color: grey; - padding-top: 1em; - padding-bottom: 1em; - justify-content: center; - align-items:center; + padding-top: .75em; + padding-bottom: .75em; + } .menu { diff --git a/public/js/scripts.js b/public/js/scripts.js index c0e696d4..66d53bc4 100755 --- a/public/js/scripts.js +++ b/public/js/scripts.js @@ -12,6 +12,6 @@ $(document).ready(function () { $(this).css({'color':'#1C1C1D'}) }, function () { $(this).css({'background-color':'#1C1C1D'}) - $(this).css({'color':'#1C1C1D'}) + $(this).css({'color':'white'}) }) }) From ce5c51f2d5059fa7d077beb74010a117264982d1 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Mon, 9 Sep 2019 00:58:28 +0000 Subject: [PATCH 058/191] =?UTF-8?q?=F0=9F=9A=9D=F0=9F=90=A2=20Checkpoint?= =?UTF-8?q?=20./public/css/style.css:6266626/466=20./public/index.html:626?= =?UTF-8?q?6626/7=20./server.improved.js:6266626/320?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 13 ++++++++++--- public/index.html | 2 +- server.improved.js | 14 +++++++------- 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index f0c8ce89..66604d1c 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -18,7 +18,6 @@ body { } .board { - border: .5px solid #CDD0D0; overflow: hidden; display: flex; flex-direction: row; @@ -31,7 +30,14 @@ body { width: 15%; display: flex; flex-direction: column; - border-right: .5px solid #CDD0D0; + border: 1px solid #CDD0D0; +} + +.boardsection:first-child { + border-right: 5px solid white; + + border-left: 5px solid white; + border-right: 5px solid white; } @@ -42,6 +48,7 @@ body { padding-top: .5em; padding-bottom: .5em; padding-left: .25em; + } .boardsection[data-board] .header { @@ -67,7 +74,7 @@ body { flex-direction: row; justify-content: space-evenly; align-items: flex-end; - padding-bottom: .25em; + padding-bottom: .5em; color: white; } diff --git a/public/index.html b/public/index.html index 8aba3456..a2eca4b1 100755 --- a/public/index.html +++ b/public/index.html @@ -75,7 +75,7 @@
- thing +
@@ -32,7 +32,7 @@ Tuesday
- thing +
@@ -40,7 +40,7 @@ Wednesday
- thing +
@@ -133,7 +133,7 @@ return false } - const occupyText = function() { + const occupySchedule = function() { fetch( '/information' ) .then( function( response ) { console.log( response ) @@ -142,28 +142,40 @@ .then( function( myJSON ) { var info = myJSON.data answer.innerHTML = info[1].value - + console.log( info[1] ) console.log( JSON.stringify( myJSON ) ) }) } + + const addEvent = function(e) { + e.preventDefault(); + var newEvent = { + day : document.querySelector("#day").value, + task : document.querySelector("#task").value, + time : document.querySelector("#time").value, + }; + var newEventInfo = JSON.stringify( newEvent ); + fetch('/submit',{ + method: 'POST', + body + }).then( function( response ) { + document.querySelector( document.querySelector("#day").value ).appendChild(document.querySelector("#task").value) + + document.querySelector("#day").value = ''; + document.querySelector("#task").value = ''; + document.querySelector("#time").value = ''; + }) window.onload = function() { + occupySchedule() + const button = document.querySelector( '#submit' ) button.onclick = submit - } - const addEvent = function(e) { - e.preventDefault(); - var newEvent = { - day : document.querySelector("#day").value, - task : document.querySelector("#task").value, - time : document.querySelector("#time").value, - }; - - var eventInfo = JSON.stringi + From 38ae768b2db95950bd4d850038c17fe4e818fc0b Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Mon, 9 Sep 2019 01:33:26 +0000 Subject: [PATCH 061/191] =?UTF-8?q?=F0=9F=90=91=E2=8F=B3=20Checkpoint=20./?= =?UTF-8?q?public/index.html:6266626/565=20./server.improved.js:6266626/49?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 30 +++++++++++++++++------------- server.improved.js | 2 +- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/public/index.html b/public/index.html index 5fa2d438..eed71140 100755 --- a/public/index.html +++ b/public/index.html @@ -16,7 +16,7 @@ Sunday
- thing +
@@ -48,7 +48,7 @@ Thursday
- thing +
@@ -56,7 +56,7 @@ Friday
- thing +
@@ -64,7 +64,7 @@ Saturday
- thing +
@@ -75,9 +75,9 @@ @@ -112,9 +112,7 @@ console.log( response ) //occupyText() - - - /* + fetch(url) .then(function( response ) { //response.json(); @@ -125,7 +123,7 @@ //answer.innerHTML = data //console.log(info) }); - */ + }) @@ -134,13 +132,14 @@ } const occupySchedule = function() { - fetch( '/information' ) + fetch( '/info' ) .then( function( response ) { console.log( response ) return response.json() }) .then( function( myJSON ) { var info = myJSON.data + document.querySelector(".data") answer.innerHTML = info[1].value @@ -151,6 +150,11 @@ const addEvent = function(e) { e.preventDefault(); + var day = document.querySelector("#day").value + var task = document.querySelector("#task").value + var time = document.querySelector("#time").value + console.log("Day: " + day + " Time: " + time + " Task: "+ task); + var newEvent = { day : document.querySelector("#day").value, task : document.querySelector("#task").value, @@ -161,7 +165,7 @@ method: 'POST', body }).then( function( response ) { - document.querySelector( document.querySelector("#day").value ).appendChild(document.querySelector("#task").value) + document.querySelector( day ).appendChild( time + " " + task ); document.querySelector("#day").value = ''; document.querySelector("#task").value = ''; @@ -172,7 +176,7 @@ occupySchedule() const button = document.querySelector( '#submit' ) - button.onclick = submit + button.onclick = addEvent } diff --git a/server.improved.js b/server.improved.js index 39055269..07ed922e 100644 --- a/server.improved.js +++ b/server.improved.js @@ -30,7 +30,7 @@ const handleGet = function( request, response ) { if( request.url === '/' ) { sendFile( response, 'public/index.html' ) - } else if( request.url === '/information') { + } else if( request.url === '/info') { sendData( response, data ) } else{ sendFile( response, filename ) From 2c1fc106ff0954538fc742607d11843f83988673 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Mon, 9 Sep 2019 01:45:24 +0000 Subject: [PATCH 062/191] =?UTF-8?q?=F0=9F=8D=A5=F0=9F=9A=9E=20Checkpoint?= =?UTF-8?q?=20./public/index.html:6266626/692?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/public/index.html b/public/index.html index eed71140..fdd1a228 100755 --- a/public/index.html +++ b/public/index.html @@ -6,7 +6,7 @@ - +
Daily Schedule
@@ -79,7 +79,7 @@ Task: Time: - +
@@ -132,6 +132,7 @@ } const occupySchedule = function() { + alert("Running"); fetch( '/info' ) .then( function( response ) { console.log( response ) @@ -139,8 +140,9 @@ }) .then( function( myJSON ) { var info = myJSON.data - document.querySelector(".data") - answer.innerHTML = info[1].value + var task = document.createTextNode(info[0].task) + document.querySelector("boardsection[data_board[day='1']") + //answer.innerHTML = info[1].value console.log( info[1] ) @@ -173,7 +175,6 @@ }) window.onload = function() { - occupySchedule() const button = document.querySelector( '#submit' ) button.onclick = addEvent From c5d627a0a6ca717296e3150270769f82ffecec61 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Mon, 9 Sep 2019 01:57:21 +0000 Subject: [PATCH 063/191] =?UTF-8?q?=F0=9F=8C=BD=F0=9F=8C=97=20Checkpoint?= =?UTF-8?q?=20./public/index.html:6266626/514=20./public/css/style.css:626?= =?UTF-8?q?6626/2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 2 +- public/index.html | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 46562270..4b25ac44 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -90,7 +90,7 @@ button { } #submit { - width: 55vw; + width: 50vw; } diff --git a/public/index.html b/public/index.html index fdd1a228..1ac3c905 100755 --- a/public/index.html +++ b/public/index.html @@ -140,8 +140,11 @@ }) .then( function( myJSON ) { var info = myJSON.data - var task = document.createTextNode(info[0].task) - document.querySelector("boardsection[data_board[day='1']") + var textNode = document.createTextNode(info[0].task) + var dayCol = document.querySelector(".boardsection[data-board='day_1'] .tasklist") + dayCol.appendChild(textNode); + + //.appendChild(textnode); //answer.innerHTML = info[1].value @@ -183,8 +186,7 @@ - - + } From 062740cadb092f9cfca40ce169320444d9c7fc22 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Mon, 9 Sep 2019 02:09:22 +0000 Subject: [PATCH 064/191] =?UTF-8?q?=F0=9F=91=86=F0=9F=9A=85=20Checkpoint?= =?UTF-8?q?=20./public/index.html:6266626/1811=20./public/css/style.css:62?= =?UTF-8?q?66626/323?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 19 +++++++++---------- public/index.html | 37 ++++++++++++++++++++++++++++++------- 2 files changed, 39 insertions(+), 17 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 4b25ac44..ec864773 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -40,16 +40,6 @@ body { border-bottom: 3px solid white; } - -.boardsection[data-board] .tasklist { - width:100%; - color: white; - padding-top: .5em; - padding-bottom: .5em; - padding-left: .25em; - -} - .boardsection[data-board] .header { color: white; text-align: center; @@ -59,6 +49,15 @@ body { } +.boardsection[data-board] .tasklist { + width:100%; + color: white; + padding-top: .5em; + padding-bottom: .5em; + padding-left: .25em; + font-size: 12px; +} + .menu { display: flex; flex-direction: row; diff --git a/public/index.html b/public/index.html index 1ac3c905..3e45aa62 100755 --- a/public/index.html +++ b/public/index.html @@ -140,19 +140,43 @@ }) .then( function( myJSON ) { var info = myJSON.data - var textNode = document.createTextNode(info[0].task) - var dayCol = document.querySelector(".boardsection[data-board='day_1'] .tasklist") - dayCol.appendChild(textNode); + + var i; + for(i = 0; i < info.length; i++){ + var dayNum = dayFinder(info[i].day) + var textNode = document.createTextNode(info[i].task) + var dayCol = document.querySelector(".boardsection[data-board='"+ dayNum +"'] .tasklist") + dayCol.appendChild(textNode); + + } //.appendChild(textnode); //answer.innerHTML = info[1].value - - - console.log( info[1] ) console.log( JSON.stringify( myJSON ) ) }) } + const dayFinder = function(str) { + switch(str.trim().toLowerCase()) { + case 'sunday': + return 'day_1' + case 'monday': + return 'day_2' + case 'tuesday': + return 'day_3' + case 'wednesday': + return 'day_4' + case 'thursday': + return 'day_5' + case 'friday': + return 'day_6' + case 'saturday': + return 'day_7' + default: + return 'error' + } + } + const addEvent = function(e) { e.preventDefault(); var day = document.querySelector("#day").value @@ -178,7 +202,6 @@ }) window.onload = function() { - const button = document.querySelector( '#submit' ) button.onclick = addEvent } From fe39cd50851171f800a821d56308601fe1c5c4ba Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Mon, 9 Sep 2019 02:21:23 +0000 Subject: [PATCH 065/191] =?UTF-8?q?=F0=9F=8C=9E=F0=9F=8F=85=20Checkpoint?= =?UTF-8?q?=20./public/css/style.css:6266626/81=20./public/js/scripts.js:6?= =?UTF-8?q?266626/412?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 4 +++- public/js/scripts.js | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index ec864773..f28a82d4 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -50,12 +50,14 @@ body { } .boardsection[data-board] .tasklist { + overflow: hidden; + flex-wrap: nowrap; width:100%; color: white; padding-top: .5em; padding-bottom: .5em; padding-left: .25em; - font-size: 12px; + font-size: 10px; } .menu { diff --git a/public/js/scripts.js b/public/js/scripts.js index 66d53bc4..06e834a3 100755 --- a/public/js/scripts.js +++ b/public/js/scripts.js @@ -4,9 +4,10 @@ console.log("Welcome to assignment 2!") $(document).ready(function () { $(document).on('click', "#next", function() { var sections = $('.boardsection[data-board]'); + $('.boardsection[data-board] .tasklist').first().empty(); sections.first().insertAfter(sections.last()); sections.css({animation: "next 1s 1"}); - }) + }) $('button').hover( function() { $(this).css({'background-color':'#D6DADA'}) $(this).css({'color':'#1C1C1D'}) From 6532afceb08915ecc0ec7b04ff07d36745cfc609 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Mon, 9 Sep 2019 02:33:23 +0000 Subject: [PATCH 066/191] =?UTF-8?q?=F0=9F=90=A0=F0=9F=90=94=20Checkpoint?= =?UTF-8?q?=20./public/js/scripts.js:6266626/410=20./public/css/style.css:?= =?UTF-8?q?6266626/109=20./public/index.html:6266626/401?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 2 +- public/index.html | 3 ++- public/js/scripts.js | 10 ++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index f28a82d4..5e856831 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -27,6 +27,7 @@ body { } .boardsection { + cursor: default; width: 15%; display: flex; flex-direction: column; @@ -52,7 +53,6 @@ body { .boardsection[data-board] .tasklist { overflow: hidden; flex-wrap: nowrap; - width:100%; color: white; padding-top: .5em; padding-bottom: .5em; diff --git a/public/index.html b/public/index.html index 3e45aa62..79fc83fd 100755 --- a/public/index.html +++ b/public/index.html @@ -144,7 +144,8 @@ var i; for(i = 0; i < info.length; i++){ var dayNum = dayFinder(info[i].day) - var textNode = document.createTextNode(info[i].task) + var textNode = document.createTextNode(info[i].time + " " + info[i].task) + var var dayCol = document.querySelector(".boardsection[data-board='"+ dayNum +"'] .tasklist") dayCol.appendChild(textNode); diff --git a/public/js/scripts.js b/public/js/scripts.js index 06e834a3..5db04717 100755 --- a/public/js/scripts.js +++ b/public/js/scripts.js @@ -15,4 +15,14 @@ $(document).ready(function () { $(this).css({'background-color':'#1C1C1D'}) $(this).css({'color':'white'}) }) + $('.boardsection[data-board] .tasklist').hover( function() { + $(this).css({'background-color':'#FCA0A3'}) + $(this).css({'color':'#1C1C1D'}) + }, function () { + $(this).css({'background-color':'#1C1C1D'}) + $(this).css({'color':'white'}) + $('.boardsection[data-board] .tasklist').on('click', function() { + $(this).remove(); + }) + }) }) From 3df34804689a9affaa41ca33e7f5741ea9fa8d70 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Mon, 9 Sep 2019 02:45:22 +0000 Subject: [PATCH 067/191] =?UTF-8?q?=F0=9F=8D=8D=F0=9F=8F=85=20Checkpoint?= =?UTF-8?q?=20./public/index.html:6266626/1172?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/public/index.html b/public/index.html index 79fc83fd..caea578f 100755 --- a/public/index.html +++ b/public/index.html @@ -144,10 +144,16 @@ var i; for(i = 0; i < info.length; i++){ var dayNum = dayFinder(info[i].day) - var textNode = document.createTextNode(info[i].time + " " + info[i].task) - var + var timeNode = document.createTextNode(info[i].time) + var textNode = document.createTextNode(info[i].task) + var divNode = document.createElement("div") + var breakNode = document.createElement("br") var dayCol = document.querySelector(".boardsection[data-board='"+ dayNum +"'] .tasklist") - dayCol.appendChild(textNode); + day + dayCol.appendChild(breakNode) + dayCol.appendChild(timeNode) + dayCol.appendChild(breakNode) + dayCol.appendChild(textNode) } From 58949a1f3855b9bbd9d80539ae13fd3e8a1a50fb Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Mon, 9 Sep 2019 02:57:27 +0000 Subject: [PATCH 068/191] =?UTF-8?q?=F0=9F=92=81=F0=9F=92=93=20Checkpoint?= =?UTF-8?q?=20./public/index.html:6266626/174=20./server.improved.js:62666?= =?UTF-8?q?26/115=20./public/js/scripts.js:6266626/42=20./public/css/style?= =?UTF-8?q?.css:6266626/74?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 11 +++++------ public/js/scripts.js | 4 ++-- server.improved.js | 4 +++- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/public/index.html b/public/index.html index caea578f..2db7f3a1 100755 --- a/public/index.html +++ b/public/index.html @@ -149,12 +149,11 @@ var divNode = document.createElement("div") var breakNode = document.createElement("br") var dayCol = document.querySelector(".boardsection[data-board='"+ dayNum +"'] .tasklist") - day - dayCol.appendChild(breakNode) - dayCol.appendChild(timeNode) - dayCol.appendChild(breakNode) - dayCol.appendChild(textNode) - + divNode.appendChild(breakNode) + divNode.appendChild(timeNode) + divNode.appendChild(breakNode) + divNode.appendChild(textNode) + dayCol.appendChild(divNode) } //.appendChild(textnode); diff --git a/public/js/scripts.js b/public/js/scripts.js index 5db04717..19643fbb 100755 --- a/public/js/scripts.js +++ b/public/js/scripts.js @@ -15,13 +15,13 @@ $(document).ready(function () { $(this).css({'background-color':'#1C1C1D'}) $(this).css({'color':'white'}) }) - $('.boardsection[data-board] .tasklist').hover( function() { + $('.boardsection[data-board] .tasklist div').hover( function() { $(this).css({'background-color':'#FCA0A3'}) $(this).css({'color':'#1C1C1D'}) }, function () { $(this).css({'background-color':'#1C1C1D'}) $(this).css({'color':'white'}) - $('.boardsection[data-board] .tasklist').on('click', function() { + $('.boardsection[data-board] .tasklist div').on('click', function() { $(this).remove(); }) }) diff --git a/server.improved.js b/server.improved.js index 07ed922e..e76697bc 100644 --- a/server.improved.js +++ b/server.improved.js @@ -14,7 +14,9 @@ const appdata = [ const data = [ { 'day': 'Monday', 'task': 'CS4241 A2 Due', time: '11:59:00'}, - { 'day': 'Tuesday', 'task': 'MA2621 Homework Due', time: '2:00:00'} + { 'day': 'Tuesday', 'task': 'MA2621 Homework Due', time: '2:00:00'}, + { 'day': 'Tuesday', 'task': 'CH1010 Daily Proble', time: '11:00:00'} + ] const server = http.createServer( function( request,response ) { From 160958d366a95785c4588fe63dd0d8947a39dbf3 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Mon, 9 Sep 2019 03:09:23 +0000 Subject: [PATCH 069/191] =?UTF-8?q?=F0=9F=8F=AB=F0=9F=92=A7=20Checkpoint?= =?UTF-8?q?=20./public/css/style.css:6266626/47=20./public/js/scripts.js:6?= =?UTF-8?q?266626/222=20./public/index.html:6266626/2454=20./server.improv?= =?UTF-8?q?ed.js:6266626/875?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/css/style.css | 4 ++++ public/index.html | 54 ++++++++++++++++++++++++++------------------ public/js/scripts.js | 10 ++++---- server.improved.js | 32 +++++++++++++++----------- 4 files changed, 60 insertions(+), 40 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 5e856831..5216f626 100755 --- a/public/css/style.css +++ b/public/css/style.css @@ -1,5 +1,9 @@ /*Style your own assignment! This is fun! */ +div{ + border: 1px solid white; +} + body { background: #5A5959; font-family: 'Calibri', sans-serif; diff --git a/public/index.html b/public/index.html index 2db7f3a1..6495e28b 100755 --- a/public/index.html +++ b/public/index.html @@ -116,7 +116,6 @@ fetch(url) .then(function( response ) { //response.json(); - answer.innerHTML = response.body console.log(response) }).then(function(data) { @@ -184,28 +183,40 @@ } const addEvent = function(e) { - e.preventDefault(); - var day = document.querySelector("#day").value - var task = document.querySelector("#task").value - var time = document.querySelector("#time").value - console.log("Day: " + day + " Time: " + time + " Task: "+ task); + e.preventDefault(); + var day = document.querySelector("#day").value + var task = document.querySelector("#task").value + var time = document.querySelector("#time").value + console.log("Day: " + day + " Time: " + time + " Task: "+ task); + + var newEvent = { + day : document.querySelector("#day").value, + task : document.querySelector("#task").value, + time : document.querySelector("#time").value, + }; - var newEvent = { - day : document.querySelector("#day").value, - task : document.querySelector("#task").value, - time : document.querySelector("#time").value, - }; - var newEventInfo = JSON.stringify( newEvent ); - fetch('/submit',{ - method: 'POST', - body - }).then( function( response ) { - document.querySelector( day ).appendChild( time + " " + task ); + var newEventInfo = JSON.stringify( newEvent ); + fetch('/submit',{ + method: 'POST', + body + }).then( function( response ) { + var dayNum = dayFinder(info[i].day) + var dayCol = document.querySelector(".boardsection[data-board='"+ dayNum +"'] .tasklist") + var timeNode = document.createTextNode(info[i].time) + var textNode = document.createTextNode(info[i].task) + var divNode = document.createElement("div") + var breakNode = document.createElement("br") + divNode.appendChild(breakNode) + divNode.appendChild(timeNode) + divNode.appendChild(breakNode) + divNode.appendChild(textNode) + dayCol.appendChild(divNode) - document.querySelector("#day").value = ''; - document.querySelector("#task").value = ''; - document.querySelector("#time").value = ''; - }) + document.querySelector("#day").value = ''; + document.querySelector("#task").value = ''; + document.querySelector("#time").value = ''; + }) + } window.onload = function() { const button = document.querySelector( '#submit' ) @@ -216,7 +227,6 @@ - } diff --git a/public/js/scripts.js b/public/js/scripts.js index 19643fbb..e5287d2d 100755 --- a/public/js/scripts.js +++ b/public/js/scripts.js @@ -7,22 +7,22 @@ $(document).ready(function () { $('.boardsection[data-board] .tasklist').first().empty(); sections.first().insertAfter(sections.last()); sections.css({animation: "next 1s 1"}); - }) + }); $('button').hover( function() { $(this).css({'background-color':'#D6DADA'}) $(this).css({'color':'#1C1C1D'}) }, function () { $(this).css({'background-color':'#1C1C1D'}) $(this).css({'color':'white'}) - }) + }); $('.boardsection[data-board] .tasklist div').hover( function() { $(this).css({'background-color':'#FCA0A3'}) $(this).css({'color':'#1C1C1D'}) }, function () { $(this).css({'background-color':'#1C1C1D'}) $(this).css({'color':'white'}) - $('.boardsection[data-board] .tasklist div').on('click', function() { + }); + $('.boardsection[data-board] .tasklist').on('click', function() { $(this).remove(); - }) - }) + }); }) diff --git a/server.improved.js b/server.improved.js index e76697bc..ab62055e 100644 --- a/server.improved.js +++ b/server.improved.js @@ -47,20 +47,26 @@ const handlePost = function( request, response ) { }) request.on( 'end', function() { console.log( JSON.parse( dataString ) ) - var info = JSON.parse( dataString ) - var newEvent = { - 'day': info.day, - 'task' : info.task, - 'time': info.time + switch(request.url) { + case '/submit': + var info = JSON.parse( dataString ) + var newEvent = { + 'day': info.day, + 'task' : info.task, + 'time': info.time + } + + // ... do something with the data here!!! + //response.write(JSON.parse( dataString )) + data.push(newEvent); + + //response.write(data.toString()) + response.writeHead( 200, "OK", {'Content-Type': 'text/plain' }) + response.end() + break + default: + console.log("error"); } - - // ... do something with the data here!!! - //response.write(JSON.parse( dataString )) - data.push(newEvent); - - //response.write(data.toString()) - response.writeHead( 200, "OK", {'Content-Type': 'text/plain' }) - response.end() }) } From 115d7060a5463947d3cfee57420f73140137da35 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Mon, 9 Sep 2019 03:21:22 +0000 Subject: [PATCH 070/191] =?UTF-8?q?=F0=9F=8C=B2=F0=9F=8F=AA=20Checkpoint?= =?UTF-8?q?=20./public/index.html:6266626/6194?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 97 +++++++++++++++++++++-------------------------- 1 file changed, 44 insertions(+), 53 deletions(-) diff --git a/public/index.html b/public/index.html index 6495e28b..9b5c827b 100755 --- a/public/index.html +++ b/public/index.html @@ -6,7 +6,7 @@ - +
Daily Schedule
@@ -98,9 +98,6 @@ json = { yourresponse: input.value }, body = JSON.stringify( json ), answer = document.querySelector( '#answer') - - //answer.innerHTML = "hi" - fetch( '/submit', { method:'POST', @@ -142,46 +139,13 @@ var i; for(i = 0; i < info.length; i++){ - var dayNum = dayFinder(info[i].day) - var timeNode = document.createTextNode(info[i].time) - var textNode = document.createTextNode(info[i].task) - var divNode = document.createElement("div") - var breakNode = document.createElement("br") - var dayCol = document.querySelector(".boardsection[data-board='"+ dayNum +"'] .tasklist") - divNode.appendChild(breakNode) - divNode.appendChild(timeNode) - divNode.appendChild(breakNode) - divNode.appendChild(textNode) - dayCol.appendChild(divNode) + createEvent(info[i].day, info[i].task, info[i].time); } - - //.appendChild(textnode); - //answer.innerHTML = info[1].value + console.log( JSON.stringify( myJSON ) ) }) } - const dayFinder = function(str) { - switch(str.trim().toLowerCase()) { - case 'sunday': - return 'day_1' - case 'monday': - return 'day_2' - case 'tuesday': - return 'day_3' - case 'wednesday': - return 'day_4' - case 'thursday': - return 'day_5' - case 'friday': - return 'day_6' - case 'saturday': - return 'day_7' - default: - return 'error' - } - } - const addEvent = function(e) { e.preventDefault(); var day = document.querySelector("#day").value @@ -195,15 +159,29 @@ time : document.querySelector("#time").value, }; - var newEventInfo = JSON.stringify( newEvent ); + var body = JSON.stringify( newEvent ); fetch('/submit',{ method: 'POST', body }).then( function( response ) { - var dayNum = dayFinder(info[i].day) + + + + createEvent(day, task, time); + + document.querySelector("#day").value = ''; + document.querySelector("#task").value = ''; + document.querySelector("#time").value = ''; + }) + + return false + } + + const createEvent = function(day, task, time){ + var dayNum = dayFinder(day) var dayCol = document.querySelector(".boardsection[data-board='"+ dayNum +"'] .tasklist") - var timeNode = document.createTextNode(info[i].time) - var textNode = document.createTextNode(info[i].task) + var timeNode = document.createTextNode(time) + var textNode = document.createTextNode(task) var divNode = document.createElement("div") var breakNode = document.createElement("br") divNode.appendChild(breakNode) @@ -211,23 +189,36 @@ divNode.appendChild(breakNode) divNode.appendChild(textNode) dayCol.appendChild(divNode) - - document.querySelector("#day").value = ''; - document.querySelector("#task").value = ''; - document.querySelector("#time").value = ''; - }) + } + + const dayFinder = function(str) { + switch(str.trim().toLowerCase()) { + case 'sunday': + return 'day_1' + case 'monday': + return 'day_2' + case 'tuesday': + return 'day_3' + case 'wednesday': + return 'day_4' + case 'thursday': + return 'day_5' + case 'friday': + return 'day_6' + case 'saturday': + return 'day_7' + default: + return 'error' + } } window.onload = function() { + occupySchedule(); + const button = document.querySelector( '#submit' ) button.onclick = addEvent } - - - - - From 88b9e1d9444a8c8aaf6bc63a04d3885daf834703 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a2-pllopez)" Date: Mon, 9 Sep 2019 03:33:22 +0000 Subject: [PATCH 071/191] =?UTF-8?q?=F0=9F=8E=86=F0=9F=8E=85=20Checkpoint?= =?UTF-8?q?=20./public/index.html:6266626/1249?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/index.html | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/public/index.html b/public/index.html index 9b5c827b..bbfbbc0e 100755 --- a/public/index.html +++ b/public/index.html @@ -72,7 +72,7 @@ - + diff --git a/public/homePage/home.js b/public/homePage/home.js index 74e5bead..33b61e9a 100644 --- a/public/homePage/home.js +++ b/public/homePage/home.js @@ -20,14 +20,15 @@ const occupyStudents = function( e ) { const gradeCalc = function( assignments ) { var sum = 0 - var keys = assignments.keys() - console.log(keys[0]) - let i - for(i = 0; i < assignments.length; i++){ - sum += assignments[i]["HW1"] + if(assignments) { + for(i = 0; i < assignments.length; i++){ + sum += parseInt(Object.values(assignments[i])) + } + return (sum/assignments.length).toFixed(2) } - return sum/assignments.length + else + return 0 } @@ -37,7 +38,7 @@ const addStudent = function( e ) { const firstName = document.querySelector('#first').value const lastName = document.querySelector('#last').value - const grade = 100 + const grade = 0 const info = {first: firstName, last: lastName, grade: grade} const body = JSON.stringify(info) @@ -47,6 +48,7 @@ const addStudent = function( e ) { headers: { 'Content-Type': 'application/json' }, body }).then(function( response ) { + console.log(response) fillStudentInfo(firstName, lastName, grade); }) diff --git a/server.js b/server.js index c68fe768..80c7bf49 100644 --- a/server.js +++ b/server.js @@ -85,7 +85,7 @@ app.post( '/login', }) app.post( '/addStudent', function( request, response ) { - db.get('users').push(request.body).write(); + db.get('users[0].students').push(request.body).write(); occupyUsers() response.writeHead(200, { 'Content-Type': 'application/json' }); response.end(); From 015386352a3a4f32456a26c57757ac9e44c2717a Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a3-paris-lopez)" Date: Mon, 16 Sep 2019 05:49:52 +0000 Subject: [PATCH 174/191] =?UTF-8?q?=F0=9F=8F=80=F0=9F=8E=B8=20Checkpoint?= =?UTF-8?q?=20./server.js:6266626/2=20./public/homePage/home.js:6266626/52?= =?UTF-8?q?0=20./public/infoPage/studentInfo.html:6266626/3090=20./public/?= =?UTF-8?q?homePage/home.html:6266626/443?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/homePage/home.html | 5 +++++ public/homePage/home.js | 2 ++ public/infoPage/studentInfo.html | 33 ++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+) diff --git a/public/homePage/home.html b/public/homePage/home.html index 247bdc60..6c87087f 100644 --- a/public/homePage/home.html +++ b/public/homePage/home.html @@ -60,5 +60,10 @@

+ \ No newline at end of file diff --git a/public/homePage/home.js b/public/homePage/home.js index 33b61e9a..20258b9b 100644 --- a/public/homePage/home.js +++ b/public/homePage/home.js @@ -1,3 +1,5 @@ + + const occupyStudents = function( e ) { fetch('/occupyStudents', { method: 'GET', diff --git a/public/infoPage/studentInfo.html b/public/infoPage/studentInfo.html index e69de29b..95da2657 100644 --- a/public/infoPage/studentInfo.html +++ b/public/infoPage/studentInfo.html @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + Class Roster + + + +

+ Student +

+ + + + + + + + + + + + \ No newline at end of file From 79455f3f2904848e84ee27a5869b6c76bab06da7 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a3-paris-lopez)" Date: Mon, 16 Sep 2019 06:01:55 +0000 Subject: [PATCH 175/191] =?UTF-8?q?=F0=9F=91=9E=F0=9F=90=9F=20Checkpoint?= =?UTF-8?q?=20./public/homePage/home.html:6266626/743=20./public/homePage/?= =?UTF-8?q?home.js:6266626/1572?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/homePage/home.html | 13 +++++++++---- public/homePage/home.js | 16 ++++++++++++++-- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/public/homePage/home.html b/public/homePage/home.html index 6c87087f..6d8336ff 100644 --- a/public/homePage/home.html +++ b/public/homePage/home.html @@ -44,6 +44,7 @@

First Last Final Grade + Delete @@ -60,10 +61,14 @@

- \ No newline at end of file diff --git a/public/homePage/home.js b/public/homePage/home.js index 20258b9b..cb9c3f3b 100644 --- a/public/homePage/home.js +++ b/public/homePage/home.js @@ -68,10 +68,20 @@ const fillStudentInfo = function( firstName, lastName, grade ) { cell_lastName.innerHTML = lastName var cell_grade = document.createElement("td") cell_grade.innerHTML = grade - + var cell_del = document.createElement("td") + var button = document.createElement("button") + button.setAttribute('type', 'delete') + button.setAttribute('class', 'btn btn-default btn-sm') + cell_del.appendChild(button) + /* + +

+
+ +
+ +
+ + + + + + + + + +
AssignmentGrade
+
+ From 56f6e5c9a2abb8243731d2522e1649f932f5d233 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a3-paris-lopez)" Date: Mon, 16 Sep 2019 07:38:00 +0000 Subject: [PATCH 183/191] =?UTF-8?q?=F0=9F=95=B5=F0=9F=91=9A=20Checkpoint?= =?UTF-8?q?=20./public/infoPage/studentInfo.html:6266626/214=20./public/in?= =?UTF-8?q?foPage/studentInfo.js:6266626/2798=20./server.js:6266626/243?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/infoPage/studentInfo.html | 9 +++--- public/infoPage/studentInfo.js | 48 ++++++++++++++++++++++++++++++++ server.js | 13 +++++++-- 3 files changed, 63 insertions(+), 7 deletions(-) diff --git a/public/infoPage/studentInfo.html b/public/infoPage/studentInfo.html index d25fc801..479e5f8f 100644 --- a/public/infoPage/studentInfo.html +++ b/public/infoPage/studentInfo.html @@ -7,7 +7,7 @@ - + @@ -23,13 +23,13 @@

- +
- +
- +
@@ -41,6 +41,7 @@

Assignment Grade + Delete diff --git a/public/infoPage/studentInfo.js b/public/infoPage/studentInfo.js index e69de29b..640feed5 100644 --- a/public/infoPage/studentInfo.js +++ b/public/infoPage/studentInfo.js @@ -0,0 +1,48 @@ + + +const addAssignment = function( e ) { + e.preventDefault() + console.log("Add Assignment") + + const assignment = document.querySelector('#assignment').value + const grade = document.querySelector('#grade').value + + const info = {assignment: assignment, grade: grade} + const body = JSON.stringify(info) + + fetch('/addAssignment', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body + }).then(function( response ) { + console.log(response) + fillAssignment(assignment, grade); + }) + + return false; +} + +const fillAssignment = function( assignment, grade ) { + var start = document.querySelector("tbody") + var row = document.createElement("tr") + + var cell_assignment = document.createElement("td") + cell_assignment.innerHTML = assignment + cell_assignment.setAttribute("scope", "row") + var cell_grade = document.createElement("td") + cell_grade.innerHTML = grade + var cell_del = document.createElement("td") + + var button = document.createElement("button") + button.setAttribute('type', 'delete') + button.setAttribute('class', 'btn btn-danger remove') + button.innerHTML = "Delete" + cell_del.appendChild(button) + + row.appendChild(cell_assignment) + row.appendChild(cell_grade) + row.appendChild(cell_del) + + start.appendChild(row) + +} \ No newline at end of file diff --git a/server.js b/server.js index f9677794..55b03792 100644 --- a/server.js +++ b/server.js @@ -79,10 +79,10 @@ passport.deserializeUser((username, done) => { //POST REQUESTS app.post( '/login', passport.authenticate('local'), - function(request, response) { + function( request, response ) { const currentUser = users.find(usr => usr.username === request.user.username) response.json({ status: true }) - }) +}) app.post( '/addStudent', function( request, response ) { db.get('users[0].students').push(request.body).write(); @@ -91,13 +91,20 @@ app.post( '/addStudent', function( request, response ) { response.end(); }) -app.post( '/deleteStudent', function(request, response) { +app.post( '/deleteStudent', function( request, response ) { db.get('users[0].students').remove({ first: request.body.first, last: request.body.last }).write() occupyUsers() response.writeHead(200, { 'Content-Type': 'application/json' }); response.end(); }) +app.post( '/addAssignment', function( request, response ) { + db.get('users[0].students').push(request.body).write(); + occupyUsers() + response.writeHead(200, { 'Content-Type': 'application/json' }); + response.end(); +}) + //GET REQUESTS app.get( '/occupyStudents', function(request, response) { var studentList = [] From 8fa9aadd8686b024bf80e91aa0076a876fa6587c Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a3-paris-lopez)" Date: Mon, 16 Sep 2019 07:50:01 +0000 Subject: [PATCH 184/191] =?UTF-8?q?=F0=9F=8D=8E=F0=9F=90=80=20Checkpoint?= =?UTF-8?q?=20./server.js:6266626/211=20./public/homePage/home.js:6266626/?= =?UTF-8?q?10=20./public/infoPage/studentInfo.js:6266626/2188=20./public/h?= =?UTF-8?q?omePage/home.html:6266626/6=20./README.md:6266626/1316?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 20 ++++++++------------ public/homePage/home.html | 2 +- public/homePage/home.js | 2 -- public/infoPage/studentInfo.js | 29 ++++++++++++++++++++++++++++- server.js | 13 +++++++++++-- 5 files changed, 48 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index face3a02..09ad1229 100755 --- a/README.md +++ b/README.md @@ -1,22 +1,18 @@ Assignment 2 - Short Stack: Basic Two-tier Web Application using HTML/CSS/JS and Node.js === -https://paristhecity-a2-paris-lopez.glitch.me/ +https://paristhecity-a3-paris-lopez.glitch.me/ + +Based on my experience with creating math problems and designs for mathspring.org, an intelligent tutoring system, +I decided to create a login page and roster for a set of teachers. While there are many ways to elaborate on my +origin + ## Technical Achievements - **Tech Achievement 1**: I completed the technical aspect of the assignment by creating an array of objects to alter during the use of the webpage. ### Design/Evaluation Achievements -- **Design Achievement 1**: Shown in `style.css`, there are many style aspects creating a -type of 'dark mode' of a Daily Scheduler. In `style.css` there is formatting necessary to make -the page readable and aesthetically pleasing. Addiotionally there are key frames that allow -the last day of the week to slide in rather than the entire line jerking to the left. -The user can add an event with the Add to Schedule button as well as change the day with the -next day button. This next day button allows the user to line up the day of the week with a white -border to better exemplify the current day. Tasks are deleted as the day resets to the end of the week. +- **Design Achievement 1**: -- **Design Achievement 2**: In my experience, calendars often fail to highlight the priority of -works due to their static format. By creating a sliding calendar, the user can see the current day, -update tasks, and have a better sense of urgency as tasks literally draw closer. As of right now there -is no way to delete tasks individually, but if I had had extra time I would have devoted it to creating that feature. +- **Design Achievement 2**: diff --git a/public/homePage/home.html b/public/homePage/home.html index 740888af..0e55de9b 100644 --- a/public/homePage/home.html +++ b/public/homePage/home.html @@ -74,7 +74,7 @@

}); $(function () { $("table").on("click", ".info", function () { - window.location.href = "public/infoPage/studentInfo.html" + window.location.href = "/infoPage/studentInfo.html" }); }); }); diff --git a/public/homePage/home.js b/public/homePage/home.js index 3799f740..da2a5f1f 100644 --- a/public/homePage/home.js +++ b/public/homePage/home.js @@ -119,6 +119,4 @@ window.onload = function() { addButton.onclick = addStudent } -/* - */ diff --git a/public/infoPage/studentInfo.js b/public/infoPage/studentInfo.js index 640feed5..a28f5217 100644 --- a/public/infoPage/studentInfo.js +++ b/public/infoPage/studentInfo.js @@ -1,4 +1,22 @@ - +const occupyAssignments = function( e ) { + e.preventDefault() + fetch('/occupyAssignments', { + method: 'GET', + headers: { 'Content-Type': 'application/json' } + }).then(function(response) { + console.log(response) + return response.json(); + }).then(function(data) { + let assignments = data; + let i + for(i = 0; i < assignments.length; i++) { + let assignment = assignments[i] + //let assignments = student.assignments + fillAssignment(assignment, assignment.value()) + } + console.log(assignments) + }) +} const addAssignment = function( e ) { e.preventDefault() @@ -45,4 +63,13 @@ const fillAssignment = function( assignment, grade ) { start.appendChild(row) +} + +window.onload = function() { + console.log("home.html: javascript loaded") + //occupyStudents() + + const addButton = document.querySelector("#addAssignment"); + addButton.onclick = addAssignment + } \ No newline at end of file diff --git a/server.js b/server.js index 55b03792..2e1eb48b 100644 --- a/server.js +++ b/server.js @@ -99,14 +99,23 @@ app.post( '/deleteStudent', function( request, response ) { }) app.post( '/addAssignment', function( request, response ) { - db.get('users[0].students').push(request.body).write(); + db.get('users[0].students[0]').push(request.body).write(); occupyUsers() response.writeHead(200, { 'Content-Type': 'application/json' }); response.end(); }) //GET REQUESTS -app.get( '/occupyStudents', function(request, response) { +app.get( '/occupyStudents', function( request, response ) { + var studentList = [] + let i + for(i = 0; i < users.length; i++){ + } + studentList = users[0].students + response.send(studentList) +}) + +app.get( '/occupyAssignments', function( request, response ) { var studentList = [] let i for(i = 0; i < users.length; i++){ From 2de6355d83926556671ee6637b804a8e01e09c82 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a3-paris-lopez)" Date: Mon, 16 Sep 2019 08:01:03 +0000 Subject: [PATCH 185/191] =?UTF-8?q?=F0=9F=8E=96=F0=9F=8D=9C=20Checkpoint?= =?UTF-8?q?=20./README.md:6266626/1771?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 09ad1229..207fd6f8 100755 --- a/README.md +++ b/README.md @@ -5,14 +5,25 @@ https://paristhecity-a3-paris-lopez.glitch.me/ Based on my experience with creating math problems and designs for mathspring.org, an intelligent tutoring system, I decided to create a login page and roster for a set of teachers. While there are many ways to elaborate on my -origin +original plan, I did not have enough time to explore all of my options for this page. I would have liked to have built +a page where several users could log-in and look at their roster, as well as the grades that accompany each student. +The teacher would be able to remove students from their class and add new students. When the 'information' button +is clicked, the teacher can add grades and assignments to the student chosen. + +Because the database, password serveice, and server required a lot of time to get started, I found myself with less time +than intended to piece together my design. With the remaining time I was able to build a login page, as well +as the beginnings of a student roster and list of assignments. Students can be added and removed from the list, +and the more information button brings the user to the list of assignments. Preferably, there will have been ## Technical Achievements - **Tech Achievement 1**: I completed the technical aspect of the assignment -by creating an array of objects to alter during the use of the webpage. +by creating a lowdb database that stores various information and provides it to the web page when necessary. ### Design/Evaluation Achievements -- **Design Achievement 1**: +- **Design Achievement 1**: Prior to the creation of the web application, I put great thought into my ideas and design. +I found the CSS Template to be greatly limiting, however I was still able to create a clean user interface appropriate +for its purpose. I prepared my web application with some simple drawings to sketch out my ideas on paper. With a +prototype in hand, I moved onto building the web app itself. - **Design Achievement 2**: From 3b159fa4488852e2e4156701fe47bcadccbcd8c9 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a3-paris-lopez)" Date: Mon, 16 Sep 2019 08:12:59 +0000 Subject: [PATCH 186/191] =?UTF-8?q?=F0=9F=9A=A9=F0=9F=8D=AB=20Checkpoint?= =?UTF-8?q?=20./README.md:6266626/913?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 207fd6f8..59420f9d 100755 --- a/README.md +++ b/README.md @@ -8,12 +8,18 @@ I decided to create a login page and roster for a set of teachers. While there a original plan, I did not have enough time to explore all of my options for this page. I would have liked to have built a page where several users could log-in and look at their roster, as well as the grades that accompany each student. The teacher would be able to remove students from their class and add new students. When the 'information' button -is clicked, the teacher can add grades and assignments to the student chosen. +is clicked, the teacher can add grades and assignments to the student chosen. Preferably, there would have been +a navigation bar at the top of the page to switch between assignments and account information for the target student. Because the database, password serveice, and server required a lot of time to get started, I found myself with less time than intended to piece together my design. With the remaining time I was able to build a login page, as well as the beginnings of a student roster and list of assignments. Students can be added and removed from the list, -and the more information button brings the user to the list of assignments. Preferably, there will have been +and the more information button brings the user to the list of assignments. The teacher can add assignments as well +as remove them. Though, I was unable to complete more of my original ideas beyond these features, the web app still +provides a few options for the user and does so in a responsive and clear manner. + +Username: admin
+Password: admin ## Technical Achievements From f111a88c6cdd1ce63d91c0e750687e1f95bd0424 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a3-paris-lopez)" Date: Mon, 16 Sep 2019 12:54:50 +0000 Subject: [PATCH 187/191] A3 --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 59420f9d..88b45e8a 100755 --- a/README.md +++ b/README.md @@ -11,13 +11,14 @@ The teacher would be able to remove students from their class and add new studen is clicked, the teacher can add grades and assignments to the student chosen. Preferably, there would have been a navigation bar at the top of the page to switch between assignments and account information for the target student. -Because the database, password serveice, and server required a lot of time to get started, I found myself with less time +Because the database, password service, and server required a lot of time to get started, I found myself with less time than intended to piece together my design. With the remaining time I was able to build a login page, as well as the beginnings of a student roster and list of assignments. Students can be added and removed from the list, and the more information button brings the user to the list of assignments. The teacher can add assignments as well as remove them. Though, I was unable to complete more of my original ideas beyond these features, the web app still provides a few options for the user and does so in a responsive and clear manner. +Login information:
Username: admin
Password: admin From fb0a1cf40c9e1aed44280d33e55924b8f0c637d9 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a3-paris-lopez)" Date: Mon, 16 Sep 2019 13:03:13 +0000 Subject: [PATCH 188/191] =?UTF-8?q?=F0=9F=97=BD=F0=9F=8E=96=20Checkpoint?= =?UTF-8?q?=20./README.md:6266626/25=20./db.json:6266626/313=20./server.js?= =?UTF-8?q?:6266626/84=20./public/infoPage/studentInfo.js:6266626/170?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db.json | 15 +++++++++++++++ public/infoPage/studentInfo.js | 8 ++++---- server.js | 6 +++--- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/db.json b/db.json index 5cbd1810..b7288ac0 100644 --- a/db.json +++ b/db.json @@ -19,6 +19,21 @@ "Test": 30 } ] + }, + { + "first": "John", + "last": "Smith", + "assignments": [ + { + "HW1": 100 + }, + { + "HW2": 95 + }, + { + "Test": 70 + } + ] } ] }, diff --git a/public/infoPage/studentInfo.js b/public/infoPage/studentInfo.js index a28f5217..589b46b3 100644 --- a/public/infoPage/studentInfo.js +++ b/public/infoPage/studentInfo.js @@ -1,5 +1,4 @@ -const occupyAssignments = function( e ) { - e.preventDefault() +const occupyAssignments = function( ) { fetch('/occupyAssignments', { method: 'GET', headers: { 'Content-Type': 'application/json' } @@ -12,7 +11,8 @@ const occupyAssignments = function( e ) { for(i = 0; i < assignments.length; i++) { let assignment = assignments[i] //let assignments = student.assignments - fillAssignment(assignment, assignment.value()) + console.log(Object.values(assignment)) + fillAssignment(assignment, Object.values(assignment)) } console.log(assignments) }) @@ -67,7 +67,7 @@ const fillAssignment = function( assignment, grade ) { window.onload = function() { console.log("home.html: javascript loaded") - //occupyStudents() + occupyAssignments() const addButton = document.querySelector("#addAssignment"); addButton.onclick = addAssignment diff --git a/server.js b/server.js index 2e1eb48b..3cb0ec23 100644 --- a/server.js +++ b/server.js @@ -116,12 +116,12 @@ app.get( '/occupyStudents', function( request, response ) { }) app.get( '/occupyAssignments', function( request, response ) { - var studentList = [] + var assignmentList = [] let i for(i = 0; i < users.length; i++){ } - studentList = users[0].students - response.send(studentList) + assignmentList = users[0].students[0].assignments + response.send(assignmentList) }) From af9278d6ddffc39c55bbd2b23877450c20a9caa4 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a3-paris-lopez)" Date: Mon, 16 Sep 2019 13:14:14 +0000 Subject: [PATCH 189/191] =?UTF-8?q?=F0=9F=93=9F=F0=9F=8F=8C=20Checkpoint?= =?UTF-8?q?=20./public/infoPage/studentInfo.js:6266626/596=20./server.js:6?= =?UTF-8?q?266626/500=20./public/infoPage/studentInfo.html:6266626/840=20.?= =?UTF-8?q?/db.json:6266626/694?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db.json | 18 ++++++++++++------ public/infoPage/studentInfo.html | 13 +++++++++++++ public/infoPage/studentInfo.js | 16 +++++++++++++++- server.js | 9 ++++++++- 4 files changed, 48 insertions(+), 8 deletions(-) diff --git a/db.json b/db.json index b7288ac0..e1121875 100644 --- a/db.json +++ b/db.json @@ -10,13 +10,16 @@ "last": "Doe", "assignments": [ { - "HW1": 30 + "assignment": "HW1", + "grade": 30 }, { - "HW2": 25 + "assignment": "HW2", + "grade": 90 }, { - "Test": 30 + "assignment": "Test", + "grade": 70 } ] }, @@ -25,13 +28,16 @@ "last": "Smith", "assignments": [ { - "HW1": 100 + "assignment": "HW1", + "grade": 40 }, { - "HW2": 95 + "assignment": "HW2", + "grade": 60 }, { - "Test": 70 + "assignment": "Test", + "grade": 90 } ] } diff --git a/public/infoPage/studentInfo.html b/public/infoPage/studentInfo.html index 479e5f8f..a5c5b90a 100644 --- a/public/infoPage/studentInfo.html +++ b/public/infoPage/studentInfo.html @@ -58,5 +58,18 @@

+ + \ No newline at end of file diff --git a/public/infoPage/studentInfo.js b/public/infoPage/studentInfo.js index 589b46b3..fb5604c4 100644 --- a/public/infoPage/studentInfo.js +++ b/public/infoPage/studentInfo.js @@ -12,12 +12,26 @@ const occupyAssignments = function( ) { let assignment = assignments[i] //let assignments = student.assignments console.log(Object.values(assignment)) - fillAssignment(assignment, Object.values(assignment)) + fillAssignment( assignment.assignment, assignment.grade) } console.log(assignments) }) } +const removeAssignment = function( assignment, grade ) { + console.log("Remove Assignment") + const info = {assignment: assignment, grade: grade } + const body = JSON.stringify(info) + fetch('/deleteStudent', { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body + }).then(function(response) { + console.log(response) + }) +} + + const addAssignment = function( e ) { e.preventDefault() console.log("Add Assignment") diff --git a/server.js b/server.js index 3cb0ec23..86391f96 100644 --- a/server.js +++ b/server.js @@ -99,7 +99,14 @@ app.post( '/deleteStudent', function( request, response ) { }) app.post( '/addAssignment', function( request, response ) { - db.get('users[0].students[0]').push(request.body).write(); + db.get('users[0].students[0].assignments').push(request.body).write(); + occupyUsers() + response.writeHead(200, { 'Content-Type': 'application/json' }); + response.end(); +}) + +app.post( '/delAssignment', function( request, response ) { + db.get('users[0].students[0].assignments').remove({ assignment: request.body.grade, grade: request.body.grade }).write() occupyUsers() response.writeHead(200, { 'Content-Type': 'application/json' }); response.end(); From 20ec51fb2e9accd7bb2c3b0af9fe69bc08848d65 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a3-paris-lopez)" Date: Mon, 16 Sep 2019 13:26:12 +0000 Subject: [PATCH 190/191] =?UTF-8?q?=F0=9F=8C=A0=F0=9F=99=88=20Checkpoint?= =?UTF-8?q?=20./public/infoPage/studentInfo.js:6266626/26=20./server.js:62?= =?UTF-8?q?66626/327=20./db.json:6266626/53=20./public/homePage/home.js:62?= =?UTF-8?q?66626/133=20./README.md:6266626/255?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 ++++- db.json | 4 +++- public/homePage/home.js | 2 +- public/infoPage/studentInfo.js | 2 +- server.js | 19 +------------------ 5 files changed, 10 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 88b45e8a..77bb4db0 100755 --- a/README.md +++ b/README.md @@ -15,7 +15,10 @@ Because the database, password service, and server required a lot of time to get than intended to piece together my design. With the remaining time I was able to build a login page, as well as the beginnings of a student roster and list of assignments. Students can be added and removed from the list, and the more information button brings the user to the list of assignments. The teacher can add assignments as well -as remove them. Though, I was unable to complete more of my original ideas beyond these features, the web app still +as remove them. Currently, all the information is based on one account of a teacher, and if one were to login as the other +teacher (teacher1, teacher1), the tables would be occupied by only the students of the + +Though, I was unable to complete more of my original ideas beyond these features, the web app still provides a few options for the user and does so in a responsive and clear manner. Login information:
diff --git a/db.json b/db.json index e1121875..caf6dffb 100644 --- a/db.json +++ b/db.json @@ -8,6 +8,7 @@ { "first": "Jane", "last": "Doe", + "active": 0, "assignments": [ { "assignment": "HW1", @@ -26,6 +27,7 @@ { "first": "John", "last": "Smith", + "active": 0, "assignments": [ { "assignment": "HW1", @@ -33,7 +35,7 @@ }, { "assignment": "HW2", - "grade": 60 + "grade": 100 }, { "assignment": "Test", diff --git a/public/homePage/home.js b/public/homePage/home.js index da2a5f1f..20da78a6 100644 --- a/public/homePage/home.js +++ b/public/homePage/home.js @@ -24,7 +24,7 @@ const gradeCalc = function( assignments ) { let i if(assignments) { for(i = 0; i < assignments.length; i++){ - sum += parseInt(Object.values(assignments[i])) + sum += parseInt(assignments[i].grade) } return (sum/assignments.length).toFixed(2) } diff --git a/public/infoPage/studentInfo.js b/public/infoPage/studentInfo.js index fb5604c4..d6de1119 100644 --- a/public/infoPage/studentInfo.js +++ b/public/infoPage/studentInfo.js @@ -22,7 +22,7 @@ const removeAssignment = function( assignment, grade ) { console.log("Remove Assignment") const info = {assignment: assignment, grade: grade } const body = JSON.stringify(info) - fetch('/deleteStudent', { + fetch('/delAssignment', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body diff --git a/server.js b/server.js index 86391f96..d7469e6e 100644 --- a/server.js +++ b/server.js @@ -32,23 +32,6 @@ const occupyUsers = function() { } }; occupyUsers(); -//Students -/* -db.defaults({ users: [] }).write(); -let students -const occupyStudents = function() { - students = []; - let i = 0; - while (true) { - let student = db.get(`students[${i}]`).value(); - if (student) users.push(student) - else break - i++; - } -}; -occupyStudents(); -*/ - //Password Authentication const strategy = function(username, password, done) { @@ -106,7 +89,7 @@ app.post( '/addAssignment', function( request, response ) { }) app.post( '/delAssignment', function( request, response ) { - db.get('users[0].students[0].assignments').remove({ assignment: request.body.grade, grade: request.body.grade }).write() + db.get('users[0].students[0].assignments').remove({ assignment: request.body.assignment, grade: request.body.grade }).write() occupyUsers() response.writeHead(200, { 'Content-Type': 'application/json' }); response.end(); From 857fa25cb51cd15b8223d9417a5022b640612b02 Mon Sep 17 00:00:00 2001 From: "Glitch (paristhecity-a3-paris-lopez)" Date: Mon, 16 Sep 2019 13:33:42 +0000 Subject: [PATCH 191/191] a very incomplete version --- README.md | 13 ++++++++++--- db.json | 5 +++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 77bb4db0..d8043599 100755 --- a/README.md +++ b/README.md @@ -10,13 +10,18 @@ a page where several users could log-in and look at their roster, as well as the The teacher would be able to remove students from their class and add new students. When the 'information' button is clicked, the teacher can add grades and assignments to the student chosen. Preferably, there would have been a navigation bar at the top of the page to switch between assignments and account information for the target student. +Currently, all the information is based on one account of a teacher, and if one were to login as the other +teacher (teacher1, teacher1), the tables would be occupied by only the students of the admin teacher. This was intentional +to get started. My plan was to add an attribute in each object to track the active person. This attribute would be +set to '0' when the user is not active, and '1' when either a teacher logs on or when a student is chosen and becomes +the 'active' teacher or student. This way all the student information can be gathered from the appropriate sources; +whether it is a list of students, or a single student. Because the database, password service, and server required a lot of time to get started, I found myself with less time than intended to piece together my design. With the remaining time I was able to build a login page, as well as the beginnings of a student roster and list of assignments. Students can be added and removed from the list, and the more information button brings the user to the list of assignments. The teacher can add assignments as well -as remove them. Currently, all the information is based on one account of a teacher, and if one were to login as the other -teacher (teacher1, teacher1), the tables would be occupied by only the students of the +as remove them. Though, I was unable to complete more of my original ideas beyond these features, the web app still provides a few options for the user and does so in a responsive and clear manner. @@ -36,4 +41,6 @@ I found the CSS Template to be greatly limiting, however I was still able to cre for its purpose. I prepared my web application with some simple drawings to sketch out my ideas on paper. With a prototype in hand, I moved onto building the web app itself. -- **Design Achievement 2**: +- **Design Achievement 2**: I utilized a CSS template that provided a majority of the style and the functionality. I +also included a couple of JQuery scripts to make the removal of table rows easier and the connection between multiple +pages. diff --git a/db.json b/db.json index caf6dffb..4e6bc851 100644 --- a/db.json +++ b/db.json @@ -42,6 +42,11 @@ "grade": 90 } ] + }, + { + "first": "Paris", + "last": "Lopez", + "grade": 0 } ] },