-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
161 lines (120 loc) · 5.7 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
<html>
<head>
<meta charset="UTF-8">
<link rel="stylesheet" type="text/css" href="styles.css">
<script type="text/javascript" src="util.js"></script>
<script type="text/javascript" src="actors.js"></script>
<script type="text/javascript" src="directors.js"></script>
<script type="text/javascript" src="genres.js"></script>
<script type="text/javascript" src="themes.js"></script>
<script type="text/javascript" src="tropes.js"></script>
<script type="text/javascript">
function clearAll() {
document.getElementById('director').value = '';
document.getElementById('genre').value = '';
document.getElementById('actor1').value = '';
document.getElementById('actor2').value = '';
document.getElementById('actor3').value = '';
document.getElementById('actor4').value = '';
document.getElementById('genre').value = '';
document.getElementById('subgenre').value = '';
document.getElementById('trope').value = '';
document.getElementById('theme').value = '';
}
function randomAll() {
document.getElementById('director').value = getRandomDirector();
document.getElementById('genre').value = getRandomElement(Object.keys(genres));
document.getElementById('actor1').value = getRandomActor();
document.getElementById('actor2').value = getRandomActor();
document.getElementById('actor3').value = getRandomActor();
document.getElementById('actor4').value = getRandomActor();
document.getElementById('genre').value = getRandomElement(Object.keys(genres));
document.getElementById('subgenre').value = getRandomElement(genres[genre.value]);
document.getElementById('trope').value = getRandomTrope();
document.getElementById('theme').value = getRandomTheme();
}
</script>
</head>
<body>
<h1>Pitch Me!</h1>
<h2>A movie idea party game</h2>
<fieldset>
<legend>How to Play</legend>
<textarea disabled="disabled">
<ol>
<li>Click on the [? All] button</li>
<li>To change a line, click on the [?] button beside it</li>
<li>To clear a line, click on the [-] button beside it</li>
<li>Create a plot summary, twist and title</li>
<li>Repeat</li>
</ol>
</textarea>
</fieldset>
<button onclick="randomAll();">? All</button>
<button onclick="clearAll();">- All</button>
<fieldset>
<legend>Director</legend>
<input type="text" id="director">
<button onclick="document.getElementById('director').value = getRandomDirector();">?</button>
<button onclick="document.getElementById('director').value = '';">-</button>
</fieldset>
<fieldset>
<legend>Cast</legend>
<input type="text" id="actor1">
<button onclick="document.getElementById('actor1').value = getRandomActor();">?</button>
<button onclick="document.getElementById('actor1').value = getRandomMaleActor();">M</button>
<button onclick="document.getElementById('actor1').value = getRandomFemaleActor();">F</button>
<button onclick="document.getElementById('actor1').value = '';">-</button>
<input type="text" id="actor2">
<button onclick="document.getElementById('actor2').value = getRandomActor();">?</button>
<button onclick="document.getElementById('actor2').value = getRandomMaleActor();">M</button>
<button onclick="document.getElementById('actor2').value = getRandomFemaleActor();">F</button>
<button onclick="document.getElementById('actor2').value = '';">-</button>
<input type="text" id="actor3">
<button onclick="document.getElementById('actor3').value = getRandomActor();">?</button>
<button onclick="document.getElementById('actor3').value = getRandomMaleActor();">M</button>
<button onclick="document.getElementById('actor3').value = getRandomFemaleActor();">F</button>
<button onclick="document.getElementById('actor3').value = '';">-</button>
<input type="text" id="actor4">
<button onclick="document.getElementById('actor4').value = getRandomActor();">?</button>
<button onclick="document.getElementById('actor4').value = getRandomMaleActor();">M</button>
<button onclick="document.getElementById('actor4').value = getRandomFemaleActor();">F</button>
<button onclick="document.getElementById('actor4').value = '';">-</button>
</fieldset>
<fieldset>
<legend>Genre</legend>
<input type="text" id="genre">
<button onclick="document.getElementById('genre').value = getRandomElement(Object.keys(genres));">?</button>
<button onclick="document.getElementById('genre').value = '';">-</button>
<input type="text" id="subgenre">
<button onclick="document.getElementById('subgenre').value = getRandomElement(genres[genre.value]);">?</button>
<button onclick="document.getElementById('subgenre').value = '';">-</button>
</fieldset>
<fieldset>
<legend>Trope</legend>
<input type="text" id="trope">
<button onclick="document.getElementById('trope').value = getRandomTrope();">?</button>
<button onclick="document.getElementById('trope').value = '';">-</button>
</fieldset>
<fieldset>
<legend>Theme</legend>
<input type="text" id="theme">
<button onclick="document.getElementById('theme').value = getRandomTheme();">?</button>
<button onclick="document.getElementById('theme').value = '';">-</button>
</fieldset>
<fieldset>
<legend>Plot Summary</legend>
<textarea id="plotSummary" rows=1 cols=80></textarea>
</fieldset>
<fieldset>
<legend>Twist</legend>
<textarea id="twist" rows=1 cols=80></textarea>
</fieldset>
<fieldset>
<legend>Title</legend>
<textarea id="title" rows=1 cols=80></textarea>
</fieldset>
<!--TODO: add radio buttons for generating the plot and the twist, with 2-3 options for each to determine what to generate -->
</div><!-- end main -->
</body>
</html>