MedWatch 2.0 search-TheDL
by Alex Cowan
HTML
<div class="header">
<h1>MedWatch 2.0</h1>
</div>
<div id="search-info">
<h2>Severity predictor using Deep Learning</h2>
</div>
<div class="form-style-8">
<form name="search_form" role="form" action="/predict" method="POST">
<input type="text" id="text_entered" placeholder="Enter description" list="drugs" />
<input type="button" value="Get severity" id="SubmitButton" />
</form>
</div>
<img src="http://2.bp.blogspot.com/-XTR-_X58BHo/UE-v8fIayII/AAAAAAAACMw/fu8ZxR57xUU/s1600/LoadingGIF.gif" alt="Loading">
<div id="loading_statement">
Severity takes 30 seconds to load.
</div>
<div id="footer">
This application is not intended to provide medical advice. Please consult with a doctor.
</div>
CSS
.header {
font-family: 'Proxima Novas', sans-serif;
padding: 10px;
text-align: center;
background: #0077cc;
color: #ffffff;
font-size: 18px;
}
#search-info {
text-align: center;
font-family: 'Proxima Nova', sans-serif;
color: #0077cc;
font-size: 18px;
font-weight: 100;
padding: 20px;
margin: -30px -30px -10px -30px;
}
#footer {
text-align: center;
font-family: 'Proxima Nova', sans-serif;
font-size: 12px;
padding: 100px;
margin: 10px 50px 50px 50px;
}
#loading_statement {
text-align: left;
font-family: 'Proxima Nova', sans-serif;
font-size: 12px;
margin: 10px 10px 10px 10px;
}
<link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300' rel='stylesheet' type='text/css'><style type="text/css">.form-style-8 {
font-family: 'Proxima Novas', sans-serif;
width: 500px;
padding: 30px;
background: #FFFFFF;
margin: 50px auto;
box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.22);
-moz-box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.22);
-webkit-box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.22);
}
.form-style-8 input[type="text"],
.form-style-8 textarea,
.form-style-8 select {
box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
outline: none;
display: block;
width: 100%;
padding: 7px;
border: none;
border-bottom: 1px solid #ddd;
background: transparent;
margin-bottom: 10px;
font: 16px 'Lucida Sans', sans-serif;
height: 45px;
}
.form-style-8 textarea {
resize: none;
overflow: hidden;
}
.form-style-8 input[type="button"],
.form-style-8 input[type="submit"] {
-moz-box-shadow: inset 0px 1px 0px 0px #f6f6f6;
-webkit-box-shadow: inset 0px 1px 0px 0px #f6f6f6;
box-shadow: inset 0px 1px 0px 0px #f6f6f6;
background-color: #c21515;
border: 1px solid #f6f6f6;
display: inline-block;
cursor: pointer;
color: #ffffff;
font-family: 'Lucida Sans', sans-serif;
font-size: 14px;
padding: 8px 18px;
text-decoration: none;
}
.form-style-8...
JavaScript
window.onload = function() {
jQuery(document).on('click', '#SubmitButton', function() {
$('img').addClass('show');
$('button').hide();
});
jQuery(document).keypress(function(e) {
if (e.keyCode == 13) {
e.preventDefault();
jQuery('#SubmitButton').click();
}
});
}