-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
220 lines (203 loc) · 8.15 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8" />
<title>browser-based experiments</title>
<!-- fonts from Google fonts -->
<link href="https://fonts.googleapis.com/css?family=Noto+Sans:400,700|Noto+Serif:400,700|Playfair+Display:700" rel="stylesheet">
<!-- css -->
<link rel="stylesheet" type="text/css" href="styles/styles.css">
<!-- js dependencies -->
<script src="libraries/mustache/mustache.min.js"></script>
<script src="libraries/jquery/dist/jquery.min.js"></script>
<!-- This doesn't seem to be there on cloudflare -->
<script src="libraries/csv-js/csv.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.5/lodash.js"></script>
<!-- config -->
<script src="config/config_deploy.js"></script>
<!-- local js files -->
<script src="scripts/main.js"></script>
<script src="scripts/experiment.js"></script>
<script src="scripts/helpers.js"></script>
<script src="scripts/utils.js"></script>
<script src="scripts/submit_to_server.js"></script>
<!-- local trial_info files -->
<script src="trial_info/main_trials.js"></script>
<script src="trial_info/practice_trials.js"></script>
<!-- views -->
<script src="views/views.js"></script>
</head>
<body>
<noscript>This task requires JavaScript. Please enable JavaScript in your browser and reload the page. For more information on how to do that, please refer to
<a href='https://enable-javascript.com' target='_blank'>enable-javascript.com</a>
</noscript>
<!-- views are inserted in main -->
<main id='main'>
Loading...
</main>
<!-- Mustache templates below. Each template is a view with a separate HTML structure. -->
<!-- Introduction view -->
<script id="intro-view" type="x-tmpl-mustache">
<div class='view'>
{{# title }}
<h1 class="title">{{ title }}</h1>
{{/ title }}
{{# text }}
<section class="text-container">
<p class="text">{{{ text }}}</p>
</section>
{{/ text }}
<p id="prolific-id-form">
<label for="prolific-id">Please, enter your Prolific ID</label>
<input type="text" id="prolific-id" />
</p>
{{# button }}
<button id="next" class="nodisplay">{{ button }}</button>
{{/ button }}
{{^ button }}
<button id="next">Next</button>
{{/ button }}
</div>
</script>
<!-- Instructions view -->
<script id="instructions-view" type="x-tmpl-mustache">
<div class="view">
{{# title }}
<h1>{{ title }}</h1>
{{/ title }}
{{# text }}
<section class="text-container">
<p class="text">{{ text }}</p>
</section>
{{/ text }}
{{# button }}
<button id="next">{{ button }}</button>
{{/ button }}
{{^ button }}
<button id="next">Next</button>
{{/ button }}
</view>
</script>
<!-- Practice trial view -->
<script id="practice-view" type="x-tmpl-mustache">
<div class="view">
{{# title }}
<h1>{{ title }}</h1>
{{/ title }}
<div class="picture">
<img src={{ picture }} alt="a picture" height="100" width="100">
</div>
{{# question }}
<p class="question">
{{ question }}
</p>
{{/ question }}
<p class="answer-container">
<label for="yes" class="button-answer">{{option1}}</label>
<input type="radio" name="answer" id="yes" value={{option1}} />
<input type="radio" name="answer" id="no" value={{option2}} />
<label for="no" class="button-answer">{{option2}}</label>
</p>
</div>
</script>
<!-- Begin Experiment view -->
<script id="begin-exp-view" type="x-tmpl-mustache">
<div class="view">
{{# text }}
<section class="text-container">
<p class="text">{{ text }}</p>
</section>
{{/ text }}
<button id="next">Begin Experiment</button>
</div>
</script>
<!-- main view (buttons response) -->
<script id="main-view" type="x-tmpl-mustache">
<div class="view">
<div class="picture">
<img src={{ picture }} alt="a picture" height="100" width="100">
</div>
{{# question }}
<p class="question">
{{{ question }}}
</p>
{{/ question }}
<p class="answer-container">
<label for="yes" class="button-answer">{{ option1 }}</label>
<input type="radio" name="answer" id="yes" value={{ option1 }} />
<input type="radio" name="answer" id="no" value={{ option2 }} />
<label for="no" class="button-answer">{{option2}}</label>
</p>
</div>
</script>
<!-- post test view -->
<script id="post-test-view" type="x-tmpl-mustache">
<div class="view post-test-templ">
{{# title }}
<h1>{{ title }}</h1>
{{/ title }}
{{# text }}
<section class="text-container">
<p class="text">{{ text }}</p>
</section>
{{/ text }}
<form>
<p>
<label for="age">Age:</label>
<input type="number" name="age" min="18" max="110" id="age" />
</p>
<p>
<label for="gender">Gender:</label>
<select id="gender" name="gender">
<option></option>
<option value="male">male</option>
<option value="female">female</option>
<option value="other">other</option>
</select>
</p>
<p>
<label for="education">Level of Education:</label>
<select id="education" name="education">
<option></option>
<option value="graduated_high_school">Graduated High School</option>
<option value="graduated_college">Graduated College</option>
<option value="higher_degree">Higher Degree</option>
</select>
</p>
<p>
<label for="languages" name="languages">Native Languages: <br /><span>(i.e. the language(s) spoken at home when you were a child)</</span></label>
<input type="text" id="languages"/>
</p>
<p class="comment-sect">
<label for="comments">Further comments</label>
<textarea name="comments" id="comments"
rows="6" cols="40"></textarea>
</p>
{{# buttonText }}
<button id="next">{{ buttonText }}</button>
{{/ buttonText }}
{{^ buttonText }}
<button id="next">Next</button>
{{/ buttonText }}
</form>
</div>
</script>
<!-- Thanks View -->
<script id="thanks-view" type="x-tmpl-mustache">
<div class="view thanks-templ">
<h4 class="warning-message">submitting the data
<div class="loader"></div>
</h4>
{{# thanksMessage }}
<h1 class="thanks-message nodisplay">{{ thanksMessage }}</h1>
{{/ thanksMessage }}
{{^ thanksMessage }}
<h1 class="thanks-message nodisplay">Thank you for taking part in this experiment!</h1>
{{/ thanksMessage }}
{{# extraMessage }}
<h2 class="extra-message nodisplay">{{{ extraMessage }}}</h2>
{{/ extraMessage }}
</div>
</script>
</body>
</html>