luulinh90s commited on
Commit
41598b6
·
verified ·
1 Parent(s): 7f2f881

Update evaluation/eval_interfaces/instructions.html

Browse files
evaluation/eval_interfaces/instructions.html CHANGED
@@ -4,118 +4,116 @@
4
  <meta charset="UTF-8" />
5
  <title>Instructions</title>
6
  <style>
7
- body {
8
- font-family: Arial, sans-serif;
9
- line-height: 1.6;
10
- padding: 2rem;
11
- height: 700px;
12
- background-color: #f8f9fa;
13
- color: #212529;
 
 
 
 
 
14
  }
15
- h1, h2 {
16
- color: #343a40;
 
 
 
 
 
 
 
17
  }
18
- .section {
19
- margin-bottom: 1rem;
 
 
 
 
 
20
  }
21
- ul {
22
- padding-left: 1.2rem;
 
 
 
 
 
 
23
  }
24
- .note {
25
- background-color: #fff3cd;
26
- border-left: 5px solid #ffc107;
27
- padding: 1rem;
28
- margin-top: 1rem;
29
- font-weight: bold;
 
 
 
 
 
30
  }
31
- .important {
32
- background-color: #f8d7da;
33
- border-left: 5px solid #dc3545;
34
- padding: 1rem;
35
- margin-top: 1rem;
36
- font-weight: bold;
37
- }
38
- input[type="text"] {
39
- padding: 0.6rem;
40
- font-size: 1rem;
41
- width: 300px;
42
- margin-top: 1rem;
43
- }
44
- .start-button {
45
- display: inline-block;
46
- padding: 0.7rem 1.4rem;
47
- font-size: 1rem;
48
- background-color: #007bff;
49
- color: white;
50
- border: none;
51
- border-radius: 4px;
52
- cursor: pointer;
53
- text-align: center;
54
- margin-top: 1.5rem;
55
- }
56
- .start-button:disabled {
57
- background-color: #cccccc;
58
- cursor: not-allowed;
59
  }
60
  </style>
61
  </head>
62
  <body>
63
  <h2>🧠 Experiment Instructions</h2>
64
 
65
- <div class="section">
66
- <h3>🧭 Interface Overview</h3>
67
- <ul>
68
- <p>You’ll review 10 math problems with explanations. Your task is to decide whether each numerical answer is correct or incorrect.
69
- You’ll have 2 minutes per question to decide if the final answer is correct. If it’s error-free, click “Correct”; otherwise, click “Incorrect.
70
- The interface contains two panels</p>
71
- <li>Left Panel: Displays the math problem and relevant facts.</li>
72
- <li>Right Panel: Step-by-step explanation.</li>
73
- </ul>
74
- </div>
75
-
76
- <div class="section">
77
- <h3>🕹️ How to Use</h3>
78
- <ul>
79
- <li>▶️ Play / ❚❚ Pause: Steps through explanations automatically.</li>
80
- <li>⬆️ / ⬇️: Move through steps manually.</li>
81
- <li>🔴 Breakpoints: Stop auto-play at specific steps.</li>
82
- </ul>
83
- </div>
84
 
85
- <div class="section">
86
- <h3>🎨 Highlights</h3>
87
- <p>All variables are color-coded. Variable values will update as each step is executed.</p>
88
- </div>
 
 
 
 
89
 
90
- <div class="section">
91
- <h3>📝 Enter Your Name</h3>
92
- <p>Your name is used to associate this evaluation with your response. It is stored in a secure research log.</p>
93
- <input type="text" id="nameInput" placeholder="Enter your name..." />
94
- </div>
95
 
96
- <div class="important">
97
- You must enter your name to start the evaluation.
 
 
 
 
98
  </div>
99
 
100
- <button class="start-button" id="startBtn" disabled>Start</button>
101
 
102
  <script>
103
- const input = document.getElementById("nameInput");
104
- const button = document.getElementById("startBtn");
105
-
106
- input.addEventListener("input", () => {
107
- button.disabled = input.value.trim().length === 0;
108
- });
109
 
110
- button.addEventListener("click", () => {
111
- const name = input.value.trim();
112
- if (name && window.parent && typeof window.parent.setUserName === 'function') {
113
  window.parent.setUserName(name);
114
- window.parent.loadNext();
115
- } else {
116
- alert("Parent interface is not ready. Please try again.");
117
  }
118
  });
119
  </script>
120
  </body>
121
- </html>
 
4
  <meta charset="UTF-8" />
