-
Notifications
You must be signed in to change notification settings - Fork 0
Revise signup page layout and styles #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,156 +1,167 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8" /> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
| <title>Scream - Signup</title> | ||
|
|
||
| <style> | ||
| :root { | ||
| --primary: #4A90E2; | ||
| --primary-light: #74b4ff; | ||
| --background: #111; | ||
| --card-bg: #1b1b1b; | ||
| --text-dark: #fff; | ||
| --text-light: #ccc; | ||
| } | ||
|
|
||
| body { | ||
| font-family: Arial, sans-serif; | ||
| background: var(--background); | ||
| color: var(--text-dark); | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| height: 100vh; | ||
| margin: 0; | ||
| } | ||
|
|
||
| .container { | ||
| background: var(--card-bg); | ||
| padding: 30px; | ||
| border-radius: 14px; | ||
| width: 380px; | ||
| box-shadow: 0px 0px 15px rgba(255, 255, 255, 0.08); | ||
| display: flex; | ||
| flex-direction: column; | ||
| gap: 12px; | ||
| } | ||
|
|
||
| h2 { | ||
| text-align: center; | ||
| margin-bottom: 10px; | ||
| font-size: 26px; | ||
| } | ||
|
|
||
| label { | ||
| font-size: 14px; | ||
| margin-bottom: 2px; | ||
| } | ||
|
|
||
| input { | ||
| width: 100%; | ||
| padding: 12px; | ||
| border-radius: 8px; | ||
| border: none; | ||
| background: #2b2b2b; | ||
| color: var(--text-dark); | ||
| } | ||
|
|
||
| input:focus { | ||
| outline: 2px solid var(--primary); | ||
| } | ||
|
|
||
| #username-status { | ||
| font-size: 13px; | ||
| height: 16px; | ||
| margin-top: -6px; | ||
| } | ||
|
|
||
| button { | ||
| width: 100%; | ||
| padding: 14px; | ||
| margin-top: 10px; | ||
| background: var(--primary); | ||
| border: none; | ||
| border-radius: 8px; | ||
| color: white; | ||
| cursor: pointer; | ||
| font-size: 16px; | ||
| } | ||
|
|
||
| button:hover { | ||
| background: #3578c8; | ||
| } | ||
|
|
||
| .login-link { | ||
| text-align: center; | ||
| margin-top: 15px; | ||
| font-size: 14px; | ||
| } | ||
|
|
||
| .login-link a { | ||
| color: var(--primary-light); | ||
| text-decoration: none; | ||
| } | ||
|
|
||
| .login-link a:hover { | ||
| text-decoration: underline; | ||
| } | ||
| </style> | ||
| </head> | ||
| <meta charset="UTF-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <title>Scream - Home</title> | ||
| <link rel="icon" type="image/png" href="blue.webp"> <!-- Favicon added here --> | ||
| <meta charset="UTF-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <title>Scream - Sign Up</title> | ||
| <style> | ||
| body { | ||
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | ||
| margin: 0; | ||
| padding: 0; | ||
| background: url('background.jpg') no-repeat center center fixed; | ||
| background-size: cover; | ||
| display: flex; | ||
| justify-content: center; | ||
| align-items: center; | ||
| height: 100vh; | ||
| color: #333; | ||
| } | ||
|
Comment on lines
+4
to
+23
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OverviewThis HTML file represents an earlier or alternative version of the Scream – Sign Up page. Compared to the newer version, it focuses more on visual branding and background presentation rather than performance, structure, and modern UI consistency. Key Characteristics
Differences from the Newer Version
Code Quality Notes
SummaryOverall, this version reflects a design-first approach, prioritizing appearance and branding. In contrast, the newer file moves toward a performance-first, minimal, and scalable UI architecture, which is better suited for modern, fast, app-like experiences. |
||
|
|
||
| <body> | ||
| <div class="container"> | ||
| <h2>Create Account</h2> | ||
|
|
||
| <!-- CONNECTED BACKEND FORM --> | ||
| <form action="signup_action.php" method="POST"> | ||
|
|
||
| <label>Username</label> | ||
| <input type="text" id="username" name="username" placeholder="Choose a username" required /> | ||
| <div id="username-status"></div> | ||
|
|
||
| <label>Email</label> | ||
| <input type="email" id="email" name="email" placeholder="Enter your email" required /> | ||
|
|
||
| <label>Password</label> | ||
| <input type="password" id="password" name="password" placeholder="Create a password" required /> | ||
|
|
||
| <label>Date of Birth</label> | ||
| <input type="date" id="dob" name="dob" required /> | ||
|
|
||
| <button type="submit">Sign Up</button> | ||
| </form> | ||
|
|
||
|
Comment on lines
-108
to
-125
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a tricky portion where the username that we are taking and it's connected to the backend. We are taking username from using the label and the name that we used in the database is given here. We are taking email, email, and password for password, birthdate for birthdate, and the type of submission we have signup button. |
||
| <div class="login-link">Already have an account? <a href="#">Login here</a>.</div> | ||
| </div> | ||
|
|
||
| <script> | ||
| document.getElementById('username').addEventListener('input', function() { | ||
| const username = this.value.trim(); | ||
| const statusBox = document.getElementById('username-status'); | ||
|
|
||
| if (username.length < 3) { | ||
| statusBox.style.color = 'orange'; | ||
| statusBox.textContent = 'Username too short'; | ||
| return; | ||
| } | ||
|
|
||
| // LIVE CHECK (Must match your backend file) | ||
| fetch('check_username.php?username=' + username) | ||
| .then(res => res.text()) | ||
| .then(data => { | ||
| if (data === 'taken') { | ||
| statusBox.style.color = 'red'; | ||
| statusBox.textContent = 'Username already taken'; | ||
| } else { | ||
| statusBox.style.color = 'lightgreen'; | ||
| statusBox.textContent = 'Username available'; | ||
| .signup-container { | ||
| background-color: rgba(255, 255, 255, 0.9); | ||
| padding: 30px 40px; | ||
| border-radius: 10px; | ||
| box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2); | ||
| width: 100%; | ||
| max-width: 450px; | ||
| } | ||
|
|
||
| .signup-container h1 { | ||
| font-size: 28px; | ||
| margin-bottom: 25px; | ||
| text-align: center; | ||
| color: #444; | ||
| } | ||
|
|
||
| .form-group { | ||
| margin-bottom: 20px; | ||
| } | ||
|
|
||
| .form-group label { | ||
| display: block; | ||
| margin-bottom: 8px; | ||
| font-weight: bold; | ||
| color: #555; | ||
| } | ||
|
|
||
| .form-group input, .form-group select { | ||
| width: 100%; | ||
| padding: 12px; | ||
| font-size: 15px; | ||
| border: 1px solid #ccc; | ||
| border-radius: 5px; | ||
| box-sizing: border-box; | ||
| background: #fdfdfd; | ||
| } | ||
|
|
||
| .form-group input[type="file"] { | ||
| padding: 6px; | ||
| } | ||
|
|
||
| .form-row { | ||
| display: flex; | ||
| gap: 15px; | ||
|
Comment on lines
+25
to
+68
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OverviewThis CSS snippet defines the core visual styling for a signup form container and its internal form elements. The code is clean, readable, and follows common UI patterns used in modern web forms. Strengths
UI & UX Considerations
Areas for Improvement
Maintainability Notes
SummaryOverall, this code demonstrates a solid, conventional approach to form styling. It prioritizes clarity, usability, and visual balance. With minor enhancements around accessibility, responsiveness, and theming, it can easily scale to production-quality UI standards. |
||
| } | ||
| }); | ||
| }); | ||
| </script> | ||
|
|
||
| .form-row .form-group { | ||
| flex: 1; | ||
| } | ||
|
|
||
| .signup-button { | ||
| width: 100%; | ||
| padding: 15px; | ||
| font-size: 16px; | ||
| background-color: #007bff; | ||
| color: #fff; | ||
| border: none; | ||
| border-radius: 5px; | ||
| cursor: pointer; | ||
| font-weight: bold; | ||
| transition: background-color 0.3s; | ||
| } | ||
|
|
||
| .signup-button:hover { | ||
| background-color: #0056b3; | ||
| } | ||
|
|
||
| .footer { | ||
| margin-top: 20px; | ||
| text-align: center; | ||
| font-size: 13px; | ||
| color: #888; | ||
| } | ||
|
|
||
| .footer a { | ||
| color: #007bff; | ||
| text-decoration: none; | ||
| } | ||
|
|
||
| .footer a:hover { | ||
| text-decoration: underline; | ||
| } | ||
| </style> | ||
| </head> | ||
| <body> | ||
| <div class="signup-container"> | ||
| <h1>Sign Up for Scream</h1> | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. title |
||
| <form action="signupaction.php" method="POST" enctype="multipart/form-data"> | ||
| <div class="form-group"> | ||
| <label for="username">Username</label> | ||
| <input type="text" id="username" name="username" required> | ||
| </div> | ||
|
|
||
| <div class="form-group"> | ||
| <label for="fullname">Full Name</label> | ||
| <input type="text" id="fullname" name="fullname" required> | ||
| </div> | ||
|
|
||
| <div class="form-row"> | ||
| <div class="form-group"> | ||
| <label for="email">Email</label> | ||
| <input type="email" id="email" name="email" required> | ||
| </div> | ||
| <div class="form-group"> | ||
| <label for="phone">Phone Number</label> | ||
| <input type="text" id="phone" name="phone" required> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div class="form-group"> | ||
| <label for="age">Age</label> | ||
| <input type="number" id="age" name="age" required min="13"> | ||
| </div> | ||
|
|
||
| <div class="form-group"> | ||
| <label for="sex">Sex</label> | ||
| <select id="sex" name="sex" required> | ||
| <option value="">Select</option> | ||
| <option value="male">Male</option> | ||
| <option value="female">Female</option> | ||
| <option value="other">Other</option> | ||
| </select> | ||
| </div> | ||
|
|
||
| <div class="form-group"> | ||
| <label for="location">Location</label> | ||
| <input type="text" id="location" name="location" required> | ||
| </div> | ||
|
|
||
| <div class="form-group"> | ||
| <label for="password">Password</label> | ||
| <input type="password" id="password" name="password" required> | ||
| </div> | ||
|
|
||
| <button type="submit" class="signup-button">Sign Up</button> | ||
| </form> | ||
| <div class="footer"> | ||
| By signing up, you agree to our <a href="#">Terms</a> and <a href="#">Privacy Policy</a>. | ||
| </div> | ||
| </div> | ||
|
Comment on lines
+71
to
+164
Owner
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OverviewThis code defines the layout, styling, and structure of a complete signup form for the Scream application. It combines CSS for visual behavior and HTML for form structure and data collection. The implementation is straightforward, readable, and suitable for beginner-to-intermediate level projects. CSS Review (Why these styles exist)
|
||
| </body> | ||
| </html> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meta tags are used and Favicon added