-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
76 lines (71 loc) · 2.96 KB
/
index.html
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
68
69
70
71
72
73
74
75
76
<html>
<head>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/css/materialize.min.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.2/js/materialize.min.js"></script>
<script src="util.js"></script>
<script src="script.js"></script>
</head>
<body>
<script>
$(document).ready(function() {
$('select').material_select();
initFromSource();
});
</script>
<header>
<nav class="top-nav blue-grey darken-1">
<div class="container">
<div class="nav-wrapper white-text">
<a class="page-title" onclick="init(prompt('Enter data URL:'))" >Poem Generator</a>
</div>
</div>
</nav>
</header>
<main class="container">
<div class="row center">
<form>
<div class="input-field col s8">
<select id="dataSource">
<option value="sources/punishment-p1.json">Crime and Punishment (Part 1, no punctuation)</option>
<option value="sources/punishment.json">Crime and Punishment (All parts with punctuation)</option>
<option value="sources/portrait.json">Portrait of the Artist as a Young Man</option>
</select>
<label>Data Source</label>
</div>
<div class="col s2">
<a class="orange darken-2 btn-large waves-effect waves-light" id="setSource" onclick="initFromSource()">Set source</a>
</div>
</form>
<form>
<div class="input-field col s12">
<select id="poemType">
</select>
<label>Poem Type</label>
</div>
<div class="input-field col s12">
<select id="markovLength">
</select>
<label>Markov Length (Words)</label>
</div>
</form>
</div>
<div class="row center">
<div class="col s12">
<a class="orange darken-2 btn-large waves-effect waves-light" id="generate" onclick="generatePoem()">Choose a source and click "Set source"</a>
</div>
</div>
<div class="row">
<div class="col s12">
<div class="card blue-grey darken-1">
<div class="card-content white-text">
<p id="poem"></p>
</div>
</div>
</div>
</div>
</main>
</body>
</html>