Skip to content

Aastik Mandil #20

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 82 additions & 30 deletions LoginPageTask/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,85 @@
<!-- ADDING A SUCCESS PAGE FOR THE SAME WILL BOOST YOUR CHANCES -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Login</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="main.css">
<script src="main.js"></script>
</head>
<body>
<img src="https://incubateind.com/images/IncubateIND%20Black.png" class="logo" alt="">
<!-- Beautify This -->
<div class="log-form">
<h2>Enter your details</h2>
<form>
<input type="text" title="username" placeholder="username" />
<input type="email" title="email" placeholder="email">
<input type="password" title="password" placeholder="password" />
<input type="password" title="cnfpassword" placeholder="confirm password" />
<textarea name="message" id="message" cols="35" rows="4" placeholder="enter message"></textarea>
<p>Age</p>
<input type="radio" id="above" name="age" value="above">
<label for="above">Above 18</label>
<input type="radio" id="below" name="age" value="below">
<label for="below">Below 18</label>
<button type="submit" class="btn">Submit</button>
</form>
</div>
<!-- Beautify Ends -->
</body>
</html>
<head>
<title>Title</title>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" type="text/css" media="screen" href="main.css">
<script src="main.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"/>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"/>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous" ></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous" ></script>
</head>
<body>
<div id="alert"></div>
<div class="container">
<div class="card-header">
<h2 class="heading"><b>Enter Your Details</b></h2>
</div>
<div class="detail">
<form id="DetailForm" class="form-horizontal">
<div class="form-group row element">
<label for="username" class="col-sm-2 col-form-label">Username</label>
<div class="col-sm-10 item">
<input type="text" class="form-control input" id="username" placeholder="Username" name="uname">
<div class="invalid-feedback" style="width: 100%;">Username is required</div>
</div>
</div>
<div class="form-group row element">
<label for="email" class="col-sm-2 col-form-label">Email</label>
<div class="col-sm-10 item">
<input type="email" class="form-control input" id="email" placeholder="Email Address" name="email">
<div class="invalid-feedback" style="width: 100%;">Email is required</div>
</div>
</div>
<div class="form-group row element">
<label for="password" class="col-sm-2 col-form-label">Password</label>
<div class="col-sm-10 item">
<input type="password" class="form-control input" id="password" placeholder="Password" name="password">
<div class="invalid-feedback" style="width: 100%;">Password is required</div>
</div>
</div>
<div class="form-group row element">
<label for="conformpassword" class="col-sm-2 col-form-label">Conform Password</label>
<div class="col-sm-10 item">
<input type="password" class="form-control input" id="conformpassword" placeholder="Conform Password" name="conformpassword">
<div class="invalid-feedback" style="width: 100%;">Conform Password is required</div>
</div>
</div>
<div class="form-group row element">
<label for="message" class="col-sm-2 col-form-label">Message</label>
<div class="col-sm-10 item">
<textarea type="number" class="form-control input" id="message" placeholder="Message" name="message" rows="4" cols="35"></textarea>
<div class="invalid-feedback" style="width: 100%;">Message is required</div>
</div>
</div>
<div class="form-group row element">
<label for="age" class="col-sm-2 col-form-label">Age</label>
<div class="col-sm-10 item">
<div class="form-check">
<input class="form-check-input" type="radio" name="age" id="above" value="above">
<label class="form-check-label" for="above">Above 18</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" name="age" id="below" value="below">
<label class="form-check-label" for="below">Below 18</label>
</div>
</div>
</div>
<div class="form-group row">
<div class="col-sm-10">
<button type="submit" class="btn btn-primary submit" id="submit"><b>Submit</b></button>
</div>
</div>
</form>
</div>
</div>
</body>
</html>
78 changes: 37 additions & 41 deletions LoginPageTask/main.css
Original file line number Diff line number Diff line change
@@ -1,41 +1,37 @@
* {
box-sizing: border-box;
}

body {
font-family: "open sans", helvetica, arial, sans;
}
.logo{
width: 100px;
}
.log-form {
width: 100%;
min-width: 320px;
max-width: 475px;
background: #fff;
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
-o-transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}

h2 {
text-align: center;
}
.log-form {
padding: 2em;
-webkit-box-shadow: 4px -1px 53px -7px rgba(138, 138, 138, 0.30);
-moz-box-shadow: 4px -1px 53px -7px rgba(138, 138, 138, 0.30);
box-shadow: 4px -1px 53px -7px rgba(138, 138, 138, 0.30);
}

form {
display: block;
text-align: center;
width: 100%;
}
/* ========================WRITE YOUR CSS FROM HERE======================== */
body{
background: lightgoldenrodyellow;
}
.container{
font-family: Arial, Helvetica, sans-serif;
background: darkslategrey;
max-width: 100%;
margin: 37px auto;
padding: 10px 10px 10px;
text-align: center;
border: 2px solid rgb(247, 210, 90);
border-radius: 20px;
}
.detail{
margin-top: 50px;
}
.heading{
background-color: rgb(72, 255, 72);
text-align: center;
padding: 20px;
color: rgb(238, 12, 106);
}
.element{
color: rgb(245, 135, 91);
text-align: start;
}
.input{
color: rgb(211, 27, 186);
}
.item{
color: white;
}
.submit{
width: 150px;
text-align: center;
margin:0 auto;
}
30 changes: 30 additions & 0 deletions LoginPageTask/main.js
Original file line number Diff line number Diff line change
@@ -1 +1,31 @@
/* ========================WRITE YOUR JS FROM HERE======================== */
$(document).ready(function(){
$("#submit").on("click", function(){
var username = $("#username").val();
var email = $("#email").val();
var password = $("#password").val();
var conformpassword = $("#conformpassword").val();
var message = $("#message").val();
var age = $("input[name='age']:checked").val();
if(username!="" && email!="" && password!="" && conformpassword!="" && message!="" && age!=""){
if(password==conformpassword){
document.getElementsById("#alert").innerHTML(
<div class="alert alert-success" role="alert">
<strong>Success! </strong>Data inserted successfully
</div>);
}
else{
document.getElementsById("#alert").innerHTML(
<div class="alert alert-danger" role="alert">
<strong>Danger! </strong>Please enter correct password
</div>);
}
}
else{
document.getElementsById("#alert").innerHTML(
<div class="alert alert-warning" role="alert">
<strong>Warning! </strong>Please fill all the details
</div>);
}
});
});