| 1 |
<link href='https://fonts.googleapis.com/css?family=Open+Sans:700,600' rel='stylesheet' type='text/css'> |
| 2 |
|
| 3 |
<style> |
| 4 |
body { |
| 5 |
font-family: 'Open Sans', sans-serif; |
| 6 |
background: #3498db; |
| 7 |
margin: 0 auto 0 auto; |
| 8 |
width: 100%; |
| 9 |
text-align: center; |
| 10 |
margin: 20px 0px 20px 0px; |
| 11 |
} |
| 12 |
|
| 13 |
p { |
| 14 |
font-size: 12px; |
| 15 |
text-decoration: none; |
| 16 |
color: #ffffff; |
| 17 |
} |
| 18 |
|
| 19 |
h1 { |
| 20 |
font-size: 1.5em; |
| 21 |
color: #525252; |
| 22 |
} |
| 23 |
|
| 24 |
.box { |
| 25 |
background: white; |
| 26 |
width: 300px; |
| 27 |
border-radius: 6px; |
| 28 |
margin: 0 auto 0 auto; |
| 29 |
padding: 0px 0px 70px 0px; |
| 30 |
border: #2980b9 4px solid; |
| 31 |
} |
| 32 |
|
| 33 |
.email { |
| 34 |
background: #ecf0f1; |
| 35 |
border: #ccc 1px solid; |
| 36 |
border-bottom: #ccc 2px solid; |
| 37 |
padding: 8px; |
| 38 |
width: 250px; |
| 39 |
color: #AAAAAA; |
| 40 |
margin-top: 10px; |
| 41 |
font-size: 1em; |
| 42 |
border-radius: 4px; |
| 43 |
} |
| 44 |
|
| 45 |
.password { |
| 46 |
border-radius: 4px; |
| 47 |
background: #ecf0f1; |
| 48 |
border: #ccc 1px solid; |
| 49 |
padding: 8px; |
| 50 |
width: 250px; |
| 51 |
font-size: 1em; |
| 52 |
} |
| 53 |
|
| 54 |
.btn { |
| 55 |
background: #2ecc71; |
| 56 |
width: 250px; |
| 57 |
padding-top: 5px; |
| 58 |
padding-bottom: 5px; |
| 59 |
color: white; |
| 60 |
border-radius: 4px; |
| 61 |
border: #27ae60 1px solid; |
| 62 |
|
| 63 |
margin-top: 20px; |
| 64 |
margin-bottom: 20px; |
| 65 |
float: left; |
| 66 |
margin-left: 16px; |
| 67 |
font-weight: 800; |
| 68 |
font-size: 0.8em; |
| 69 |
} |
| 70 |
|
| 71 |
.btn:hover { |
| 72 |
background: #2CC06B; |
| 73 |
} |
| 74 |
</style> |
| 75 |
|
| 76 |
<form method="post" action="/login"> |
| 77 |
<div class="box"> |
| 78 |
<h1>Simple Login</h1> |
| 79 |
|
| 80 |
<input type="email" name="email" value="email" onFocus="field_focus(this, 'email');" |
| 81 |
onblur="field_blur(this, 'email');" class="email"/> |
| 82 |
|
| 83 |
<input type="password" name="password" value="password" onFocus="field_focus(this, 'password');" |
| 84 |
onblur="field_blur(this, 'password');" class="password"/> |
| 85 |
|
| 86 |
<a href="#"> |
| 87 |
<button class="btn" type="submit">Sign In</button> |
| 88 |
</a> |
| 89 |
|
| 90 |
</div> |
| 91 |
|
| 92 |
</form> |
| 93 |
|
| 94 |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js" type="text/javascript"></script> |
| 95 |
|
| 96 |
<script type="text/javascript"> |
| 97 |
function field_focus(field, email) { |
| 98 |
if (field.value == email) { |
| 99 |
field.value = ''; |
| 100 |
} |
| 101 |
} |
| 102 |
|
| 103 |
function field_blur(field, email) { |
| 104 |
if (field.value == '') { |
| 105 |
field.value = email; |
| 106 |
} |
| 107 |
} |
| 108 |
|
| 109 |
//Fade in dashboard box |
| 110 |
$(document).ready(function () { |
| 111 |
$('.box').hide().fadeIn(1000); |
| 112 |
}); |
| 113 |
</script> |