Update index.html
Browse files- index.html +380 -152
index.html
CHANGED
|
@@ -3,65 +3,21 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>
|
| 7 |
<style>
|
| 8 |
* { margin: 0; padding: 0; box-sizing: border-box; }
|
| 9 |
body {
|
| 10 |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
| 11 |
-
background: linear-gradient(to bottom right, #
|
| 12 |
min-height: 100vh;
|
| 13 |
padding: 2rem;
|
| 14 |
-
display: flex;
|
| 15 |
-
align-items: center;
|
| 16 |
-
justify-content: center;
|
| 17 |
-
}
|
| 18 |
-
.container {
|
| 19 |
-
max-width: 48rem;
|
| 20 |
-
width: 100%;
|
| 21 |
-
text-align: center;
|
| 22 |
-
}
|
| 23 |
-
.header { margin-bottom: 2rem; }
|
| 24 |
-
.title {
|
| 25 |
-
font-size: 2.5rem;
|
| 26 |
-
color: #78350f;
|
| 27 |
-
font-weight: bold;
|
| 28 |
-
margin-bottom: 0.5rem;
|
| 29 |
-
}
|
| 30 |
-
.subtitle { color: #92400e; font-size: 1.125rem; }
|
| 31 |
-
|
| 32 |
-
.pause-display {
|
| 33 |
-
background: white;
|
| 34 |
-
border-radius: 1.5rem;
|
| 35 |
-
box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
|
| 36 |
-
padding: 4rem 2rem;
|
| 37 |
-
margin-bottom: 2rem;
|
| 38 |
-
min-height: 20rem;
|
| 39 |
-
display: flex;
|
| 40 |
-
align-items: center;
|
| 41 |
-
justify-content: center;
|
| 42 |
-
transition: all 0.3s ease;
|
| 43 |
-
}
|
| 44 |
-
|
| 45 |
-
.pause-word {
|
| 46 |
-
font-size: 8rem;
|
| 47 |
-
font-weight: bold;
|
| 48 |
-
color: #dc2626;
|
| 49 |
-
opacity: 0;
|
| 50 |
-
transform: scale(0.5);
|
| 51 |
-
transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
|
| 52 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 53 |
|
| 54 |
-
.
|
| 55 |
-
opacity: 1;
|
| 56 |
-
transform: scale(1);
|
| 57 |
-
}
|
| 58 |
-
|
| 59 |
-
.pause-display.flash {
|
| 60 |
-
background: #fef2f2;
|
| 61 |
-
box-shadow: 0 0 50px rgba(220, 38, 38, 0.3);
|
| 62 |
-
}
|
| 63 |
-
|
| 64 |
-
.controls {
|
| 65 |
background: white;
|
| 66 |
border-radius: 1rem;
|
| 67 |
box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
|
|
@@ -69,55 +25,64 @@
|
|
| 69 |
margin-bottom: 2rem;
|
| 70 |
}
|
| 71 |
|
| 72 |
-
.
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
}
|
| 79 |
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 84 |
font-weight: 600;
|
| 85 |
-
|
| 86 |
cursor: pointer;
|
| 87 |
-
color: white;
|
| 88 |
-
box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
|
| 89 |
transition: all 0.2s;
|
| 90 |
-
|
| 91 |
-
align-items: center;
|
| 92 |
-
gap: 0.5rem;
|
| 93 |
}
|
| 94 |
|
| 95 |
-
|
| 96 |
-
|
|
|
|
|
|
|
|
|
|
| 97 |
|
| 98 |
-
.
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
|
|
|
| 102 |
|
| 103 |
-
.
|
| 104 |
-
background:
|
| 105 |
-
border-radius:
|
| 106 |
-
|
|
|
|
|
|
|
| 107 |
}
|
| 108 |
|
| 109 |
-
.
|
| 110 |
-
.settings-title {
|
| 111 |
font-weight: 600;
|
| 112 |
-
color: #
|
| 113 |
margin-bottom: 1rem;
|
| 114 |
font-size: 1.125rem;
|
|
|
|
| 115 |
}
|
| 116 |
|
| 117 |
input[type="range"] {
|
| 118 |
width: 100%;
|
| 119 |
height: 0.5rem;
|
| 120 |
-
background: #
|
| 121 |
border-radius: 0.5rem;
|
| 122 |
outline: none;
|
| 123 |
cursor: pointer;
|
|
@@ -127,7 +92,7 @@
|
|
| 127 |
appearance: none;
|
| 128 |
width: 1.5rem;
|
| 129 |
height: 1.5rem;
|
| 130 |
-
background: #
|
| 131 |
border-radius: 50%;
|
| 132 |
cursor: pointer;
|
| 133 |
}
|
|
@@ -135,7 +100,7 @@
|
|
| 135 |
input[type="range"]::-moz-range-thumb {
|
| 136 |
width: 1.5rem;
|
| 137 |
height: 1.5rem;
|
| 138 |
-
background: #
|
| 139 |
border-radius: 50%;
|
| 140 |
cursor: pointer;
|
| 141 |
border: none;
|
|
@@ -145,140 +110,403 @@
|
|
| 145 |
display: flex;
|
| 146 |
justify-content: space-between;
|
| 147 |
font-size: 0.875rem;
|
| 148 |
-
color: #
|
| 149 |
margin-top: 0.75rem;
|
| 150 |
}
|
| 151 |
|
| 152 |
-
.
|
| 153 |
-
|
| 154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 155 |
font-size: 0.875rem;
|
| 156 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
}
|
| 158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 159 |
.instructions {
|
| 160 |
-
background: #
|
| 161 |
-
border: 2px solid #
|
| 162 |
border-radius: 0.75rem;
|
| 163 |
padding: 1.5rem;
|
| 164 |
-
text-align: left;
|
| 165 |
}
|
| 166 |
|
| 167 |
.instructions h3 {
|
| 168 |
-
color: #
|
| 169 |
font-weight: bold;
|
| 170 |
margin-bottom: 0.75rem;
|
| 171 |
}
|
| 172 |
|
| 173 |
-
.instructions
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
margin-bottom: 0.5rem;
|
| 177 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
</style>
|
| 179 |
</head>
|
| 180 |
<body>
|
| 181 |
<div class="container">
|
| 182 |
<div class="header">
|
| 183 |
-
<h1 class="title">
|
| 184 |
-
<p class="subtitle">
|
| 185 |
</div>
|
| 186 |
|
| 187 |
-
<div class="
|
| 188 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 189 |
</div>
|
| 190 |
|
| 191 |
<div class="controls">
|
| 192 |
<div class="buttons">
|
| 193 |
-
<button id="startBtn" class="btn-start">
|
| 194 |
<span>▶</span> Start
|
| 195 |
</button>
|
|
|
|
|
|
|
|
|
|
| 196 |
<button id="resetBtn" class="btn-reset">
|
| 197 |
<span>↻</span> Reset
|
| 198 |
</button>
|
| 199 |
</div>
|
| 200 |
-
|
| 201 |
-
<div class="settings">
|
| 202 |
-
<label>
|
| 203 |
-
<div class="settings-title">Reminder Interval: <span id="intervalDisplay">8</span> seconds</div>
|
| 204 |
-
<input type="range" id="intervalSlider" min="5" max="15" step="1" value="8">
|
| 205 |
-
<div class="range-labels">
|
| 206 |
-
<span>Fast (5s)</span>
|
| 207 |
-
<span>Medium (10s)</span>
|
| 208 |
-
<span>Slow (15s)</span>
|
| 209 |
-
</div>
|
| 210 |
-
</label>
|
| 211 |
-
<p class="note" id="settingsNote" style="display: none;">Reset to adjust interval during practice</p>
|
| 212 |
-
</div>
|
| 213 |
</div>
|
| 214 |
|
| 215 |
<div class="instructions">
|
| 216 |
-
<h3>How to
|
| 217 |
-
<
|
| 218 |
-
|
| 219 |
-
|
| 220 |
-
|
|
|
|
|
|
|
|
|
|
| 221 |
</div>
|
| 222 |
</div>
|
| 223 |
|
| 224 |
<script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 225 |
let isRunning = false;
|
| 226 |
-
let
|
| 227 |
-
let
|
|
|
|
|
|
|
| 228 |
|
| 229 |
-
const
|
| 230 |
-
const pauseWord = document.getElementById('pauseWord');
|
| 231 |
const startBtn = document.getElementById('startBtn');
|
|
|
|
| 232 |
const resetBtn = document.getElementById('resetBtn');
|
| 233 |
-
const
|
| 234 |
-
const
|
| 235 |
-
const
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 236 |
|
| 237 |
-
function
|
| 238 |
-
|
| 239 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 240 |
|
| 241 |
-
|
| 242 |
-
|
| 243 |
-
|
| 244 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 245 |
}
|
| 246 |
|
| 247 |
function start() {
|
| 248 |
-
if (isRunning) return;
|
| 249 |
|
| 250 |
isRunning = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 251 |
startBtn.disabled = true;
|
| 252 |
-
|
| 253 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 254 |
|
| 255 |
-
|
|
|
|
|
|
|
| 256 |
|
| 257 |
-
|
| 258 |
}
|
| 259 |
|
| 260 |
function reset() {
|
|
|
|
| 261 |
isRunning = false;
|
| 262 |
-
|
| 263 |
-
intervalSlider.disabled = false;
|
| 264 |
-
settingsNote.style.display = 'none';
|
| 265 |
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 270 |
|
| 271 |
-
|
| 272 |
-
pauseDisplay.classList.remove('flash');
|
| 273 |
}
|
| 274 |
|
| 275 |
startBtn.addEventListener('click', start);
|
|
|
|
| 276 |
resetBtn.addEventListener('click', reset);
|
| 277 |
-
|
| 278 |
-
|
| 279 |
-
intervalSeconds = parseInt(e.target.value);
|
| 280 |
-
intervalDisplay.textContent = intervalSeconds;
|
| 281 |
-
});
|
| 282 |
</script>
|
| 283 |
</body>
|
| 284 |
</html>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Role Play Practice</title>
|
| 7 |
<style>
|
| 8 |
* { margin: 0; padding: 0; box-sizing: border-box; }
|
| 9 |
body {
|
| 10 |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
|
| 11 |
+
background: linear-gradient(to bottom right, #dbeafe, #bfdbfe);
|
| 12 |
min-height: 100vh;
|
| 13 |
padding: 2rem;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
}
|
| 15 |
+
.container { max-width: 56rem; margin: 0 auto; }
|
| 16 |
+
.header { text-align: center; margin-bottom: 2rem; }
|
| 17 |
+
.title { font-size: 2.5rem; color: #1e3a8a; font-weight: bold; margin-bottom: 0.5rem; }
|
| 18 |
+
.subtitle { color: #1e40af; font-size: 1.125rem; }
|
| 19 |
|
| 20 |
+
.category-selection {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
background: white;
|
| 22 |
border-radius: 1rem;
|
| 23 |
box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
|
|
|
|
| 25 |
margin-bottom: 2rem;
|
| 26 |
}
|
| 27 |
|
| 28 |
+
.category-title {
|
| 29 |
+
font-size: 1.25rem;
|
| 30 |
+
font-weight: 600;
|
| 31 |
+
color: #1e3a8a;
|
| 32 |
+
margin-bottom: 1rem;
|
| 33 |
+
text-align: center;
|
| 34 |
}
|
| 35 |
|
| 36 |
+
.categories {
|
| 37 |
+
display: grid;
|
| 38 |
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
| 39 |
+
gap: 1rem;
|
| 40 |
+
}
|
| 41 |
+
|
| 42 |
+
.category-btn {
|
| 43 |
+
padding: 1.25rem;
|
| 44 |
+
background: #eff6ff;
|
| 45 |
+
border: 2px solid #bfdbfe;
|
| 46 |
+
border-radius: 0.75rem;
|
| 47 |
font-weight: 600;
|
| 48 |
+
color: #1e40af;
|
| 49 |
cursor: pointer;
|
|
|
|
|
|
|
| 50 |
transition: all 0.2s;
|
| 51 |
+
text-align: center;
|
|
|
|
|
|
|
| 52 |
}
|
| 53 |
|
| 54 |
+
.category-btn:hover {
|
| 55 |
+
background: #dbeafe;
|
| 56 |
+
border-color: #93c5fd;
|
| 57 |
+
transform: translateY(-2px);
|
| 58 |
+
}
|
| 59 |
|
| 60 |
+
.category-btn.selected {
|
| 61 |
+
background: #3b82f6;
|
| 62 |
+
color: white;
|
| 63 |
+
border-color: #3b82f6;
|
| 64 |
+
}
|
| 65 |
|
| 66 |
+
.timer-setup {
|
| 67 |
+
background: white;
|
| 68 |
+
border-radius: 1rem;
|
| 69 |
+
box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
|
| 70 |
+
padding: 2rem;
|
| 71 |
+
margin-bottom: 2rem;
|
| 72 |
}
|
| 73 |
|
| 74 |
+
.timer-label {
|
|
|
|
| 75 |
font-weight: 600;
|
| 76 |
+
color: #1e3a8a;
|
| 77 |
margin-bottom: 1rem;
|
| 78 |
font-size: 1.125rem;
|
| 79 |
+
text-align: center;
|
| 80 |
}
|
| 81 |
|
| 82 |
input[type="range"] {
|
| 83 |
width: 100%;
|
| 84 |
height: 0.5rem;
|
| 85 |
+
background: #bfdbfe;
|
| 86 |
border-radius: 0.5rem;
|
| 87 |
outline: none;
|
| 88 |
cursor: pointer;
|
|
|
|
| 92 |
appearance: none;
|
| 93 |
width: 1.5rem;
|
| 94 |
height: 1.5rem;
|
| 95 |
+
background: #3b82f6;
|
| 96 |
border-radius: 50%;
|
| 97 |
cursor: pointer;
|
| 98 |
}
|
|
|
|
| 100 |
input[type="range"]::-moz-range-thumb {
|
| 101 |
width: 1.5rem;
|
| 102 |
height: 1.5rem;
|
| 103 |
+
background: #3b82f6;
|
| 104 |
border-radius: 50%;
|
| 105 |
cursor: pointer;
|
| 106 |
border: none;
|
|
|
|
| 110 |
display: flex;
|
| 111 |
justify-content: space-between;
|
| 112 |
font-size: 0.875rem;
|
| 113 |
+
color: #1e40af;
|
| 114 |
margin-top: 0.75rem;
|
| 115 |
}
|
| 116 |
|
| 117 |
+
.scenario-display {
|
| 118 |
+
background: white;
|
| 119 |
+
border-radius: 1.5rem;
|
| 120 |
+
box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
|
| 121 |
+
padding: 3rem 2rem;
|
| 122 |
+
margin-bottom: 2rem;
|
| 123 |
+
min-height: 20rem;
|
| 124 |
+
display: flex;
|
| 125 |
+
flex-direction: column;
|
| 126 |
+
align-items: center;
|
| 127 |
+
justify-content: center;
|
| 128 |
+
text-align: center;
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
.scenario-content.hidden { display: none; }
|
| 132 |
+
|
| 133 |
+
.role-label {
|
| 134 |
font-size: 0.875rem;
|
| 135 |
+
color: #6b7280;
|
| 136 |
+
text-transform: uppercase;
|
| 137 |
+
letter-spacing: 0.05em;
|
| 138 |
+
margin-bottom: 1rem;
|
| 139 |
+
}
|
| 140 |
+
|
| 141 |
+
.role-title {
|
| 142 |
+
font-size: 1.5rem;
|
| 143 |
+
color: #3b82f6;
|
| 144 |
+
font-weight: bold;
|
| 145 |
+
margin-bottom: 1.5rem;
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
.scenario-text {
|
| 149 |
+
font-size: 1.25rem;
|
| 150 |
+
color: #1e3a8a;
|
| 151 |
+
line-height: 1.6;
|
| 152 |
+
max-width: 40rem;
|
| 153 |
+
}
|
| 154 |
+
|
| 155 |
+
.timer-display {
|
| 156 |
+
font-size: 4rem;
|
| 157 |
+
color: #3b82f6;
|
| 158 |
+
font-weight: bold;
|
| 159 |
+
margin-top: 2rem;
|
| 160 |
+
font-variant-numeric: tabular-nums;
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
.timer-display.warning {
|
| 164 |
+
color: #f59e0b;
|
| 165 |
+
}
|
| 166 |
+
|
| 167 |
+
.timer-display.danger {
|
| 168 |
+
color: #ef4444;
|
| 169 |
+
}
|
| 170 |
+
|
| 171 |
+
.placeholder-text {
|
| 172 |
+
font-size: 1.5rem;
|
| 173 |
+
color: #9ca3af;
|
| 174 |
+
}
|
| 175 |
+
|
| 176 |
+
.controls {
|
| 177 |
+
background: white;
|
| 178 |
+
border-radius: 1rem;
|
| 179 |
+
box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
|
| 180 |
+
padding: 2rem;
|
| 181 |
+
margin-bottom: 2rem;
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
.buttons {
|
| 185 |
+
display: flex;
|
| 186 |
+
gap: 1rem;
|
| 187 |
+
justify-content: center;
|
| 188 |
+
flex-wrap: wrap;
|
| 189 |
}
|
| 190 |
|
| 191 |
+
button {
|
| 192 |
+
padding: 1rem 2rem;
|
| 193 |
+
border: none;
|
| 194 |
+
border-radius: 0.5rem;
|
| 195 |
+
font-weight: 600;
|
| 196 |
+
font-size: 1rem;
|
| 197 |
+
cursor: pointer;
|
| 198 |
+
color: white;
|
| 199 |
+
box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
|
| 200 |
+
transition: all 0.2s;
|
| 201 |
+
display: flex;
|
| 202 |
+
align-items: center;
|
| 203 |
+
gap: 0.5rem;
|
| 204 |
+
}
|
| 205 |
+
|
| 206 |
+
button:hover:not(:disabled) { transform: translateY(-2px); }
|
| 207 |
+
button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
|
| 208 |
+
|
| 209 |
+
.btn-start { background: #22c55e; }
|
| 210 |
+
.btn-start:hover:not(:disabled) { background: #16a34a; }
|
| 211 |
+
.btn-next { background: #3b82f6; }
|
| 212 |
+
.btn-next:hover:not(:disabled) { background: #2563eb; }
|
| 213 |
+
.btn-reset { background: #ef4444; }
|
| 214 |
+
.btn-reset:hover { background: #dc2626; }
|
| 215 |
+
|
| 216 |
.instructions {
|
| 217 |
+
background: #eff6ff;
|
| 218 |
+
border: 2px solid #bfdbfe;
|
| 219 |
border-radius: 0.75rem;
|
| 220 |
padding: 1.5rem;
|
|
|
|
| 221 |
}
|
| 222 |
|
| 223 |
.instructions h3 {
|
| 224 |
+
color: #1e3a8a;
|
| 225 |
font-weight: bold;
|
| 226 |
margin-bottom: 0.75rem;
|
| 227 |
}
|
| 228 |
|
| 229 |
+
.instructions ol {
|
| 230 |
+
margin-left: 1.5rem;
|
| 231 |
+
color: #1e40af;
|
|
|
|
| 232 |
}
|
| 233 |
+
|
| 234 |
+
.instructions li { margin-bottom: 0.5rem; }
|
| 235 |
+
|
| 236 |
+
.hidden { display: none; }
|
| 237 |
</style>
|
| 238 |
</head>
|
| 239 |
<body>
|
| 240 |
<div class="container">
|
| 241 |
<div class="header">
|
| 242 |
+
<h1 class="title">Role Play Practice</h1>
|
| 243 |
+
<p class="subtitle">Build fluency through improvisation</p>
|
| 244 |
</div>
|
| 245 |
|
| 246 |
+
<div class="category-selection" id="categorySection">
|
| 247 |
+
<h3 class="category-title">Choose a Role Category</h3>
|
| 248 |
+
<div class="categories">
|
| 249 |
+
<button class="category-btn" data-category="professional">Professional Roles</button>
|
| 250 |
+
<button class="category-btn" data-category="service">Service & Helper</button>
|
| 251 |
+
<button class="category-btn" data-category="expert">Expert/Specialist</button>
|
| 252 |
+
<button class="category-btn" data-category="creative">Creative/Entertainment</button>
|
| 253 |
+
<button class="category-btn" data-category="quirky">Fun & Quirky</button>
|
| 254 |
+
</div>
|
| 255 |
+
</div>
|
| 256 |
+
|
| 257 |
+
<div class="timer-setup">
|
| 258 |
+
<div class="timer-label">Practice Duration: <span id="durationDisplay">60</span> seconds</div>
|
| 259 |
+
<input type="range" id="durationSlider" min="30" max="120" step="15" value="60">
|
| 260 |
+
<div class="range-labels">
|
| 261 |
+
<span>30s</span>
|
| 262 |
+
<span>60s</span>
|
| 263 |
+
<span>90s</span>
|
| 264 |
+
<span>2min</span>
|
| 265 |
+
</div>
|
| 266 |
+
</div>
|
| 267 |
+
|
| 268 |
+
<div class="scenario-display">
|
| 269 |
+
<div class="placeholder-text" id="placeholderText">Select a category and press Start</div>
|
| 270 |
+
<div class="scenario-content hidden" id="scenarioContent">
|
| 271 |
+
<div class="role-label">Your Role</div>
|
| 272 |
+
<div class="role-title" id="roleTitle"></div>
|
| 273 |
+
<div class="scenario-text" id="scenarioText"></div>
|
| 274 |
+
<div class="timer-display" id="timerDisplay">1:00</div>
|
| 275 |
+
</div>
|
| 276 |
</div>
|
| 277 |
|
| 278 |
<div class="controls">
|
| 279 |
<div class="buttons">
|
| 280 |
+
<button id="startBtn" class="btn-start" disabled>
|
| 281 |
<span>▶</span> Start
|
| 282 |
</button>
|
| 283 |
+
<button id="nextBtn" class="btn-next hidden">
|
| 284 |
+
<span>→</span> Next Scenario
|
| 285 |
+
</button>
|
| 286 |
<button id="resetBtn" class="btn-reset">
|
| 287 |
<span>↻</span> Reset
|
| 288 |
</button>
|
| 289 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 290 |
</div>
|
| 291 |
|
| 292 |
<div class="instructions">
|
| 293 |
+
<h3>How to Practice:</h3>
|
| 294 |
+
<ol>
|
| 295 |
+
<li>Select a role category that interests you</li>
|
| 296 |
+
<li>Set your practice duration (30 seconds to 2 minutes)</li>
|
| 297 |
+
<li>Press Start to receive a random role and scenario</li>
|
| 298 |
+
<li>Speak as that character using Short-Link-Stop pattern</li>
|
| 299 |
+
<li>When finished, click Next for another scenario or Reset to change categories</li>
|
| 300 |
+
</ol>
|
| 301 |
</div>
|
| 302 |
</div>
|
| 303 |
|
| 304 |
<script>
|
| 305 |
+
const scenarios = {
|
| 306 |
+
professional: [
|
| 307 |
+
{ role: "Customer Service Representative", scenario: "Help a frustrated customer whose package was delivered to the wrong address" },
|
| 308 |
+
{ role: "Restaurant Server", scenario: "Recommend dishes to someone with a gluten allergy" },
|
| 309 |
+
{ role: "Store Manager", scenario: "Explain to a customer why you cannot accept a return without a receipt" },
|
| 310 |
+
{ role: "Bank Teller", scenario: "Walk someone through opening their first checking account" },
|
| 311 |
+
{ role: "Doctor", scenario: "Explain to a patient why they need to take their blood pressure medication daily" },
|
| 312 |
+
{ role: "Teacher", scenario: "Explain to a 10-year-old why the seasons change throughout the year" },
|
| 313 |
+
{ role: "Librarian", scenario: "Recommend mystery books to someone who loved Agatha Christie" },
|
| 314 |
+
{ role: "Mechanic", scenario: "Explain to a customer why their brakes need immediate replacement" },
|
| 315 |
+
{ role: "Pharmacist", scenario: "Explain potential side effects of a new prescription medication" },
|
| 316 |
+
{ role: "HR Manager", scenario: "Describe the company benefits package to a new employee" },
|
| 317 |
+
{ role: "Nurse", scenario: "Explain post-surgery care instructions to a patient going home" },
|
| 318 |
+
{ role: "Receptionist", scenario: "Handle multiple phone calls while greeting walk-in visitors" }
|
| 319 |
+
],
|
| 320 |
+
service: [
|
| 321 |
+
{ role: "Tour Guide", scenario: "Describe the history and mystery of Stonehenge to a group of tourists" },
|
| 322 |
+
{ role: "Personal Trainer", scenario: "Motivate someone struggling through their last set of exercises" },
|
| 323 |
+
{ role: "Nutritionist", scenario: "Create a healthy meal plan for someone trying to lose weight" },
|
| 324 |
+
{ role: "Real Estate Agent", scenario: "Describe a beautiful beach house to potential buyers" },
|
| 325 |
+
{ role: "Travel Agent", scenario: "Plan a two-week European vacation for a couple celebrating their anniversary" },
|
| 326 |
+
{ role: "Wedding Planner", scenario: "Help a bride choose between three different venue options" },
|
| 327 |
+
{ role: "Interior Designer", scenario: "Suggest ways to make a small apartment feel more spacious" },
|
| 328 |
+
{ role: "Hair Stylist", scenario: "Recommend a haircut that would suit someone's face shape and lifestyle" },
|
| 329 |
+
{ role: "Event Coordinator", scenario: "Describe how you'll manage a corporate event for 200 people" },
|
| 330 |
+
{ role: "Pet Groomer", scenario: "Give advice to a new puppy owner about grooming and care" },
|
| 331 |
+
{ role: "Massage Therapist", scenario: "Explain different massage techniques for relieving back pain" },
|
| 332 |
+
{ role: "Life Coach", scenario: "Help someone create a plan to achieve their five-year career goals" }
|
| 333 |
+
],
|
| 334 |
+
expert: [
|
| 335 |
+
{ role: "Weather Forecaster", scenario: "Warn viewers about a dangerous blizzard approaching tonight" },
|
| 336 |
+
{ role: "Sports Commentator", scenario: "Describe the final seconds of a championship basketball game" },
|
| 337 |
+
{ role: "Movie Critic", scenario: "Review the latest superhero blockbuster movie" },
|
| 338 |
+
{ role: "Chef", scenario: "Teach someone the secret to making restaurant-quality pasta from scratch" },
|
| 339 |
+
{ role: "Gardener", scenario: "Explain why someone's tomato plants aren't producing fruit and how to fix it" },
|
| 340 |
+
{ role: "Tech Support", scenario: "Walk someone through fixing their slow internet connection" },
|
| 341 |
+
{ role: "Financial Advisor", scenario: "Explain the basics of investing to someone who has never invested before" },
|
| 342 |
+
{ role: "Veterinarian", scenario: "Explain to a pet owner why their cat needs dental surgery" },
|
| 343 |
+
{ role: "Architect", scenario: "Describe your vision for redesigning an old downtown building" },
|
| 344 |
+
{ role: "Sommelier", scenario: "Recommend the perfect wine pairing for a fancy steak dinner" },
|
| 345 |
+
{ role: "Car Salesperson", scenario: "Explain the features of an electric vehicle to someone considering their first EV" },
|
| 346 |
+
{ role: "Historian", scenario: "Describe what daily life was like for ancient Romans" }
|
| 347 |
+
],
|
| 348 |
+
creative: [
|
| 349 |
+
{ role: "Podcast Host", scenario: "Interview an astronaut about their first spacewalk experience" },
|
| 350 |
+
{ role: "Museum Curator", scenario: "Explain the story behind a famous Renaissance painting" },
|
| 351 |
+
{ role: "Storyteller", scenario: "Tell the tale of a brave knight who befriended a dragon" },
|
| 352 |
+
{ role: "Game Show Host", scenario: "Introduce the final round where contestants compete for the grand prize" },
|
| 353 |
+
{ role: "Motivational Speaker", scenario: "Give an inspiring speech to students before their final exams" },
|
| 354 |
+
{ role: "Radio DJ", scenario: "Introduce the top three songs of the week with energy and personality" },
|
| 355 |
+
{ role: "Auctioneer", scenario: "Sell a rare painting at an elegant art auction (remember to speak slowly!)" },
|
| 356 |
+
{ role: "Book Club Leader", scenario: "Lead a discussion about the themes in a bestselling novel" },
|
| 357 |
+
{ role: "YouTuber", scenario: "Create an exciting introduction for your travel vlog about Japan" },
|
| 358 |
+
{ role: "Stand-up Comedian", scenario: "Tell a funny story about a disastrous family vacation" },
|
| 359 |
+
{ role: "Drama Teacher", scenario: "Coach an actor on how to deliver an emotional monologue" },
|
| 360 |
+
{ role: "Documentary Narrator", scenario: "Describe the migration journey of monarch butterflies" }
|
| 361 |
+
],
|
| 362 |
+
quirky: [
|
| 363 |
+
{ role: "Time Traveler from 2124", scenario: "Explain how people travel and communicate 100 years in the future" },
|
| 364 |
+
{ role: "Alien Visitor", scenario: "Describe what you find most confusing about human behavior on Earth" },
|
| 365 |
+
{ role: "Superhero", scenario: "Explain your superpowers and how you use them to help people" },
|
| 366 |
+
{ role: "Pirate Captain", scenario: "Describe the location of your buried treasure and the adventure to find it" },
|
| 367 |
+
{ role: "Wizard", scenario: "Teach an apprentice the proper way to cast a levitation spell" },
|
| 368 |
+
{ role: "Robot Learning Emotions", scenario: "Try to understand why humans cry when they're happy" },
|
| 369 |
+
{ role: "Dragon", scenario: "Explain why you collect gold and jewels in your mountain cave" },
|
| 370 |
+
{ role: "Ghost Tour Guide", scenario: "Tell the spooky history of a haunted mansion" },
|
| 371 |
+
{ role: "Fairy Godmother", scenario: "Explain to Cinderella the rules and time limit of her magical transformation" },
|
| 372 |
+
{ role: "Mad Scientist", scenario: "Describe your latest invention that will change the world" },
|
| 373 |
+
{ role: "Detective", scenario: "Explain how you solved the mystery of the missing diamond" },
|
| 374 |
+
{ role: "Explorer", scenario: "Describe discovering a hidden ancient temple in the jungle" }
|
| 375 |
+
]
|
| 376 |
+
};
|
| 377 |
+
|
| 378 |
+
let selectedCategory = null;
|
| 379 |
let isRunning = false;
|
| 380 |
+
let timerInterval = null;
|
| 381 |
+
let remainingSeconds = 60;
|
| 382 |
+
let durationSeconds = 60;
|
| 383 |
+
let currentScenario = null;
|
| 384 |
|
| 385 |
+
const categoryBtns = document.querySelectorAll('.category-btn');
|
|
|
|
| 386 |
const startBtn = document.getElementById('startBtn');
|
| 387 |
+
const nextBtn = document.getElementById('nextBtn');
|
| 388 |
const resetBtn = document.getElementById('resetBtn');
|
| 389 |
+
const durationSlider = document.getElementById('durationSlider');
|
| 390 |
+
const durationDisplay = document.getElementById('durationDisplay');
|
| 391 |
+
const placeholderText = document.getElementById('placeholderText');
|
| 392 |
+
const scenarioContent = document.getElementById('scenarioContent');
|
| 393 |
+
const roleTitle = document.getElementById('roleTitle');
|
| 394 |
+
const scenarioText = document.getElementById('scenarioText');
|
| 395 |
+
const timerDisplay = document.getElementById('timerDisplay');
|
| 396 |
+
|
| 397 |
+
categoryBtns.forEach(btn => {
|
| 398 |
+
btn.addEventListener('click', () => {
|
| 399 |
+
categoryBtns.forEach(b => b.classList.remove('selected'));
|
| 400 |
+
btn.classList.add('selected');
|
| 401 |
+
selectedCategory = btn.dataset.category;
|
| 402 |
+
startBtn.disabled = false;
|
| 403 |
+
});
|
| 404 |
+
});
|
| 405 |
+
|
| 406 |
+
durationSlider.addEventListener('input', (e) => {
|
| 407 |
+
durationSeconds = parseInt(e.target.value);
|
| 408 |
+
remainingSeconds = durationSeconds;
|
| 409 |
+
durationDisplay.textContent = durationSeconds;
|
| 410 |
+
updateTimerDisplay();
|
| 411 |
+
});
|
| 412 |
|
| 413 |
+
function getRandomScenario() {
|
| 414 |
+
const categoryScenarios = scenarios[selectedCategory];
|
| 415 |
+
return categoryScenarios[Math.floor(Math.random() * categoryScenarios.length)];
|
| 416 |
+
}
|
| 417 |
+
|
| 418 |
+
function formatTime(seconds) {
|
| 419 |
+
const mins = Math.floor(seconds / 60);
|
| 420 |
+
const secs = seconds % 60;
|
| 421 |
+
return `${mins}:${String(secs).padStart(2, '0')}`;
|
| 422 |
+
}
|
| 423 |
+
|
| 424 |
+
function updateTimerDisplay() {
|
| 425 |
+
timerDisplay.textContent = formatTime(remainingSeconds);
|
| 426 |
|
| 427 |
+
timerDisplay.classList.remove('warning', 'danger');
|
| 428 |
+
if (remainingSeconds <= 10) {
|
| 429 |
+
timerDisplay.classList.add('danger');
|
| 430 |
+
} else if (remainingSeconds <= 20) {
|
| 431 |
+
timerDisplay.classList.add('warning');
|
| 432 |
+
}
|
| 433 |
+
}
|
| 434 |
+
|
| 435 |
+
function startTimer() {
|
| 436 |
+
timerInterval = setInterval(() => {
|
| 437 |
+
remainingSeconds--;
|
| 438 |
+
updateTimerDisplay();
|
| 439 |
+
|
| 440 |
+
if (remainingSeconds <= 0) {
|
| 441 |
+
stopTimer();
|
| 442 |
+
}
|
| 443 |
+
}, 1000);
|
| 444 |
+
}
|
| 445 |
+
|
| 446 |
+
function stopTimer() {
|
| 447 |
+
if (timerInterval) {
|
| 448 |
+
clearInterval(timerInterval);
|
| 449 |
+
timerInterval = null;
|
| 450 |
+
}
|
| 451 |
}
|
| 452 |
|
| 453 |
function start() {
|
| 454 |
+
if (!selectedCategory || isRunning) return;
|
| 455 |
|
| 456 |
isRunning = true;
|
| 457 |
+
remainingSeconds = durationSeconds;
|
| 458 |
+
currentScenario = getRandomScenario();
|
| 459 |
+
|
| 460 |
+
placeholderText.classList.add('hidden');
|
| 461 |
+
scenarioContent.classList.remove('hidden');
|
| 462 |
+
|
| 463 |
+
roleTitle.textContent = currentScenario.role;
|
| 464 |
+
scenarioText.textContent = currentScenario.scenario;
|
| 465 |
+
updateTimerDisplay();
|
| 466 |
+
|
| 467 |
+
startBtn.classList.add('hidden');
|
| 468 |
+
nextBtn.classList.remove('hidden');
|
| 469 |
startBtn.disabled = true;
|
| 470 |
+
durationSlider.disabled = true;
|
| 471 |
+
categoryBtns.forEach(btn => btn.style.pointerEvents = 'none');
|
| 472 |
+
|
| 473 |
+
startTimer();
|
| 474 |
+
}
|
| 475 |
+
|
| 476 |
+
function next() {
|
| 477 |
+
stopTimer();
|
| 478 |
+
remainingSeconds = durationSeconds;
|
| 479 |
+
currentScenario = getRandomScenario();
|
| 480 |
|
| 481 |
+
roleTitle.textContent = currentScenario.role;
|
| 482 |
+
scenarioText.textContent = currentScenario.scenario;
|
| 483 |
+
updateTimerDisplay();
|
| 484 |
|
| 485 |
+
startTimer();
|
| 486 |
}
|
| 487 |
|
| 488 |
function reset() {
|
| 489 |
+
stopTimer();
|
| 490 |
isRunning = false;
|
| 491 |
+
remainingSeconds = durationSeconds;
|
|
|
|
|
|
|
| 492 |
|
| 493 |
+
placeholderText.classList.remove('hidden');
|
| 494 |
+
scenarioContent.classList.add('hidden');
|
| 495 |
+
|
| 496 |
+
startBtn.classList.remove('hidden');
|
| 497 |
+
nextBtn.classList.add('hidden');
|
| 498 |
+
startBtn.disabled = selectedCategory === null;
|
| 499 |
+
durationSlider.disabled = false;
|
| 500 |
+
categoryBtns.forEach(btn => btn.style.pointerEvents = 'auto');
|
| 501 |
|
| 502 |
+
updateTimerDisplay();
|
|
|
|
| 503 |
}
|
| 504 |
|
| 505 |
startBtn.addEventListener('click', start);
|
| 506 |
+
nextBtn.addEventListener('click', next);
|
| 507 |
resetBtn.addEventListener('click', reset);
|
| 508 |
+
|
| 509 |
+
updateTimerDisplay();
|
|
|
|
|
|
|
|
|
|
| 510 |
</script>
|
| 511 |
</body>
|
| 512 |
</html>
|