From 09ce315b393db369e7d32e08c1bb67ec477b986c Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 24 Feb 2019 12:01:11 -1000 Subject: [PATCH 1/8] draft1 --- index.html | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 74 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index a8a1aad9..9d6f9a00 100644 --- a/index.html +++ b/index.html @@ -6,13 +6,84 @@ window.onload = function(){ // ALL OF YOUR JAVASCRIPT CODE SHOULD GO HERE. // We have to use window.onload so your JavaScript doesn't execute until the page has loaded and all HTML has been downloaded to your browser - + + + main.innerHTML ='Inbox (' + window.geemails.length + ')'; + var inbox = document.createElement('div'); + inbox.id = 'inbox' + main.appendChild(inbox) + + + + + for (var i=0; i + + +
+

Gee-Mail

+
- Build Me! + Inbox
\ No newline at end of file From 42b50872231ce4a95dde9634d31eaa96298bb198 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Feb 2019 11:04:56 -1000 Subject: [PATCH 2/8] draft2 --- index.html | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 9d6f9a00..46154a1a 100644 --- a/index.html +++ b/index.html @@ -9,6 +9,7 @@ main.innerHTML ='Inbox (' + window.geemails.length + ')'; + var inbox = document.createElement('div'); inbox.id = 'inbox' main.appendChild(inbox) @@ -19,7 +20,11 @@ for (var i=0; i From 913c362dfe2a63c17a00b093b880a3d85099721e Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Feb 2019 11:07:58 -1000 Subject: [PATCH 3/8] draft2 --- css/style.css | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/css/style.css b/css/style.css index e69de29b..2abdfaf8 100644 --- a/css/style.css +++ b/css/style.css @@ -0,0 +1,38 @@ +#title{ + font-size: 36px; + text-align: center; + font-family: 'Righteous', cursive; +} +header{ + background-color: aqua; +} +body{ + background-color: whitesmoke; +} +#main{ + font-size: 25px; + font-family: 'Ropa Sans', sans-serif; +} +#inbox{ + font-size: 16px; +} +.messages{ + display: flex; + justify-content: space-between; + +} +.sender{ + display: inline; +} +.subject{ + display: inline; + text-align: center; +} + +.messages{ + color: black; +} +.outerBox{ + border-style: solid; + border-color: black; +} \ No newline at end of file From 124e7b687fdc988b3f16b65054442d31b2357564 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Feb 2019 12:01:36 -1000 Subject: [PATCH 4/8] draft3 --- index.html | 105 ++++++++++++++++++++++++++--------------------------- 1 file changed, 51 insertions(+), 54 deletions(-) diff --git a/index.html b/index.html index 46154a1a..f118faa0 100644 --- a/index.html +++ b/index.html @@ -5,56 +5,25 @@ @@ -102,8 +89,18 @@

Gee-Mail

-
- Inbox +
+
+ Inbox +
+
+
+ +
+
+ - \ No newline at end of file + + + From 02645a16f942f4949293cf14693bb495860ab1ad Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Feb 2019 16:48:38 -1000 Subject: [PATCH 5/8] half of click events work --- index.html | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index f118faa0..0d909442 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ window.onload = function(){ // ALL OF YOUR JAVASCRIPT CODE SHOULD GO HERE. // We have to use window.onload so your JavaScript doesn't execute until the page has loaded and all HTML has been downloaded to your browser - setInterval(checkCounter, 2000) + setInterval(checkCounter, 500) function checkCounter(){ counter.innerHTML ='(' + window.geemails.length + ')'; } @@ -44,6 +44,20 @@ messageContentsBody.className = 'body'; messageContentsBody.innerHTML = window.geemails[i].body; findOuterBox.appendChild(messageContentsBody); + + findOuterBox.addEventListener('click', showMess); + + + function showMess(){ + var findBody = this.querySelector('.body') + if(findBody.style.display === 'block'){ + findBody.style.display = 'none'; + }else{ + findBody.style.display = 'block'; + } + } + + } setInterval(makeMessage, 5000) @@ -75,7 +89,22 @@ var newMessageContentsBody = document.createElement('div'); newMessageContentsBody.className = 'body'; newMessageContentsBody.innerHTML = newMessage.body; - newMessageBox.appendChild(newMessageContentsBody); + newOuterBox.appendChild(newMessageContentsBody); + + // var findNewOBox = document.getElementsByClassName('newOuterBox'[0]); + // findNewOBox.addEventListener('click', showBody) + + // function showBody(){ + // var findBody = this.querySelector('.body') + // if (findBody.style.display === 'block'){ + // findBody.style.display = 'none' + // } else{ + // findBody.style.display = 'block'; + // } + + // } + + window.geemails.push(newMessage); } From c91fc882bd7fc78ee72ebfa514cadd55d9aa86b7 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Feb 2019 16:54:30 -1000 Subject: [PATCH 6/8] finished? --- index.html | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/index.html b/index.html index 0d909442..7e513763 100644 --- a/index.html +++ b/index.html @@ -91,18 +91,18 @@ newMessageContentsBody.innerHTML = newMessage.body; newOuterBox.appendChild(newMessageContentsBody); - // var findNewOBox = document.getElementsByClassName('newOuterBox'[0]); - // findNewOBox.addEventListener('click', showBody) - - // function showBody(){ - // var findBody = this.querySelector('.body') - // if (findBody.style.display === 'block'){ - // findBody.style.display = 'none' - // } else{ - // findBody.style.display = 'block'; - // } - - // } + + newOuterBox.addEventListener('click', showBody) + + function showBody(){ + var findNewBody = this.querySelector('.body') + if (findNewBody.style.display === 'block'){ + findNewBody.style.display = 'none' + } else{ + findNewBody.style.display = 'block'; + } + + } From 7d11aa763fb9161121d97cc3915c9beced4952d0 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Feb 2019 17:05:49 -1000 Subject: [PATCH 7/8] new draft --- css/style.css | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/css/style.css b/css/style.css index 2abdfaf8..ffee5714 100644 --- a/css/style.css +++ b/css/style.css @@ -8,13 +8,17 @@ header{ } body{ background-color: whitesmoke; + } #main{ font-size: 25px; font-family: 'Ropa Sans', sans-serif; } #inbox{ - font-size: 16px; + font-size: 18px; +} +#counter{ + display: inline } .messages{ display: flex; @@ -23,10 +27,13 @@ body{ } .sender{ display: inline; + font-family: 'Ropa Sans', sans-serif; + font-size: 16px; } .subject{ display: inline; text-align: center; + font-family: 'Ropa Sans', sans-serif; } .messages{ @@ -35,4 +42,14 @@ body{ .outerBox{ border-style: solid; border-color: black; + padding: 2px; +} + +.newOuterBox{ + border-style: solid; + border-color: black; + padding: 2px; +} +.body{ + display: none; } \ No newline at end of file From f4858eb657313e814e5b9a396c48acc994f09c14 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Feb 2019 19:25:43 -1000 Subject: [PATCH 8/8] fixed timer --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 7e513763..ef9070e0 100644 --- a/index.html +++ b/index.html @@ -6,7 +6,7 @@ window.onload = function(){ // ALL OF YOUR JAVASCRIPT CODE SHOULD GO HERE. // We have to use window.onload so your JavaScript doesn't execute until the page has loaded and all HTML has been downloaded to your browser - setInterval(checkCounter, 500) + setInterval(checkCounter, 1) function checkCounter(){ counter.innerHTML ='(' + window.geemails.length + ')'; }