From b23fc803c00fff6c716bc05c8cd5d53d37ebc7d8 Mon Sep 17 00:00:00 2001 From: Eugene Date: Sat, 1 Jun 2019 13:19:34 -1000 Subject: [PATCH 1/5] added file --- css/style.css | 29 ++++++++++++++++++++++++ index.html | 62 ++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 83 insertions(+), 8 deletions(-) diff --git a/css/style.css b/css/style.css index e69de29b..59ba1835 100644 --- a/css/style.css +++ b/css/style.css @@ -0,0 +1,29 @@ +.bigBox{ + border: 1px solid black; + margin: 5px; + padding: 5px; +} + +.date{ + + color: green; + display: inline; + +} + +.sender{ + + margin: 5px; + color:red; +} + +.subject{ + + margin: 5px; + color:purple; +} +.body{ + display: inline-block; + margin: 5px; + color:black; +} \ No newline at end of file diff --git a/index.html b/index.html index a8a1aad9..c275621e 100644 --- a/index.html +++ b/index.html @@ -5,14 +5,60 @@ - -
- Build Me! -
+ +

Eugene's Coding Challenge

+ +
+
+ +

inbox

- \ No newline at end of file + From be11672ca72e73f20cda4aa4938b087ae2db62cf Mon Sep 17 00:00:00 2001 From: Eugene Date: Sat, 1 Jun 2019 20:36:00 -1000 Subject: [PATCH 2/5] made change --- css/style.css | 9 +++++++-- index.html | 33 ++++++++++++++++----------------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/css/style.css b/css/style.css index 59ba1835..185c4598 100644 --- a/css/style.css +++ b/css/style.css @@ -10,6 +10,11 @@ display: inline; } +.hideBody{ + +display: none; +} + .sender{ @@ -22,8 +27,8 @@ margin: 5px; color:purple; } -.body{ +.bodyMessage{ display: inline-block; margin: 5px; - color:black; + color:pink; } \ No newline at end of file diff --git a/index.html b/index.html index c275621e..37bd37da 100644 --- a/index.html +++ b/index.html @@ -1,3 +1,4 @@ + @@ -9,24 +10,20 @@ count.innerHTML = "There are " + geemails.length + " messages in the mailbox!"; -function myFunction() { - setInterval(function(){ - (getNewMessage); }, - 3000); -} + for(var i = 0; i
" +geemails[i].body; mailBox.appendChild(bodyBox); } - -function showMessage(){ - var showMail = this.querySelector('.date'); + function showMessage(){ + var showMail = this.querySelector('.hideBody'); if(showMail.style.display === 'block'){ showMail.style.display = 'none' }else{ showMail.style.display = 'block' - } } + +} + }; - + +

Eugene's Coding Challenge

- -
-
+

+ +
-

inbox

+ From 3f44675111b40c10b576f3a42cf5df7b987f402c Mon Sep 17 00:00:00 2001 From: Eugene Date: Sat, 1 Jun 2019 20:39:41 -1000 Subject: [PATCH 3/5] made change --- css/style.css | 4 ++-- index.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/css/style.css b/css/style.css index 185c4598..7d950cd5 100644 --- a/css/style.css +++ b/css/style.css @@ -11,7 +11,7 @@ } .hideBody{ - +color:red; display: none; } @@ -30,5 +30,5 @@ display: none; .bodyMessage{ display: inline-block; margin: 5px; - color:pink; + color:black; } \ No newline at end of file diff --git a/index.html b/index.html index 37bd37da..c25f8f14 100644 --- a/index.html +++ b/index.html @@ -17,13 +17,13 @@ list.appendChild(wrapper) var mailBox = document.createElement('div'); - mailBox.className = 'mailbox'; + mailBox.className = 'date'; mailBox.innerHTML = "Date: " + geemails[i].date; mailBox.addEventListener('click', showMessage) wrapper.appendChild(mailBox); var senderBox = document.createElement('p'); - senderBox.className = 'hideBody'; + senderBox.className = 'sender'; senderBox.innerHTML = "Sender Name: " +geemails[i].sender; mailBox.appendChild(senderBox); From 3b673defa78353c9e281e33c58dd9d8e89afacba Mon Sep 17 00:00:00 2001 From: Eugene Date: Sat, 1 Jun 2019 21:59:14 -1000 Subject: [PATCH 4/5] made change --- css/style.css | 14 ++++++++++++++ index.html | 24 +++++++++++++++++++----- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/css/style.css b/css/style.css index 7d950cd5..08876d87 100644 --- a/css/style.css +++ b/css/style.css @@ -14,6 +14,20 @@ color:red; display: none; } +/* +#list { + display: none; +} +*/ + .flip { + font-size: 16px; + padding: 10px; + text-align: center; + background-color: #4CAF50; + color: white; + border: solid 1px #a6d8a8; + margin: auto; +} .sender{ diff --git a/index.html b/index.html index c25f8f14..908d582c 100644 --- a/index.html +++ b/index.html @@ -12,6 +12,8 @@ for(var i = 0; i
" +geemails[i].body; mailBox.appendChild(bodyBox); + + + } + + function showMessage(){ var showMail = this.querySelector('.hideBody'); if(showMail.style.display === 'block'){ @@ -46,17 +53,24 @@ } } +}; + +//function showMessage() { + //document.getElementById("list").style.display = "block"; +//} - }; + // };

Eugene's Coding Challenge

-

- -
+

+ +
+ +
From 9573e4b4d31f2beeb7682672b4b02a3f474c1acd Mon Sep 17 00:00:00 2001 From: Eugene Date: Sun, 2 Jun 2019 21:35:34 -1000 Subject: [PATCH 5/5] Update --- css/style.css | 8 +++----- index.html | 30 +++++++++++------------------- 2 files changed, 14 insertions(+), 24 deletions(-) diff --git a/css/style.css b/css/style.css index 08876d87..add375b4 100644 --- a/css/style.css +++ b/css/style.css @@ -14,11 +14,9 @@ color:red; display: none; } -/* -#list { - display: none; -} -*/ + + + .flip { font-size: 16px; padding: 10px; diff --git a/index.html b/index.html index 908d582c..61f0f0fa 100644 --- a/index.html +++ b/index.html @@ -21,7 +21,7 @@ var mailBox = document.createElement('div'); mailBox.className = 'date'; mailBox.innerHTML = "Date: " + geemails[i].date; - mailBox.addEventListener('click', showMessage) + mailBox.addEventListener('click',showMessage) wrapper.appendChild(mailBox); var senderBox = document.createElement('p'); @@ -43,23 +43,16 @@ } - - function showMessage(){ - var showMail = this.querySelector('.hideBody'); - if(showMail.style.display === 'block'){ - showMail.style.display = 'none' - }else{ - showMail.style.display = 'block' -} - +function showMessage() { + var x = this.querySelector('.hideBody'); + if (x.style.display === 'block') { + x.style.display = 'none'; + } else { + x.style.display = 'block'; + } } }; -//function showMessage() { - //document.getElementById("list").style.display = "block"; -//} - - // }; @@ -67,10 +60,9 @@

Eugene's Coding Challenge

- -
- -
+ + +
show message