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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>NoteSimplify β Plain & Clear</title>
|
| 7 |
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
| 8 |
+
<link href="https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Mono:wght@300;400;500&family=DM+Sans:wght@300;400;500;600&display=swap" rel="stylesheet">
|
| 9 |
+
<style>
|
| 10 |
+
:root {
|
| 11 |
+
--ink: #1a1a18;
|
| 12 |
+
--paper: #f5f0e8;
|
| 13 |
+
--cream: #ede7d5;
|
| 14 |
+
--amber: #d4870a;
|
| 15 |
+
--amber-light: #f5a623;
|
| 16 |
+
--sage: #5a7a5c;
|
| 17 |
+
--rust: #b5451b;
|
| 18 |
+
--muted: #7a7468;
|
| 19 |
+
--card: #faf7f2;
|
| 20 |
+
--border: #d8d0be;
|
| 21 |
+
}
|
| 22 |
+
|
| 23 |
+
* { margin: 0; padding: 0; box-sizing: border-box; }
|
| 24 |
+
|
| 25 |
+
body {
|
| 26 |
+
background: var(--paper);
|
| 27 |
+
color: var(--ink);
|
| 28 |
+
font-family: 'DM Sans', sans-serif;
|
| 29 |
+
min-height: 100vh;
|
| 30 |
+
background-image:
|
| 31 |
+
radial-gradient(ellipse at 20% 50%, rgba(212,135,10,0.06) 0%, transparent 60%),
|
| 32 |
+
radial-gradient(ellipse at 80% 20%, rgba(90,122,92,0.06) 0%, transparent 60%);
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
header {
|
| 36 |
+
padding: 2.5rem 3rem 1.5rem;
|
| 37 |
+
border-bottom: 1.5px solid var(--border);
|
| 38 |
+
display: flex;
|
| 39 |
+
align-items: baseline;
|
| 40 |
+
gap: 1rem;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.logo {
|
| 44 |
+
font-family: 'DM Serif Display', serif;
|
| 45 |
+
font-size: 2rem;
|
| 46 |
+
color: var(--ink);
|
| 47 |
+
letter-spacing: -0.02em;
|
| 48 |
+
}
|
| 49 |
+
.logo span { color: var(--amber); }
|
| 50 |
+
|
| 51 |
+
.tagline {
|
| 52 |
+
font-size: 0.8rem;
|
| 53 |
+
color: var(--muted);
|
| 54 |
+
font-family: 'DM Mono', monospace;
|
| 55 |
+
letter-spacing: 0.05em;
|
| 56 |
+
text-transform: uppercase;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
main {
|
| 60 |
+
max-width: 1100px;
|
| 61 |
+
margin: 0 auto;
|
| 62 |
+
padding: 3rem 3rem;
|
| 63 |
+
display: grid;
|
| 64 |
+
grid-template-columns: 1fr 1fr;
|
| 65 |
+
gap: 2rem;
|
| 66 |
+
align-items: start;
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
.panel {
|
| 70 |
+
background: var(--card);
|
| 71 |
+
border: 1.5px solid var(--border);
|
| 72 |
+
border-radius: 12px;
|
| 73 |
+
overflow: hidden;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
.panel-header {
|
| 77 |
+
padding: 1rem 1.5rem;
|
| 78 |
+
border-bottom: 1.5px solid var(--border);
|
| 79 |
+
display: flex;
|
| 80 |
+
align-items: center;
|
| 81 |
+
justify-content: space-between;
|
| 82 |
+
background: var(--cream);
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
.panel-title {
|
| 86 |
+
font-family: 'DM Mono', monospace;
|
| 87 |
+
font-size: 0.7rem;
|
| 88 |
+
text-transform: uppercase;
|
| 89 |
+
letter-spacing: 0.1em;
|
| 90 |
+
color: var(--muted);
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
.char-count {
|
| 94 |
+
font-family: 'DM Mono', monospace;
|
| 95 |
+
font-size: 0.7rem;
|
| 96 |
+
color: var(--muted);
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
textarea {
|
| 100 |
+
width: 100%;
|
| 101 |
+
min-height: 320px;
|
| 102 |
+
padding: 1.5rem;
|
| 103 |
+
background: transparent;
|
| 104 |
+
border: none;
|
| 105 |
+
outline: none;
|
| 106 |
+
font-family: 'DM Sans', sans-serif;
|
| 107 |
+
font-size: 0.95rem;
|
| 108 |
+
line-height: 1.7;
|
| 109 |
+
color: var(--ink);
|
| 110 |
+
resize: vertical;
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
textarea::placeholder { color: #b5ad9f; }
|
| 114 |
+
|
| 115 |
+
.controls {
|
| 116 |
+
padding: 1rem 1.5rem;
|
| 117 |
+
border-top: 1.5px solid var(--border);
|
| 118 |
+
display: flex;
|
| 119 |
+
gap: 0.75rem;
|
| 120 |
+
align-items: center;
|
| 121 |
+
flex-wrap: wrap;
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
.btn-primary {
|
| 125 |
+
background: var(--ink);
|
| 126 |
+
color: var(--paper);
|
| 127 |
+
border: none;
|
| 128 |
+
padding: 0.65rem 1.75rem;
|
| 129 |
+
border-radius: 6px;
|
| 130 |
+
font-family: 'DM Sans', sans-serif;
|
| 131 |
+
font-size: 0.875rem;
|
| 132 |
+
font-weight: 600;
|
| 133 |
+
cursor: pointer;
|
| 134 |
+
letter-spacing: 0.01em;
|
| 135 |
+
transition: background 0.15s, transform 0.1s;
|
| 136 |
+
display: flex;
|
| 137 |
+
align-items: center;
|
| 138 |
+
gap: 0.5rem;
|
| 139 |
+
}
|
| 140 |
+
.btn-primary:hover { background: var(--amber); }
|
| 141 |
+
.btn-primary:active { transform: scale(0.98); }
|
| 142 |
+
.btn-primary:disabled { background: var(--muted); cursor: not-allowed; }
|
| 143 |
+
|
| 144 |
+
.btn-ghost {
|
| 145 |
+
background: transparent;
|
| 146 |
+
color: var(--muted);
|
| 147 |
+
border: 1.5px solid var(--border);
|
| 148 |
+
padding: 0.6rem 1rem;
|
| 149 |
+
border-radius: 6px;
|
| 150 |
+
font-family: 'DM Sans', sans-serif;
|
| 151 |
+
font-size: 0.8rem;
|
| 152 |
+
cursor: pointer;
|
| 153 |
+
transition: all 0.15s;
|
| 154 |
+
}
|
| 155 |
+
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
|
| 156 |
+
|
| 157 |
+
/* Output panel */
|
| 158 |
+
.output-body {
|
| 159 |
+
padding: 1.5rem;
|
| 160 |
+
min-height: 320px;
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
.empty-state {
|
| 164 |
+
display: flex;
|
| 165 |
+
flex-direction: column;
|
| 166 |
+
align-items: center;
|
| 167 |
+
justify-content: center;
|
| 168 |
+
height: 280px;
|
| 169 |
+
gap: 0.75rem;
|
| 170 |
+
color: var(--muted);
|
| 171 |
+
}
|
| 172 |
+
|
| 173 |
+
.empty-icon {
|
| 174 |
+
font-size: 2.5rem;
|
| 175 |
+
opacity: 0.3;
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
.empty-text {
|
| 179 |
+
font-family: 'DM Mono', monospace;
|
| 180 |
+
font-size: 0.75rem;
|
| 181 |
+
text-transform: uppercase;
|
| 182 |
+
letter-spacing: 0.08em;
|
| 183 |
+
}
|
| 184 |
+
|
| 185 |
+
/* Result sections */
|
| 186 |
+
.section {
|
| 187 |
+
margin-bottom: 1.75rem;
|
| 188 |
+
animation: fadeUp 0.4s ease forwards;
|
| 189 |
+
opacity: 0;
|
| 190 |
+
}
|
| 191 |
+
|
| 192 |
+
.section:nth-child(1) { animation-delay: 0.05s; }
|
| 193 |
+
.section:nth-child(2) { animation-delay: 0.15s; }
|
| 194 |
+
.section:nth-child(3) { animation-delay: 0.25s; }
|
| 195 |
+
.section:nth-child(4) { animation-delay: 0.35s; }
|
| 196 |
+
|
| 197 |
+
@keyframes fadeUp {
|
| 198 |
+
from { opacity: 0; transform: translateY(8px); }
|
| 199 |
+
to { opacity: 1; transform: translateY(0); }
|
| 200 |
+
}
|
| 201 |
+
|
| 202 |
+
.section-label {
|
| 203 |
+
display: inline-flex;
|
| 204 |
+
align-items: center;
|
| 205 |
+
gap: 0.4rem;
|
| 206 |
+
font-family: 'DM Mono', monospace;
|
| 207 |
+
font-size: 0.65rem;
|
| 208 |
+
text-transform: uppercase;
|
| 209 |
+
letter-spacing: 0.1em;
|
| 210 |
+
padding: 0.2rem 0.6rem;
|
| 211 |
+
border-radius: 4px;
|
| 212 |
+
margin-bottom: 0.75rem;
|
| 213 |
+
font-weight: 500;
|
| 214 |
+
}
|
| 215 |
+
|
| 216 |
+
.label-simple { background: rgba(90,122,92,0.12); color: var(--sage); }
|
| 217 |
+
.label-bullets { background: rgba(212,135,10,0.12); color: var(--amber); }
|
| 218 |
+
.label-key { background: rgba(181,69,27,0.12); color: var(--rust); }
|
| 219 |
+
|
| 220 |
+
.section-text {
|
| 221 |
+
font-size: 0.95rem;
|
| 222 |
+
line-height: 1.7;
|
| 223 |
+
color: var(--ink);
|
| 224 |
+
}
|
| 225 |
+
|
| 226 |
+
.bullet-list {
|
| 227 |
+
list-style: none;
|
| 228 |
+
display: flex;
|
| 229 |
+
flex-direction: column;
|
| 230 |
+
gap: 0.5rem;
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
.bullet-list li {
|
| 234 |
+
display: flex;
|
| 235 |
+
gap: 0.75rem;
|
| 236 |
+
align-items: flex-start;
|
| 237 |
+
font-size: 0.9rem;
|
| 238 |
+
line-height: 1.6;
|
| 239 |
+
}
|
| 240 |
+
|
| 241 |
+
.bullet-list li::before {
|
| 242 |
+
content: 'β';
|
| 243 |
+
color: var(--amber);
|
| 244 |
+
font-family: 'DM Mono', monospace;
|
| 245 |
+
flex-shrink: 0;
|
| 246 |
+
margin-top: 0.05em;
|
| 247 |
+
}
|
| 248 |
+
|
| 249 |
+
.key-info-box {
|
| 250 |
+
background: linear-gradient(135deg, rgba(181,69,27,0.06), rgba(212,135,10,0.06));
|
| 251 |
+
border: 1.5px solid rgba(181,69,27,0.2);
|
| 252 |
+
border-left: 3px solid var(--rust);
|
| 253 |
+
border-radius: 8px;
|
| 254 |
+
padding: 0.9rem 1.1rem;
|
| 255 |
+
font-size: 0.9rem;
|
| 256 |
+
line-height: 1.65;
|
| 257 |
+
font-style: italic;
|
| 258 |
+
color: var(--ink);
|
| 259 |
+
}
|
| 260 |
+
|
| 261 |
+
.divider {
|
| 262 |
+
height: 1px;
|
| 263 |
+
background: var(--border);
|
| 264 |
+
margin: 1.25rem 0;
|
| 265 |
+
}
|
| 266 |
+
|
| 267 |
+
/* Loading */
|
| 268 |
+
.loading {
|
| 269 |
+
display: flex;
|
| 270 |
+
align-items: center;
|
| 271 |
+
justify-content: center;
|
| 272 |
+
height: 280px;
|
| 273 |
+
gap: 1rem;
|
| 274 |
+
flex-direction: column;
|
| 275 |
+
color: var(--muted);
|
| 276 |
+
}
|
| 277 |
+
|
| 278 |
+
.spinner {
|
| 279 |
+
width: 28px;
|
| 280 |
+
height: 28px;
|
| 281 |
+
border: 2px solid var(--border);
|
| 282 |
+
border-top-color: var(--amber);
|
| 283 |
+
border-radius: 50%;
|
| 284 |
+
animation: spin 0.8s linear infinite;
|
| 285 |
+
}
|
| 286 |
+
|
| 287 |
+
@keyframes spin { to { transform: rotate(360deg); } }
|
| 288 |
+
|
| 289 |
+
.loading-text {
|
| 290 |
+
font-family: 'DM Mono', monospace;
|
| 291 |
+
font-size: 0.7rem;
|
| 292 |
+
text-transform: uppercase;
|
| 293 |
+
letter-spacing: 0.1em;
|
| 294 |
+
animation: pulse 1.5s ease-in-out infinite;
|
| 295 |
+
}
|
| 296 |
+
|
| 297 |
+
@keyframes pulse { 0%,100%{opacity:0.4} 50%{opacity:1} }
|
| 298 |
+
|
| 299 |
+
/* Copy button */
|
| 300 |
+
.copy-btn {
|
| 301 |
+
display: flex;
|
| 302 |
+
align-items: center;
|
| 303 |
+
gap: 0.4rem;
|
| 304 |
+
background: transparent;
|
| 305 |
+
border: 1px solid var(--border);
|
| 306 |
+
color: var(--muted);
|
| 307 |
+
padding: 0.35rem 0.75rem;
|
| 308 |
+
border-radius: 5px;
|
| 309 |
+
font-size: 0.72rem;
|
| 310 |
+
font-family: 'DM Mono', monospace;
|
| 311 |
+
cursor: pointer;
|
| 312 |
+
transition: all 0.15s;
|
| 313 |
+
}
|
| 314 |
+
.copy-btn:hover { border-color: var(--sage); color: var(--sage); }
|
| 315 |
+
|
| 316 |
+
.error-msg {
|
| 317 |
+
background: rgba(181,69,27,0.08);
|
| 318 |
+
border: 1px solid rgba(181,69,27,0.3);
|
| 319 |
+
border-radius: 8px;
|
| 320 |
+
padding: 1rem 1.25rem;
|
| 321 |
+
font-size: 0.875rem;
|
| 322 |
+
color: var(--rust);
|
| 323 |
+
margin: 1rem 0;
|
| 324 |
+
}
|
| 325 |
+
|
| 326 |
+
@media (max-width: 750px) {
|
| 327 |
+
main { grid-template-columns: 1fr; padding: 1.5rem 1rem; }
|
| 328 |
+
header { padding: 1.5rem 1rem; flex-wrap: wrap; }
|
| 329 |
+
}
|
| 330 |
+
</style>
|
| 331 |
+
</head>
|
| 332 |
+
<body>
|
| 333 |
+
|
| 334 |
+
<header>
|
| 335 |
+
<div class="logo">Note<span>Simplify</span></div>
|
| 336 |
+
<div class="tagline">// Plain language. Clear ideas. Zero fluff.</div>
|
| 337 |
+
</header>
|
| 338 |
+
|
| 339 |
+
<main>
|
| 340 |
+
<!-- Input Panel -->
|
| 341 |
+
<div class="panel">
|
| 342 |
+
<div class="panel-header">
|
| 343 |
+
<span class="panel-title">π Paste your notes</span>
|
| 344 |
+
<span class="char-count" id="charCount">0 chars</span>
|
| 345 |
+
</div>
|
| 346 |
+
<textarea id="inputText" placeholder="Paste any text here β lecture notes, articles, research papers, emails, textbook chapters... anything you want simplified."></textarea>
|
| 347 |
+
<div class="controls">
|
| 348 |
+
<button class="btn-primary" id="simplifyBtn" onclick="simplify()">
|
| 349 |
+
β¦ Simplify
|
| 350 |
+
</button>
|
| 351 |
+
<button class="btn-ghost" onclick="clearAll()">Clear</button>
|
| 352 |
+
<button class="btn-ghost" onclick="loadExample()">Try example</button>
|
| 353 |
+
</div>
|
| 354 |
+
</div>
|
| 355 |
+
|
| 356 |
+
<!-- Output Panel -->
|
| 357 |
+
<div class="panel">
|
| 358 |
+
<div class="panel-header">
|
| 359 |
+
<span class="panel-title">β¦ Simplified output</span>
|
| 360 |
+
<button class="copy-btn" id="copyBtn" onclick="copyOutput()" style="display:none">β Copy all</button>
|
| 361 |
+
</div>
|
| 362 |
+
<div class="output-body" id="outputBody">
|
| 363 |
+
<div class="empty-state">
|
| 364 |
+
<div class="empty-icon">β¦</div>
|
| 365 |
+
<div class="empty-text">Your simplified notes appear here</div>
|
| 366 |
+
</div>
|
| 367 |
+
</div>
|
| 368 |
+
</div>
|
| 369 |
+
</main>
|
| 370 |
+
|
| 371 |
+
<script>
|
| 372 |
+
const textarea = document.getElementById('inputText');
|
| 373 |
+
const charCount = document.getElementById('charCount');
|
| 374 |
+
let outputData = null;
|
| 375 |
+
|
| 376 |
+
textarea.addEventListener('input', () => {
|
| 377 |
+
const len = textarea.value.length;
|
| 378 |
+
charCount.textContent = len + ' chars';
|
| 379 |
+
});
|
| 380 |
+
|
| 381 |
+
function clearAll() {
|
| 382 |
+
textarea.value = '';
|
| 383 |
+
charCount.textContent = '0 chars';
|
| 384 |
+
outputData = null;
|
| 385 |
+
document.getElementById('copyBtn').style.display = 'none';
|
| 386 |
+
document.getElementById('outputBody').innerHTML = `
|
| 387 |
+
<div class="empty-state">
|
| 388 |
+
<div class="empty-icon">β¦</div>
|
| 389 |
+
<div class="empty-text">Your simplified notes appear here</div>
|
| 390 |
+
</div>`;
|
| 391 |
+
}
|
| 392 |
+
|
| 393 |
+
function loadExample() {
|
| 394 |
+
textarea.value = `The mitochondria are membrane-bound organelles found in the cytoplasm of eukaryotic cells. They are often referred to as the "powerhouse of the cell" because they generate most of the cell's supply of adenosine triphosphate (ATP), used as a source of chemical energy. Mitochondria contain their own DNA and are believed to have originated from ancient bacterial endosymbiosis events. The inner membrane of the mitochondria is folded into cristae which dramatically increases surface area, facilitating greater ATP production via oxidative phosphorylation. Dysfunction in mitochondrial activity is associated with numerous pathological conditions including neurodegeneration, metabolic disorders, and aging.`;
|
| 395 |
+
charCount.textContent = textarea.value.length + ' chars';
|
| 396 |
+
}
|
| 397 |
+
|
| 398 |
+
async function simplify() {
|
| 399 |
+
const text = textarea.value.trim();
|
| 400 |
+
if (!text) {
|
| 401 |
+
textarea.focus();
|
| 402 |
+
return;
|
| 403 |
+
}
|
| 404 |
+
|
| 405 |
+
const btn = document.getElementById('simplifyBtn');
|
| 406 |
+
btn.disabled = true;
|
| 407 |
+
btn.textContent = 'β³ Simplifying...';
|
| 408 |
+
document.getElementById('copyBtn').style.display = 'none';
|
| 409 |
+
|
| 410 |
+
document.getElementById('outputBody').innerHTML = `
|
| 411 |
+
<div class="loading">
|
| 412 |
+
<div class="spinner"></div>
|
| 413 |
+
<div class="loading-text">Simplifying your notes...</div>
|
| 414 |
+
</div>`;
|
| 415 |
+
|
| 416 |
+
try {
|
| 417 |
+
const response = await fetch('https://api.anthropic.com/v1/messages', {
|
| 418 |
+
method: 'POST',
|
| 419 |
+
headers: { 'Content-Type': 'application/json' },
|
| 420 |
+
body: JSON.stringify({
|
| 421 |
+
model: 'claude-sonnet-4-20250514',
|
| 422 |
+
max_tokens: 1000,
|
| 423 |
+
system: `You are a note simplifier. When given any text, you MUST respond with ONLY valid JSON (no markdown, no backticks, no extra text).
|
| 424 |
+
|
| 425 |
+
The JSON structure must be exactly:
|
| 426 |
+
{
|
| 427 |
+
"simple": "Rewrite the full content in simple, everyday English. Use short sentences. Never copy original sentences - always rewrite in your own words. Replace all difficult/technical words with simple ones.",
|
| 428 |
+
"bullets": ["bullet point 1", "bullet point 2", "bullet point 3", "bullet point 4", "bullet point 5"],
|
| 429 |
+
"keyInfo": "The single most important takeaway from the text, in one clear sentence."
|
| 430 |
+
}
|
| 431 |
+
|
| 432 |
+
Rules:
|
| 433 |
+
- "simple": 2-4 short sentences, plain language, your own words
|
| 434 |
+
- "bullets": 4-6 points, each under 15 words, no jargon
|
| 435 |
+
- "keyInfo": exactly 1 sentence, the #1 thing to remember
|
| 436 |
+
- NEVER quote or copy phrases from the original text
|
| 437 |
+
- NEVER use technical or difficult vocabulary
|
| 438 |
+
- Output ONLY the JSON object, nothing else`,
|
| 439 |
+
messages: [{ role: 'user', content: text }]
|
| 440 |
+
})
|
| 441 |
+
});
|
| 442 |
+
|
| 443 |
+
const data = await response.json();
|
| 444 |
+
|
| 445 |
+
if (data.error) throw new Error(data.error.message);
|
| 446 |
+
|
| 447 |
+
const rawText = data.content[0].text;
|
| 448 |
+
let parsed;
|
| 449 |
+
try {
|
| 450 |
+
const clean = rawText.replace(/```json|```/g, '').trim();
|
| 451 |
+
parsed = JSON.parse(clean);
|
| 452 |
+
} catch(e) {
|
| 453 |
+
throw new Error('Could not parse the response. Please try again.');
|
| 454 |
+
}
|
| 455 |
+
|
| 456 |
+
outputData = parsed;
|
| 457 |
+
renderOutput(parsed);
|
| 458 |
+
document.getElementById('copyBtn').style.display = 'flex';
|
| 459 |
+
|
| 460 |
+
} catch(err) {
|
| 461 |
+
document.getElementById('outputBody').innerHTML = `
|
| 462 |
+
<div class="error-msg">β ${err.message || 'Something went wrong. Please try again.'}</div>`;
|
| 463 |
+
} finally {
|
| 464 |
+
btn.disabled = false;
|
| 465 |
+
btn.innerHTML = 'β¦ Simplify';
|
| 466 |
+
}
|
| 467 |
+
}
|
| 468 |
+
|
| 469 |
+
function renderOutput(data) {
|
| 470 |
+
const bullets = Array.isArray(data.bullets)
|
| 471 |
+
? data.bullets.map(b => `<li>${b}</li>`).join('')
|
| 472 |
+
: '<li>No bullets available</li>';
|
| 473 |
+
|
| 474 |
+
document.getElementById('outputBody').innerHTML = `
|
| 475 |
+
<div class="section">
|
| 476 |
+
<div class="section-label label-simple">β Simple English</div>
|
| 477 |
+
<div class="section-text">${data.simple || 'β'}</div>
|
| 478 |
+
</div>
|
| 479 |
+
|
| 480 |
+
<div class="divider"></div>
|
| 481 |
+
|
| 482 |
+
<div class="section">
|
| 483 |
+
<div class="section-label label-bullets">β‘ Quick Bullets</div>
|
| 484 |
+
<ul class="bullet-list">${bullets}</ul>
|
| 485 |
+
</div>
|
| 486 |
+
|
| 487 |
+
<div class="divider"></div>
|
| 488 |
+
|
| 489 |
+
<div class="section">
|
| 490 |
+
<div class="section-label label-key">β
Key Info</div>
|
| 491 |
+
<div class="key-info-box">${data.keyInfo || 'β'}</div>
|
| 492 |
+
</div>
|
| 493 |
+
`;
|
| 494 |
+
}
|
| 495 |
+
|
| 496 |
+
function copyOutput() {
|
| 497 |
+
if (!outputData) return;
|
| 498 |
+
const text = [
|
| 499 |
+
'=== SIMPLE ENGLISH ===',
|
| 500 |
+
outputData.simple,
|
| 501 |
+
'',
|
| 502 |
+
'=== QUICK BULLETS ===',
|
| 503 |
+
(outputData.bullets || []).map(b => 'β ' + b).join('\n'),
|
| 504 |
+
'',
|
| 505 |
+
'=== KEY INFO ===',
|
| 506 |
+
outputData.keyInfo
|
| 507 |
+
].join('\n');
|
| 508 |
+
|
| 509 |
+
navigator.clipboard.writeText(text).then(() => {
|
| 510 |
+
const btn = document.getElementById('copyBtn');
|
| 511 |
+
btn.textContent = 'β Copied!';
|
| 512 |
+
setTimeout(() => btn.innerHTML = 'β Copy all', 1800);
|
| 513 |
+
});
|
| 514 |
+
}
|
| 515 |
+
</script>
|
| 516 |
+
</body>
|
| 517 |
+
</html>
|