diff --git a/app.py b/app.py index 99723a3..5f17d8b 100644 --- a/app.py +++ b/app.py @@ -331,10 +331,16 @@ def analyze(draft: Draft): sids: list[int | None] = [] sid, prev_blank = -1, True for line in lines: - if not line.strip(): + stripped = line.strip() + if not stripped: sids.append(None) prev_blank = True continue + if stripped[0] in "#([": + # annotation line ([Chorus], (yeah), # notes) — no highlighting, + # no scheme letter, and it doesn't split the stanza either + sids.append(None) + continue if prev_blank: sid += 1 prev_blank = False diff --git a/static/index.html b/static/index.html index 034e69f..780586d 100644 --- a/static/index.html +++ b/static/index.html @@ -144,45 +144,12 @@ .scheme-readout b { color: var(--accent-2); letter-spacing: 0.15em; } .scheme-readout .offline { color: var(--r6); letter-spacing: 0.02em; } - /* ---- stanza reorder overlay ---- */ - #reorderOverlay { - position: fixed; inset: 0; z-index: 50; - background: rgba(10,8,6,0.7); backdrop-filter: blur(3px); - display: flex; align-items: center; justify-content: center; + .mtoggle { + display: flex; align-items: center; gap: 6px; + color: var(--ink-dim); font-size: 12px; cursor: pointer; user-select: none; } - #reorderOverlay[hidden] { display: none; } - .reorder-box { - width: min(560px, 92vw); max-height: 80vh; - background: var(--panel); border: 1px solid var(--line); border-radius: 14px; - display: flex; flex-direction: column; overflow: hidden; - } - .reorder-box h3 { - margin: 0; padding: 16px 20px 12px; - font-family: 'Fraunces', serif; font-weight: 600; font-size: 18px; - } - .reorder-box .hint { padding: 0 20px 10px; color: var(--ink-dim); font-size: 12px; } - #stanzaList { padding: 0 16px 8px; overflow-y: auto; flex: 1; } - .stanza-card { - display: flex; align-items: center; gap: 12px; - background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; - padding: 12px 14px; margin-bottom: 8px; cursor: grab; - transition: border-color .15s, opacity .15s; - } - .stanza-card:active { cursor: grabbing; } - .stanza-card.dragging { opacity: 0.35; } - .stanza-card.drop-above { border-top: 2px solid var(--accent); } - .stanza-card.drop-below { border-bottom: 2px solid var(--accent); } - .stanza-card .grip { color: var(--ink-dim); font-size: 16px; user-select: none; } - .stanza-card .preview { flex: 1; min-width: 0; } - .stanza-card .first-line { - white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 13px; - } - .stanza-card .meta-line { color: var(--ink-dim); font-size: 11px; margin-top: 3px; } - .stanza-card .scheme-badge { - color: var(--accent-2); font-size: 11px; letter-spacing: 0.18em; - text-transform: uppercase; white-space: nowrap; - } - .reorder-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; } + .mtoggle input { accent-color: var(--accent); } + .mtoggle:hover { color: var(--ink); } /* ---- side panel ---- */ aside { @@ -218,6 +185,21 @@ } .seg button.active { color: var(--accent); border-color: var(--accent); } .results { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; } + .defcard { + background: var(--panel-2); border: 1px solid var(--line); + border-radius: 10px; padding: 12px 14px; margin: 10px 0 4px; + } + .defhead { display: flex; align-items: baseline; gap: 8px; font-size: 14px; } + .defhead .phon { color: var(--ink-dim); font-size: 12px; } + .defx { margin-left: auto; cursor: pointer; color: var(--ink-dim); font-size: 15px; } + .defx:hover { color: var(--r6); } + .defs { margin: 8px 0 10px; padding-left: 18px; font-size: 13px; line-height: 1.55; } + .defs li { margin: 4px 0; } + .defs i { + color: var(--accent-2); font-style: normal; font-size: 11px; + text-transform: uppercase; letter-spacing: .06em; margin-right: 4px; + } + .btn.small { padding: 5px 10px; font-size: 12px; } .chip { font-size: 13px; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); padding: 5px 10px; border-radius: 999px; cursor: pointer; @@ -269,9 +251,9 @@ Double-click any word to look it up on the right.">
- +
@@ -293,8 +275,9 @@ Double-click any word to look it up on the right."> +
-

Type a word and hit Go, or double-click a word in your draft. Click any result to insert it at the cursor.

+

Type a word and hit Go, or double-click a word in your draft. Click any result to see its definition.

Current stanza
@@ -321,18 +304,6 @@ Double-click any word to look it up on the right.">
- - -