Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- This is signup / login page using fasthtml
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Sign Up / Login Page by Ayie</title>
- <link rel="stylesheet" href="fasthtml.css">
- <!-- Link to FASTHTML CSS Framework -->
- <style>
- body {
- font-family: 'Arial', sans-serif;
- background-color: #f4f4f4;
- margin: 0;
- padding: 0;
- display: flex;
- justify-content: center;
- align-items: center;
- height: 100vh;
- }
- .form-container {
- width: 100%;
- max-width: 400px;
- padding: 20px;
- background-color: white;
- border-radius: 8px;
- box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.1);
- }
- .form-container h2 {
- margin-bottom: 20px;
- text-align: center;
- color: #333;
- }
- input[type="text"],
- input[type="password"],
- input[type="email"] {
- width: 100%;
- padding: 12px;
- margin: 8px 0;
- box-sizing: border-box;
- border: 1px solid #ccc;
- border-radius: 4px;
- }
- button {
- width: 100%;
- padding: 14px;
- background-color: #007bff;
- color: white;
- border: none;
- border-radius: 4px;
- cursor: pointer;
- font-size: 16px;
- }
- button:hover {
- background-color: #0056b3;
- }
- .switch-link {
- text-align: center;
- margin-top: 10px;
- }
- .switch-link a {
- color: #007bff;
- text-decoration: none;
- }
- .switch-link a:hover {
- text-decoration: underline;
- }
- @media (max-width: 768px) {
- .form-container {
- width: 90%;
- }
- }
- @media (min-width: 769px) {
- .form-container {
- max-width: 600px;
- }
- body {
- background-color: #e9ecef;
- }
- input[type="text"],
- input[type="password"],
- input[type="email"] {
- padding: 16px;
- }
- button {
- padding: 18px;
- font-size: 18px;
- }
- .switch-link {
- font-size: 16px;
- }
- }
- </style>
- </head>
- <body>
- <div class="form-container" id="sign-up-form">
- <h2>Sign Up</h2>
- <form action="/signup" method="post">
- <input type="text" name="fullname" placeholder="Full Name" required>
- <input type="email" name="email" placeholder="Email Address" required>
- <input type="password" name="password" placeholder="Password" required>
- <button type="submit">Sign Up</button>
- </form>
- <div class="switch-link">
- Already have an account? <a href="#" onclick="showLogin()">Log in</a>
- </div>
- </div>
- <div class="form-container" id="login-form" style="display:none;">
- <h2>Log In</h2>
- <form action="/login" method="post">
- <input type="email" name="email" placeholder="Email Address" required>
- <input type="password" name="password" placeholder="Password" required>
- <button type="submit">Log In</button>
- </form>
- <div class="switch-link">
- Don't have an account? <a href="#" onclick="showSignUp()">Sign up</a>
- </div>
- </div>
- <script>
- function showLogin() {
- document.getElementById('sign-up-form').style.display = 'none';
- document.getElementById('login-form').style.display = 'block';
- }
- function showSignUp() {
- document.getElementById('login-form').style.display = 'none';
- document.getElementById('sign-up-form').style.display = 'block';
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment