From e88c3ce056c65fa0f97a7d59c131edba841eb9f1 Mon Sep 17 00:00:00 2001 From: JOYCE-FRED Date: Sat, 17 Oct 2020 20:23:09 +0100 Subject: [PATCH 1/9] add styles.css --- index.html | 1 + styles.css | 0 2 files changed, 1 insertion(+) create mode 100644 styles.css diff --git a/index.html b/index.html index 56a0e2e..90ae459 100644 --- a/index.html +++ b/index.html @@ -4,6 +4,7 @@ Sanni's Journal + diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..e69de29 From daf86ca4e2d07ee5a0e9d51b0b0b4b3ad3fc1df5 Mon Sep 17 00:00:00 2001 From: JOYCE-FRED Date: Sun, 18 Oct 2020 11:00:34 +0100 Subject: [PATCH 2/9] update files --- index.html | 1 + styles.css | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 81 insertions(+) diff --git a/index.html b/index.html index 90ae459..2be50bc 100644 --- a/index.html +++ b/index.html @@ -5,6 +5,7 @@ Sanni's Journal + diff --git a/styles.css b/styles.css index e69de29..3b00659 100644 --- a/styles.css +++ b/styles.css @@ -0,0 +1,80 @@ +body{ + margin: auto; + font-family: 'Gamja Flower', cursive; +} + + +header { +font-family: 'Chelsea Market', cursive; +background-color: #e4572e; +text-align: center; + +} + +header h2 { + color: white; + font-size: 13px; + margin-bottom: 5px; +} + +header h1 { + margin-top: 0px; + text-shadow: 2px 2px 0 #f7f4f2; +} + + +article { + + border: 4px solid #050401; + box-shadow: 3px 3px 0 0 #e4572e; + text-align: left; + margin-bottom: 10px; + margin-right: 20%; + margin-left: 20%; + padding-bottom: 60px; + padding-right: 30px; +} + +img { + float: right; +} + +main article h2, p{ + margin-bottom: 2px; + margin-top: .1em; +} + +hr { + margin-top: 30px; +} + +footer h2 { + text-align: center; + margin-bottom: 0px; + +} + +footer { + text-align: center; +} + +footer p { + margin-top: 0px; + margin-bottom: 5px; + font-weight: bold; +} + +body, main { + background-color: #fffff2; +} + +form p { + + display: inline-block; + border: .5px solid; + box-shadow: 3px 3px #e4572e; + margin-right: 10px; + + } + + From 7d18e3a701834b313d3d07cb563ea775d482f009 Mon Sep 17 00:00:00 2001 From: JOYCE-FRED Date: Sun, 18 Oct 2020 12:12:36 +0100 Subject: [PATCH 3/9] edit --- index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/index.html b/index.html index 2be50bc..a499402 100644 --- a/index.html +++ b/index.html @@ -13,6 +13,7 @@

Sanni's Journal

So fresh and so clean

+

Add a new note

13/05/23: Spatulas

From c916943b6a771e0c57501ccd01b194b37fba438c Mon Sep 17 00:00:00 2001 From: JOYCE-FRED Date: Sun, 18 Oct 2020 12:15:11 +0100 Subject: [PATCH 4/9] update files --- styles.css | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/styles.css b/styles.css index 3b00659..3b3729d 100644 --- a/styles.css +++ b/styles.css @@ -22,6 +22,14 @@ header h1 { text-shadow: 2px 2px 0 #f7f4f2; } +.note { + text-align: center; + margin: 10px 30% 40px 30%; + border: 4px 50px solid #050401; + box-shadow: 3px 3px 0 0 #e4572e; + background-color: black; + color: white; +} article { From 9996bce3dc635b69b1418bc03b3f74bdd226d725 Mon Sep 17 00:00:00 2001 From: JOYCE-FRED Date: Sun, 18 Oct 2020 12:16:03 +0100 Subject: [PATCH 5/9] create index.js --- index.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 index.js diff --git a/index.js b/index.js new file mode 100644 index 0000000..e69de29 From e317703415c9a3f3034d562414f499f0e4ba68d6 Mon Sep 17 00:00:00 2001 From: JOYCE-FRED Date: Sun, 18 Oct 2020 12:50:49 +0100 Subject: [PATCH 6/9] change file --- index.html | 2 +- styles.css | 19 +++++++++++++++---- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index a499402..feae22c 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@

Sanni's Journal

So fresh and so clean

-

Add a new note

+

13/05/23: Spatulas

diff --git a/styles.css b/styles.css index 3b3729d..f1c1c2d 100644 --- a/styles.css +++ b/styles.css @@ -20,15 +20,26 @@ header h2 { header h1 { margin-top: 0px; text-shadow: 2px 2px 0 #f7f4f2; + } -.note { - text-align: center; - margin: 10px 30% 40px 30%; - border: 4px 50px solid #050401; + +p .button { + border: 4px 5px solid #050401; box-shadow: 3px 3px 0 0 #e4572e; background-color: black; color: white; + padding: 10px 200px 10px 200px; + margin-left: 30%; + margin-bottom: 40px; + text-decoration: none; + font-family: 'Gamja Flower', cursive; + +} + + +body .button { + text-align: center; } article { From e0cf6f6f66853e1e0904ef1c293dc6448d55bbe4 Mon Sep 17 00:00:00 2001 From: JOYCE-FRED Date: Thu, 22 Oct 2020 15:27:22 +0100 Subject: [PATCH 7/9] new change --- index.html | 2 +- index.js => script.js | 0 styles.css | 10 +++++----- 3 files changed, 6 insertions(+), 6 deletions(-) rename index.js => script.js (100%) diff --git a/index.html b/index.html index feae22c..137f8f9 100644 --- a/index.html +++ b/index.html @@ -13,7 +13,7 @@

Sanni's Journal

So fresh and so clean

-

+

13/05/23: Spatulas

diff --git a/index.js b/script.js similarity index 100% rename from index.js rename to script.js diff --git a/styles.css b/styles.css index f1c1c2d..c446d36 100644 --- a/styles.css +++ b/styles.css @@ -24,16 +24,16 @@ header h1 { } -p .button { +button { + position: relative; border: 4px 5px solid #050401; box-shadow: 3px 3px 0 0 #e4572e; background-color: black; color: white; padding: 10px 200px 10px 200px; - margin-left: 30%; - margin-bottom: 40px; - text-decoration: none; - font-family: 'Gamja Flower', cursive; + display: block; + margin: 20px auto; + } From d479b5a31569f365a115939e53b909dae756d1f4 Mon Sep 17 00:00:00 2001 From: JOYCE-FRED Date: Fri, 23 Oct 2020 22:55:01 +0100 Subject: [PATCH 8/9] complete task --- index.html | 7 ++++--- script.js | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ styles.css | 6 ++++++ 3 files changed, 64 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 137f8f9..74fa31c 100644 --- a/index.html +++ b/index.html @@ -7,14 +7,14 @@ -

Sanni's Journal

So fresh and so clean

- -
+ +

+

13/05/23: Spatulas

spatulas

@@ -44,6 +44,7 @@

Stay connected

© 2023 Sanni. No Rights Reserved.

+ \ No newline at end of file diff --git a/script.js b/script.js index e69de29..88855cd 100644 --- a/script.js +++ b/script.js @@ -0,0 +1,54 @@ + + + +const buttons = document.getElementById("buttons") +buttons.addEventListener("click", mynote); + +function numberofnotes() { +let notes = document.getElementsByTagName("article"); +document.getElementById("demo").innerHTML = "You have " + notes.length + " notes"; +document.getElementById("demo").style.textAlign = "center"; +} + +numberofnotes(); + +let allnotes = document.getElementById("main-div"); + +function mynote() { + console.log("button hit"); + let heading = document.createElement("h2"); + let text = prompt("Enter next note date and note title"); + + + let note = document.createElement("p"); + let text2 = prompt("Enter your note"); + + if((text !== null || text2 !== null) && (text !== '' || text2 !== '')) { + heading.innerHTML = text; + note.innerHTML = text2; + + let article = document.createElement("article"); + article.appendChild(heading); + article.appendChild(note); + + let allnotes = document.getElementById("main-div"); + allnotes.insertBefore(article, allnotes.childNodes[0]); + numberofnotes(); + } +} + + + + + + + + + + + + + + + + diff --git a/styles.css b/styles.css index c446d36..d65d63d 100644 --- a/styles.css +++ b/styles.css @@ -96,4 +96,10 @@ form p { } + #para { + text-align: center; + margin: 20px auto; + + } + From 099fe0ed967f9c9b12e6762e487410b1bf8ae4a7 Mon Sep 17 00:00:00 2001 From: JOYCE-FRED Date: Mon, 26 Oct 2020 11:07:13 +0100 Subject: [PATCH 9/9] add note works --- script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.js b/script.js index 88855cd..4344826 100644 --- a/script.js +++ b/script.js @@ -23,7 +23,7 @@ function mynote() { let note = document.createElement("p"); let text2 = prompt("Enter your note"); - if((text !== null || text2 !== null) && (text !== '' || text2 !== '')) { + if((text !== null && text2 !== null) && (text !== '' && text2 !== '')) { heading.innerHTML = text; note.innerHTML = text2;