Skip to content

Commit

Permalink
Merge pull request #110 from Ankitha2130/main
Browse files Browse the repository at this point in the history
Login and Sign up
  • Loading branch information
tushargupta1504 authored Oct 2, 2024
2 parents 6b05596 + 7fb7e4c commit 9aae7bd
Show file tree
Hide file tree
Showing 5 changed files with 216 additions and 0 deletions.
Binary file added img/Background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions login.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Registration Form</title>
<link rel="stylesheet" type="text/css" href="./style3.css">
<script type="text/javascript" src="script3.js"></script>
</head>
<body>
<div class="main">
<h1 class="form-title">Medical Website</h1>
<form onsubmit="return validateInputs1()" action="index.html">
<class="main-user-info">
<div class="user-input-box">
<label for="email">E-mail : </label>
<input type="email" id="email" name="email" placeholder="Enter your mail id">
</div>
<div class="user-input-box">
<label for="password">password : </label>
<input type="password" id="password" name="password" placeholder="Enter password">
</div>
<div class="form-submit-button">
<input type="submit" value="Login">
</div>
<div class="register">
New User ? <a href="register.html">Register</a>
</div>
</div>
</form>
</div>
</body>
</html>
37 changes: 37 additions & 0 deletions register.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Registration Form</title>
<link rel="stylesheet" type="text/css" href="./style3.css">
<script type="text/javascript" src="script3.js"></script>
</head>
<body>
<div class="main">
<h1 class="form-title">Medical Website</h1>
<form onsubmit="return validateInputs()" action="index.html">
<class="main-user-info">
<div class="user-input-box">
<label for="name">Name : </label>
<input type="name" id="name" name="name" placeholder="Enter your name">
</div>
<div class="user-input-box">
<label for="email">E-mail : </label>
<input type="email" id="email" name="email" placeholder="Enter your mail id">
</div>
<div class="user-input-box">
<label for="password">password : </label>
<input type="password" id="password" name="password" placeholder="Enter password">
</div>
<div class="form-submit-button">
<input type="submit" value="Register">
</div>
<div class="register">
<a href="login.html">Back to login</a>
</div>
</div>
</form>
</div>
</body>
</html>
41 changes: 41 additions & 0 deletions script3.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
function validateInputs(){
var fullName=document.getElementById('name').value;
var email=document.getElementById('email').value;
var password=document.getElementById('password').value;
if (fullName==='') {
alert("Name is required");
return false;
}else{
true;
}
if (email===''){
alert("Email is required");
return false;
}
else{
true;
}
if (password===''){
alert("password is required");
return false;
}else{
alert("Registered successfully");
}
}
function validateInputs1(){
var email=document.getElementById('email').value;
var password=document.getElementById('password').value;
if (email===''){
alert("Email is required");
return false;
}
else{
true;
}
if (password===''){
alert("password is required");
return false;
}else{
alert("Registered successfully");
}
}
105 changes: 105 additions & 0 deletions style3.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
body{
display: flex;
height: 100vh;
justify-content: center;
align-items: center;
background-image: url("img/Background.jpg");
}
.main{
width: 100%;
max-width: 700px;
background: rgba(0,0,0,0.5);
padding: 28px;
margin: 0 28px;
border-radius: 10px;
}
.form-title{
font-size: 60px;
text-align: center;
padding-bottom: 5px;
font-style: italic;
}
.main-user-info{
display: flex;
justify-content: space-between;
flex-wrap: wrap;
padding: 20px 0;
}
.user-input-box{
justify-content: end;
display: flex;
flex-wrap: wrap;
width: 50%;
padding-bottom: 15px;
}
.user-input-box label{
width: 95%;
font-size: 20px;
margin: 5px 0;
}
.user-input-box input{
height: 35px;
width: 95%;
border-radius: 7px;
outline: none;
border: 1px solid grey;
}
.gender-details{
width: 100%;
padding: 10px;
}
.gender-title{
font-size: 23px;
}
.gender-category{
margin: 15px 0;
}
.gender-category label{
padding: 0 20px 0 5px;
}
.gender-category label,
.gender-category input,
.form-submit-button input{
cursor: pointer;
}
.form-submit-button{
width: 100%;
}
.form-submit-button input{
width: 100%;
margin-top: 10px;
font-size: 20px;
padding: 10px;
border: none;
border-radius: 3px;
background: rgba(56,204,93,0.7)
}
.form-submit-button input:hover{
color: rgb(255,255,255);
}
.register{
font-size: 25px;
text-align: center;
padding-top: 20px;
}
@media(max-width: 600px){
.main{
min-width: 200px;
}
.user-input-box{
margin-bottom: 12px;
width: 100%;
}
.gender-category{
display: flex;
justify-content: space-between;
width: 100%;
}
.main-user-info{
max-height: 300px;
overflow: auto;
}
.main-user-info::-webkit-scrollbar{
width: 0;
}
}

0 comments on commit 9aae7bd

Please sign in to comment.