diff --git a/booth/app.py b/booth/app.py index 46a776b..c547790 100644 --- a/booth/app.py +++ b/booth/app.py @@ -231,6 +231,11 @@ def human_dur(seconds: float) -> str: return "expired" h, rem = divmod(s, 3600) m, _ = divmod(rem, 60) + # as S5a: past two days the hours roll up ("6d 23h", not "167h 12m"); the + # minutes are noise at that range. Under 48h the hours stay, as before. + if h >= 48: + d, h = divmod(h, 24) + return f"{d}d {h}h" if h else f"{d}d" if h and m: return f"{h}h {m}m" if h: diff --git a/booth/static/embed.js b/booth/static/embed.js index 31e3e66..4c93c2a 100644 --- a/booth/static/embed.js +++ b/booth/static/embed.js @@ -47,6 +47,9 @@ "color:#dce3e5;background:rgba(12,16,20,.86);border:1px solid rgba(255,255,255,.16);", "-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);transition:background .12s,border-color .12s}", ".booth-nav-home:hover{background:rgba(31,35,40,.96);border-color:rgba(255,255,255,.34)}", + /* as S5a: our own focus rings, so a host page's `outline:none` cannot take + them. The chips sit on any host: a white ring inside a dark halo reads on both. */ + ".booth-nav-home:focus-visible,.booth-nav-asks:focus-visible{outline:2px solid #fff;outline-offset:1px;box-shadow:0 0 0 4px #15191d}", /* amber = needs you: the one chip that asks to be clicked */ ".booth-nav-asks{right:7.4rem;font:600 13px/1.25 'IBM Plex Sans',ui-sans-serif,system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;", "color:#15191d;background:#fbc10f;border:1px solid #fbc10f;transition:filter .12s}", @@ -102,6 +105,8 @@ "padding:.7rem 1.1rem;border-radius:8px;border:1px solid var(--bk-accent);", "background:var(--bk-accent);color:var(--bk-on-accent)}", ".bk-ask-go:hover{filter:brightness(1.06)}", + ".bk-ask-go:focus-visible{outline:2px solid var(--bk-accent);outline-offset:2px}", + ".bk-ask-opt:has(input:focus-visible){outline:2px solid var(--bk-accent);outline-offset:1px}", ".bk-ask-was{margin:.15rem 0 .55rem;font-size:.86rem}", ".bk-ask-err{color:var(--bk-err);font-size:.86rem}", /* [hidden] restated at class specificity: a host rule as plain as diff --git a/booth/templates/_ask_inline.html b/booth/templates/_ask_inline.html index c9ef9a3..e51646b 100644 --- a/booth/templates/_ask_inline.html +++ b/booth/templates/_ask_inline.html @@ -25,10 +25,10 @@ {% set skipped = a.answer and not picked %}
{{ q.prompt }}
+{{ q.prompt }}
{% if picked %}recorded: {{ qa.label }}{% if qa.notes %} — {{ qa.notes }}{% endif %}
{% elif skipped %}left blank — pick one any time, or leave it{% if qa and qa.notes %}; note: {{ qa.notes }}{% endif %}
{% endif %} -Answer what you can — blanks are fine, and you can come back.
{% endif %} {% if a.notes_enabled %} + aria-label="{{ a.notes_label }}" placeholder="{{ a.notes_label }} (optional)">{{ a.answer.notes if a.answer else '' }} {% endif %} {# Empty and hidden: where embed.js says which asks a several-at-once submit @@ -74,7 +74,7 @@this question could not be read: {{ a.error }}
{{ a.title }}
{% endif %} + {% if a.title %}{{ a.title }}
{% endif %} {% for q in a.questions %}{{ question(a, q, form_id, name_url) }}{% endfor %} {{ submit(a, form_id, name_url) }} {% endif %} diff --git a/booth/templates/_marks.html b/booth/templates/_marks.html index 272ea1e..ad96f02 100644 --- a/booth/templates/_marks.html +++ b/booth/templates/_marks.html @@ -40,7 +40,7 @@This mark could not be read: {{ a.error }}
@@ -94,7 +94,7 @@ {% set field = 'choice.' ~ q.key if a.multi else 'choice' %} {% set qa = a.answer.answers.get(q.key) if (a.answer and a.multi) else a.answer %} {% endfor %} {% if a.notes_enabled %} - + {% endif %}{{ a.text }}
@@ -209,7 +209,7 @@
all — this is the direction that was running through chat. #}
{% endif %}
diff --git a/booth/templates/_provenance.html b/booth/templates/_provenance.html
index c702093..8c7326a 100644
--- a/booth/templates/_provenance.html
+++ b/booth/templates/_provenance.html
@@ -12,6 +12,6 @@
{% elif m.error %}