Skip to content
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
59 changes: 59 additions & 0 deletions 10week/bio-part-2/css/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
body {
font-family: "Open Sans";
font-size: 14px;
background-image: url(../images/BG.jpg);
background-size: cover;
background-repeat: no-repeat;
background-size: 3000px;
}

.box {
/* width: 500px;
margin: 25px auto; */
width: 450px;
background: rgba(0,0,0,0.4);
padding: 40px;
text-align: center;
margin: auto;
margin-top: 5%;
color: white;
font-family: 'Century Gothic', sans-serif;
}
}

form {
padding: 20px;
background: grey;
color: white;
border-radius: 4px;
}

label, input, button {
border: 0;
margin-bottom: 3px;
display: block;
width: 100%;
}
input {
height: 25px;
line-height: 25px;
background: $inputBg;
color: $inputColor;
padding: 0 6px;
@include box-sizing(border-box);
}

button {
height: 30px;
line-height: 30px;
background: $buttonBg;
color: $buttonColor;
margin-top: 10px;
cursor: pointer;
}

.checkboxes {
display: flex;
flex-direction: column;

}
Binary file added 10week/bio-part-2/images/BG.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions 10week/bio-part-2/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="./css/style.css">
</head>
<body>
<div class="box">
<h2>Sign Up!</h2>
<form action="" name="registration">
<label for="firstname">First Name</label>
<input type="text" name="firstname" id="firstname" placeholder="John">

<label for="lastname">Last Name</label>
<input type="text" name="lastname" id="lastname" placeholder="Doe">

<label for="email">Email</label>
<input type="email" name="email" id="email" placeholder="johndoe@gmail.com">

<label form="password">Password</label>
<input tabindex="password" name="password" id="password" placeholder="&#9679;&#9679;&#9679;&#9679;&#9679;">
<div class="checkboxes">
Male<br>
<input type="radio" name="gender" value="male">
Female<br>
<input type="radio" name="gender" value="female">
Other
<input type="radio" name="gender" value="other">
Do you want updates emailed to you?
<input type="checkbox" name="question1" value="Question">
Do you want news related to our content emailed monthly?
<input type="checkbox" name="question2" value="Question2">
</div>
<br>
How would you rate your experience?
<input type="range" name="points" min="0" max="10">
<button type="submit">Register</button>
<button type="reset">Clear</button>
</form>
</div>
<script type="text/javascript" src="https://cdn.jsdelivr.net/jquery/1.12.4/jquery.min.js"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/jquery.validation/1.15.1/jquery.validate.min.js"></script>
<script type="text/javascript" src="./js/script.js"></script>
</body>
</html>
28 changes: 28 additions & 0 deletions 10week/bio-part-2/js/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
$(function() {
$("form[name='registration']").validate({
rules: {
firstname: "required",
lastname: "required",
email: {
required: true,
email: true
},
password: {
required: true,
minlength: 5
}
},
messages: {
firstname: "Please enter your firstname",
lastname: "Please enter your lastname",
password: {
required: "Please provide a password",
minlength: "Your password must be at least 5 characters long"
},
email: "Please enter a valid email address"
},
submitHandler: function(form) {
form.submit();
}
});
});