forked from codrops/NaturalLanguageForm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
executable file
·67 lines (62 loc) · 2.31 KB
/
index.html
File metadata and controls
executable file
·67 lines (62 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Epoch Decision Tree</title>
<meta name="description" content="Natural Language Form with custom text input and drop-down lists" />
<meta name="keywords" content="Natural Language UI, sentence form, text input, contenteditable, html5, css3, jquery" />
<meta name="author" content="Codrops" />
<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" type="text/css" href="css/default.css" />
<link rel="stylesheet" type="text/css" href="css/component.css" />
<script src="data/products.js" type="text/javascript"></script>
<script src="js/modernizr.custom.js" type="text/javascript"></script>
</head>
<body class="nl-blurred">
<div class="container demo-1">
<!-- Top Navigation -->
<header>
<h1>Epoch Decision Tree <span>removing the WTF</span></h1>
</header>
<div class="main clearfix">
<form id="nl-form" class="nl-form">
I work with
<select id="animals"></select>
measuring
<select id="channels"></select>
channel(s) of
<select id="biopotentials" data-subline="For example: <em>Los Angeles</em> or <em>New York</em>"></select>
for
<select id="duration"></select>
<!--in <input type="text" value="" placeholder="any city" data-subline="For example: <em>Los Angeles</em> or <em>New York</em>"/>
--> <div class="nl-submit-wrap">
<button class="nl-submit" type="submit">Build a system</button>
</div>
<div class="nl-overlay"></div>
</form>
</div>
</div><!-- /container -->
<script src="js/nlform.js"></script>
<script type="text/javascript">
var fn = function (selector) {
var select = document.getElementById(selector);
var collection = window[selector];
Object.keys(collection).forEach(function (key) {
var opt = collection[key];
var el = document.createElement("option");
el.textContent = opt.label;
el.value = key;
el.selected = opt.default;
select.appendChild(el);
})
};
fn("animals");
fn("channels");
fn("biopotentials");
fn("duration");
var nlform = new NLForm( document.getElementById( 'nl-form' ) );
</script>
</body>
</html>