Spaces:
Running
Running
Anonymous commited on
Commit ·
30db9ab
1
Parent(s): bcf9f5b
Show context cues after script text
Browse files- index.html +3 -3
- static/css/index.css +16 -0
index.html
CHANGED
|
@@ -120,12 +120,12 @@
|
|
| 120 |
const turn = document.createElement("p");
|
| 121 |
const speaker = speakers[index];
|
| 122 |
const context = contexts[index];
|
| 123 |
-
const
|
| 124 |
const escapedText = escapeHtml(text);
|
| 125 |
if (speaker !== undefined && speaker !== "") {
|
| 126 |
-
turn.innerHTML = `<strong>[S${Number(speaker) + 1}]</strong> ${
|
| 127 |
} else {
|
| 128 |
-
turn.innerHTML = `${
|
| 129 |
}
|
| 130 |
wrapper.appendChild(turn);
|
| 131 |
});
|
|
|
|
| 120 |
const turn = document.createElement("p");
|
| 121 |
const speaker = speakers[index];
|
| 122 |
const context = contexts[index];
|
| 123 |
+
const contextBadge = context ? ` <span class="context-cue">${escapeHtml(context)}</span>` : "";
|
| 124 |
const escapedText = escapeHtml(text);
|
| 125 |
if (speaker !== undefined && speaker !== "") {
|
| 126 |
+
turn.innerHTML = `<strong>[S${Number(speaker) + 1}]</strong> ${escapedText}${contextBadge}`;
|
| 127 |
} else {
|
| 128 |
+
turn.innerHTML = `${escapedText}${contextBadge}`;
|
| 129 |
}
|
| 130 |
wrapper.appendChild(turn);
|
| 131 |
});
|
static/css/index.css
CHANGED
|
@@ -228,6 +228,22 @@ body {
|
|
| 228 |
margin-bottom: 0;
|
| 229 |
}
|
| 230 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 231 |
.reference-cell {
|
| 232 |
display: grid;
|
| 233 |
gap: 0.55rem;
|
|
|
|
| 228 |
margin-bottom: 0;
|
| 229 |
}
|
| 230 |
|
| 231 |
+
.context-cue {
|
| 232 |
+
display: inline;
|
| 233 |
+
margin-left: 0.35rem;
|
| 234 |
+
color: var(--muted);
|
| 235 |
+
font-size: 0.84em;
|
| 236 |
+
font-weight: 700;
|
| 237 |
+
}
|
| 238 |
+
|
| 239 |
+
.context-cue::before {
|
| 240 |
+
content: "(";
|
| 241 |
+
}
|
| 242 |
+
|
| 243 |
+
.context-cue::after {
|
| 244 |
+
content: ")";
|
| 245 |
+
}
|
| 246 |
+
|
| 247 |
.reference-cell {
|
| 248 |
display: grid;
|
| 249 |
gap: 0.55rem;
|