From 0eb3a604f6210e1b29661a47e27019e4f592326a Mon Sep 17 00:00:00 2001 From: Robert <152218269+PenguinRobert1@users.noreply.github.com> Date: Thu, 30 Jan 2025 15:28:40 +0000 Subject: [PATCH] 1 --- Contact.css | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++ Contact.html | 30 ++++++++++++++++++++++++- Contact.js | 20 ++++++++--------- script2.js | 5 +++++ 4 files changed, 106 insertions(+), 11 deletions(-) diff --git a/Contact.css b/Contact.css index e69de29b..cbfb9678 100644 --- a/Contact.css +++ b/Contact.css @@ -0,0 +1,62 @@ +body { + font-family: Arial, sans-serif; + background-color: #f4f4f4; + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + margin: 0; +} + +.container { + background: #fff; + padding: 20px; + border-radius: 10px; + box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); + width: 90%; + max-width: 500px; +} + +h1 { + text-align: center; + margin-bottom: 20px; +} + +form { + display: flex; + flex-direction: column; +} + +label { + margin-bottom: 5px; + font-weight: bold; +} + +input, textarea { + margin-bottom: 10px; + padding: 10px; + border: 1px solid #ccc; + border-radius: 5px; + font-size: 16px; +} + +button { + padding: 10px; + border: none; + border-radius: 5px; + background-color: #007BFF; + color: #fff; + font-size: 16px; + cursor: pointer; + transition: background-color 0.3s; +} + +button:hover { + background-color: #0056b3; +} + +#statusMessage { + text-align: center; + margin-top: 20px; + color: green; +} \ No newline at end of file diff --git a/Contact.html b/Contact.html index 7126e3e7..fc6fba1b 100644 --- a/Contact.html +++ b/Contact.html @@ -4,4 +4,32 @@ My Broken Scratch Website See Art That Miles maybe will Use -See The Scratch Company Site \ No newline at end of file +See The Scratch Company Site + + + + + + Contact Us + + + +
+

Contact Us

+
+ + + + + + + + + + +
+

+
+ + + diff --git a/Contact.js b/Contact.js index 13a00144..8509b984 100644 --- a/Contact.js +++ b/Contact.js @@ -1,12 +1,12 @@ -document.getElementById('contactForm').addEventListener('submit', functie(gebeurtenis) { - gebeurtenis.preventDefault(); - const naam = document.getElementById('naam').value; +document.getElementById('contactForm').addEventListener('submit', function(event) { + event.preventDefault(); + const name = document.getElementById('name').value; const email = document.getElementById('email').value; - const bericht = document.getElementById('bericht').value; - - als (naam && e-mail && bericht) { - document.getElementById('statusMessage').textContent = 'Bedankt voor uw bericht, ' + name + '! We nemen zo snel mogelijk contact met u op.'; - } anders { - document.getElementById('statusMessage').textContent = 'Vul alle velden in.'; + const message = document.getElementById('message').value; + + if (name && email && message) { + document.getElementById('statusMessage').textContent = 'Thank you for reaching out, ' + name + '! We will get back to you soon.'; + } else { + document.getElementById('statusMessage').textContent = 'Please fill out all fields.'; } - }); \ No newline at end of file +}); \ No newline at end of file diff --git a/script2.js b/script2.js index 042f245c..80dbfc59 100644 --- a/script2.js +++ b/script2.js @@ -80,6 +80,11 @@ const mainContentData = [ image: "/gamestooadd.jpeg", link: "/gametoadd.html", }, + { + name: "Contact Us", + image: "/gamestooadd.jpeg", + link: "/gametoadd.html", + } ]; mainContentData.forEach(item => { let newDiv = `