5
  <title>Instructions</title>
6
  <style>
7
+ :root { --gap:1.2rem; }
8
+ *{box-sizing:border-box;margin:0;padding:0}
9
+ body{
10
+ font-family:Arial,Helvetica,sans-serif;
11
+ line-height:1.55;
12
+ background:#f8f9fa;
13
+ color:#212529;
14
+ height:100vh; /* full viewport */
15
+ display:flex;
16
+ flex-direction:column;
17
+ justify-content:space-between; /* header / content / footer */
18
+ padding:var(--gap);
19
  }
20
+ h2{color:#343a40;margin-bottom:var(--gap)}
21
+ h3{color:#343a40;font-size:1.1rem;margin-bottom:.4rem}
22
+ ul{padding-left:1.1rem;margin-bottom:.6rem}
23
+ .grid{
24
+ flex:1;
25
+ display:grid;
26
+ gap:var(--gap);
27
+ grid-template-columns:repeat(auto-fit,minmax(320px,1fr));
28
+ overflow:hidden; /* never scroll */
29
  }
30
+ .card{
31
+ background:#fff;
32
+ border-left:5px solid #0d6efd;
33
+ padding:1rem;
34
+ border-radius:6px;
35
+ box-shadow:0 1px 4px rgba(0,0,0,.06);
36
+ overflow:hidden;
37
  }
38
+ input[type="text"]{
39
+ padding:.55rem .8rem;
40
+ font-size:1rem;
41
+ width:100%;
42
+ max-width:320px;
43
+ margin-top:.5rem;
44
+ border:1px solid #ced4da;
45
+ border-radius:4px;
46
  }
47
+ .start{
48
+ align-self:center;
49
+ padding:.75rem 1.4rem;
50
+ font-size:1rem;
51
+ background:#0d6efd;
52
+ color:#fff;
53
+ border:none;
54
+ border-radius:4px;
55
+ cursor:pointer;
56
+ margin-top:var(--gap);
57
+ transition:opacity .25s;
58
  }
59
+ .start:hover{opacity:.9}
60
+ @media(max-width:480px){
61
+ body{padding:.8rem}
62
+ .grid{grid-template-columns:1fr}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
63
  }
64
  </style>
65
  </head>
66
  <body>
67
  <h2>🧠 Experiment Instructions</h2>
68
 
69
+ <div class="grid">
70
+ <div class="card">
71
+ <h3>🧭 Interface Overview</h3>
72
+ <p style="margin-bottom:.6rem">You’ll review <strong>10 math problems</strong>.
73
+ Decide whether each final numerical answer is <em>correct</em> or <em>incorrect</em>.</p>
74
+ <ul>
75
+ <li>Left panel problem statement &amp; facts</li>
76
+ <li>Right panel – step-by-step explanation</li>
77
+ </ul>
78
+ </div>
 
 
 
 
 
 
 
 
 
79
 
80
+ <div class="card">
81
+ <h3>🕹️ How to Use</h3>
82
+ <ul>
83
+ <li>▶️ / ❚❚ – auto-play / pause</li>
84
+ <li>⤴ / ⤵ – manual previous / next</li>
85
+ <li>🔴 – set breakpoints to pause auto-play</li>
86
+ </ul>
87
+ </div>
88
 
89
+ <div class="card">
90
+ <h3>🎨 Highlights</h3>
91
+ <p>Variables are color-coded; their values update as each step runs.</p>
92
+ </div>
 
93
 
94
+ <div class="card">
95
+ <h3>📝 (Optional) Enter Your Name</h3>
96
+ <p>If you’d like your responses tagged, enter a name or alias;
97
+ otherwise you’ll appear as “anonymous”.</p>
98
+ <input type="text" id="nameInput" placeholder="Your name (optional)">
99
+ </div>
100
  </div>
101
 
102
+ <button class="start" id="startBtn">Start Experiment</button>
103
 
104
  <script>
105
+ const input = document.getElementById('nameInput');
106
+ const start = document.getElementById('startBtn');
 
 
 
 
107
 
108
+ start.addEventListener('click', ()=>{
109
+ const name = (input.value || 'anonymous').trim();
110
+ if (window.parent && typeof window.parent.setUserName==='function'){
111
  window.parent.setUserName(name);
112
+ window.parent.loadNext(); // kick off first sample
113
+ }else{
114
+ alert('Parent interface not ready. Please reload.');
115
  }
116
  });
117
  </script>
118
  </body>
119
+ </html>