From 90c2c0fb3a38a137761422a4fb6a920995a99dc7 Mon Sep 17 00:00:00 2001 From: Tanisha Chavan <151942801+Tanisha0708@users.noreply.github.com> Date: Mon, 11 Nov 2024 21:48:04 +0530 Subject: [PATCH] Add files via upload --- index.html | 56 +++++++++++++++++++++++++++++++---------------------- script.js | 31 +++++++++++++++++++++++++++++ style.css | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 121 insertions(+), 23 deletions(-) create mode 100644 script.js create mode 100644 style.css diff --git a/index.html b/index.html index a1a710b..022f4de 100644 --- a/index.html +++ b/index.html @@ -3,35 +3,45 @@ - Social Media Platform - + Social Media Management System + - -
-

Login

-
- - - -
-
+
+
+

Login to Social Media Management

+
+ + + + + + + + + + + - -
+ diff --git a/script.js b/script.js new file mode 100644 index 0000000..feb91b4 --- /dev/null +++ b/script.js @@ -0,0 +1,31 @@ +document.getElementById('loginForm').addEventListener('submit', function(event) { + event.preventDefault(); + + const username = document.getElementById('username').value; + const email = document.getElementById('email').value; + const bio = document.getElementById('bio').value; + + // Hide login form and show welcome message + document.getElementById('login-container').style.display = 'none'; + document.getElementById('welcome-container').style.display = 'block'; + + // Display a welcome message with the username + document.getElementById('userMessage').innerText = `Welcome, ${username}!`; + + // Store user details for the account view + document.getElementById('accountUsername').innerText = username; + document.getElementById('accountEmail').innerText = email; + document.getElementById('accountBio').innerText = bio; +}); + +document.getElementById('viewAccountBtn').addEventListener('click', function() { + document.getElementById('welcome-container').style.display = 'none'; + document.getElementById('account-container').style.display = 'block'; +}); + +document.getElementById('logoutBtn').addEventListener('click', function() { + // Reset to initial view + document.getElementById('account-container').style.display = 'none'; + document.getElementById('login-container').style.display = 'block'; + document.getElementById('loginForm').reset(); +}); diff --git a/style.css b/style.css new file mode 100644 index 0000000..150f630 --- /dev/null +++ b/style.css @@ -0,0 +1,57 @@ +body { + font-family: Arial, sans-serif; + background-color: #f0f2f5; + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + margin: 0; +} + +.container { + width: 400px; + padding: 20px; + background: #fff; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); + border-radius: 8px; + text-align: center; +} + +h2 { + color: #333; +} + +form { + display: flex; + flex-direction: column; +} + +label { + margin: 10px 0 5px; + text-align: left; + color: #555; +} + +input, textarea { + padding: 10px; + margin-bottom: 10px; + border: 1px solid #ccc; + border-radius: 4px; +} + +button { + padding: 10px; + background-color: #007bff; + border: none; + color: #fff; + border-radius: 4px; + cursor: pointer; +} + +button:hover { + background-color: #0056b3; +} + +#account-container, #welcome-container { + margin-top: 20px; +}