Edit plays page by page, with a review of uncertain words
The editor shows one original page next to its photo, with a page list,
page number and missing toggle, and highlights {uncertain} words. The
review dialog steps through them with the photo zoomed to about the
right line. Pages can be re-read from their photo or added from a new
photo, which fills a !N missing marker.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HA82gVRDXpoukzgMFumoJt
This commit is contained in:
parent
6240907809
commit
debf1aa8bc
5 changed files with 679 additions and 152 deletions
113
public/edit.html
113
public/edit.html
|
|
@ -11,9 +11,9 @@
|
|||
<body class="page-edit">
|
||||
<header class="topbar">
|
||||
<nav class="crumbs"><a href="./">← Všechny hry</a><a id="preview" target="_blank">Otevřít ve čtečce ↗</a></nav>
|
||||
<div class="topbar-actions">
|
||||
<span class="muted small" id="saved"></span>
|
||||
<button id="save" class="primary">Uložit</button>
|
||||
<div class="topbar-actions" id="auth">
|
||||
<span class="muted small" id="saved" role="status"></span>
|
||||
<button id="save" class="primary" title="Uložit (Ctrl+S)">Uložit</button>
|
||||
</div>
|
||||
</header>
|
||||
<main class="wrap wide">
|
||||
|
|
@ -29,44 +29,101 @@
|
|||
<label class="field toggle"><input type="checkbox" id="published"> <span>Zveřejněno</span></label>
|
||||
</div>
|
||||
|
||||
<div class="editor">
|
||||
<section class="editor-text">
|
||||
<textarea id="text" spellcheck="false" aria-label="Text hry"></textarea>
|
||||
<div class="review-bar" id="review-bar" hidden>
|
||||
<span id="review-count"></span>
|
||||
<button class="primary" id="review-start">Projít nejistá slova</button>
|
||||
</div>
|
||||
|
||||
<details class="checks" id="checks">
|
||||
<summary><b>Kontrola</b> <span id="summary" class="muted"></span></summary>
|
||||
<ul id="issues"></ul>
|
||||
<button id="retry" hidden>Přepsat nepovedené strany znovu</button>
|
||||
</details>
|
||||
|
||||
<div class="editor" id="editor">
|
||||
<nav class="page-list" aria-label="Strany">
|
||||
<ol id="page-list"></ol>
|
||||
<div class="page-list-tools">
|
||||
<button id="add-blank" title="Vložit prázdnou stranu za vybranou">+ Strana</button>
|
||||
<label class="button" id="add-photo-label" title="Nahrát fotku další strany (třeba té, která chyběla)">+ Z fotky<input type="file" id="add-photo" accept="image/*" hidden></label>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<section class="page-photo" id="photo-pane">
|
||||
<div class="photo-frame" id="photo-frame" title="Kliknutím přiblížíte">
|
||||
<img id="img" alt="">
|
||||
<p class="muted photo-empty" id="photo-empty">Tato strana nemá fotku.</p>
|
||||
</div>
|
||||
<label class="photo-pick small muted">Fotka: <select id="photo-select"></select></label>
|
||||
</section>
|
||||
|
||||
<section class="page-text">
|
||||
<div class="page-head">
|
||||
<button id="prev" title="Předchozí strana (Alt+←)" aria-label="Předchozí strana">◀</button>
|
||||
<label class="page-num">Strana <input id="num" size="5" maxlength="20" autocomplete="off"></label>
|
||||
<button id="next" title="Další strana (Alt+→)" aria-label="Další strana">▶</button>
|
||||
<label class="check"><input type="checkbox" id="missing"> v originále chybí</label>
|
||||
<span class="grow"></span>
|
||||
<button id="reread" hidden>Přepsat znovu z fotky</button>
|
||||
<button id="remove" class="quiet" title="Smazat tuto stranu">Smazat stranu</button>
|
||||
</div>
|
||||
<div class="dup-note" id="dup-note" hidden></div>
|
||||
<p class="missing-hint muted" id="missing-hint" hidden>Strana v originále chybí. Až ji najdete, přidejte ji tlačítkem „+ Z fotky“ nebo zrušte zaškrtnutí a napište text.</p>
|
||||
<div class="hl-wrap" id="hl-wrap">
|
||||
<div class="hl-back" id="hl-back" aria-hidden="true"></div>
|
||||
<textarea id="text" spellcheck="false" aria-label="Text strany"></textarea>
|
||||
</div>
|
||||
<details class="help">
|
||||
<summary>Jak se text zapisuje</summary>
|
||||
<table>
|
||||
<tr><td><code>=5</code></td><td>začátek strany 5 (<code>!7</code> = strana 7 chybí)</td></tr>
|
||||
<tr><td><code>@Lída</code></td><td>replika postavy Lída; další řádky jsou její text</td></tr>
|
||||
<tr><td><code>>(Odejde)</code></td><td>scénická poznámka; pokračování na dalším řádku začíná <code>> </code></td></tr>
|
||||
<tr><td><code>> verš</code></td><td>verš / píseň (dvě mezery za <code>></code>)</td></tr>
|
||||
<tr><td><code>#Pokoj u Lysáků</code></td><td>popis scény u levého okraje</td></tr>
|
||||
<tr><td><code>~O p o n a</code></td><td>řádek na střed</td></tr>
|
||||
<tr><td><code>.</code></td><td>prázdný řádek; ukončí repliku</td></tr>
|
||||
<tr><td><code>{slovo|slova}</code></td><td>nejisté čtení (a jiná možnost); ve čtečce se ukáže jen první</td></tr>
|
||||
</table>
|
||||
<p>Rozdělené slovo na konci řádku nechte se spojovníkem (<code>nepří-</code>), čtečka ho spojí. Pomlčku jako interpunkci na konci řádku pište jako <code>–</code>.</p>
|
||||
<p>Text na začátku strany bez <code>@Jméno</code> pokračuje replikou z předchozí strany. Rozdělené slovo na konci řádku nechte se spojovníkem (<code>nepří-</code>), čtečka ho spojí. Pomlčku jako interpunkci na konci řádku pište jako <code>–</code>.</p>
|
||||
</details>
|
||||
</section>
|
||||
<aside class="editor-side">
|
||||
<div class="photo" id="photo-box" hidden>
|
||||
<div class="photo-nav">
|
||||
<button id="img-prev" title="Předchozí fotka">◀</button>
|
||||
<span id="img-label"></span>
|
||||
<button id="img-next" title="Další fotka">▶</button>
|
||||
<button id="img-jump" title="Najít tuto stranu v textu">Najít v textu</button>
|
||||
</div>
|
||||
<img id="img" alt="Fotka strany">
|
||||
</div>
|
||||
<div class="checks">
|
||||
<h2>Kontrola</h2>
|
||||
<p id="summary" class="muted"></p>
|
||||
<ul id="issues"></ul>
|
||||
<button id="retry" hidden>Přepsat nepovedené strany znovu</button>
|
||||
</div>
|
||||
<div class="danger">
|
||||
<button id="delete">Smazat hru</button>
|
||||
</div>
|
||||
</aside>
|
||||
</div>
|
||||
|
||||
<div class="danger">
|
||||
<button id="delete">Smazat celou hru</button>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<dialog class="review" id="review" aria-labelledby="review-title">
|
||||
<div class="review-grid">
|
||||
<div class="review-photo" id="review-photo">
|
||||
<img id="review-img" alt="Fotka strany">
|
||||
<div class="review-band" id="review-band" title="Slovo je přibližně tady"></div>
|
||||
<p class="muted photo-empty" id="review-nophoto" hidden>Ke straně není fotka.</p>
|
||||
</div>
|
||||
<form class="review-card" id="review-form" method="dialog">
|
||||
<div class="review-top">
|
||||
<h2 id="review-title">Nejistá slova</h2>
|
||||
<button type="button" class="quiet" id="review-close" aria-label="Zavřít">✕</button>
|
||||
</div>
|
||||
<div id="review-item">
|
||||
<p class="muted small" id="review-where"></p>
|
||||
<div class="review-context" id="review-context"></div>
|
||||
<label class="field"><span>Správně je</span><input id="review-fix" autocomplete="off" spellcheck="false"></label>
|
||||
<div class="review-alts" id="review-alts"></div>
|
||||
<div class="actions">
|
||||
<button type="button" id="review-prev" title="Předchozí">←</button>
|
||||
<button type="button" id="review-skip" title="Nechat označené a jít dál">Přeskočit</button>
|
||||
<button class="primary" id="review-ok" type="submit">Potvrdit</button>
|
||||
</div>
|
||||
<p class="muted small">Enter potvrdí, Esc zavře. Opravy se po zavření uloží.</p>
|
||||
</div>
|
||||
<div id="review-done" hidden>
|
||||
<p id="review-done-text"></p>
|
||||
<div class="actions"><button type="button" id="review-again" hidden>Projít přeskočená</button><button type="button" class="primary" id="review-finish">Hotovo</button></div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</dialog>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue