From 57cf886febc7a72cbc3ef3090d67ba7e4005f1b6 Mon Sep 17 00:00:00 2001 From: PeytonLamb Date: Sat, 10 Feb 2024 17:15:58 -0800 Subject: [PATCH 1/2] added forum-project js, css, and html --- forum-peyton | 1 + forum.css | 7 +++++ index.html | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++ main.js | 24 +++++++++++++++++ 4 files changed, 108 insertions(+) create mode 160000 forum-peyton create mode 100644 forum.css create mode 100644 index.html create mode 100644 main.js diff --git a/forum-peyton b/forum-peyton new file mode 160000 index 0000000..b2372d5 --- /dev/null +++ b/forum-peyton @@ -0,0 +1 @@ +Subproject commit b2372d55919849ed917b0bbc657e6cf58d108415 diff --git a/forum.css b/forum.css new file mode 100644 index 0000000..47c9848 --- /dev/null +++ b/forum.css @@ -0,0 +1,7 @@ +body { +background-color: rgb(203, 191, 158); +} + +.userName { + color: blue; +} diff --git a/index.html b/index.html new file mode 100644 index 0000000..eda0218 --- /dev/null +++ b/index.html @@ -0,0 +1,76 @@ + + + Peyton Place + + + + +
+
+ + + +
+
+

+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+ + +
+ +
+
+ + + + + + + + diff --git a/main.js b/main.js new file mode 100644 index 0000000..77c5f4b --- /dev/null +++ b/main.js @@ -0,0 +1,24 @@ +// create a feature that would allow the user to add a new "post" +// (a message associated with a user's name) to the '.posts' div. + + +var comment = document.addEventListener('DOMContentLoaded', function () { + var submitCommentButton = document.querySelector('.btn.btn-primary'); + var commentSection = document.getElementById('commentSection'); + // when button is clicked, add comment to the list of other comments + submitCommentButton.addEventListener('click', function () { + // USe values of the new submitted name and message + var name = document.getElementById('name').value; + var message = document.getElementById('message').value; + + var newComment = `

${message} - Posted by: ${name}

`; + commentSection.innerHTML += newComment; + }); +}); + + +// submitCommentButton.addEventListener('click', function () { +// // when button is clicked, add comment to list of comemnts above +// console.log(document.getElementById('name')); + +// }); \ No newline at end of file From 3882be4f1a4c472427163cafbcee8357911b99ea Mon Sep 17 00:00:00 2001 From: PeytonLamb Date: Sat, 10 Feb 2024 17:41:24 -0800 Subject: [PATCH 2/2] committing my posts/comments eval --- forum-peyton | 1 - 1 file changed, 1 deletion(-) delete mode 160000 forum-peyton diff --git a/forum-peyton b/forum-peyton deleted file mode 160000 index b2372d5..0000000 --- a/forum-peyton +++ /dev/null @@ -1 +0,0 @@ -Subproject commit b2372d55919849ed917b0bbc657e6cf58d108415