diff --git a/modules/prodcom-transcript/client.js b/modules/prodcom-transcript/client.js index f81590d..255f97f 100644 --- a/modules/prodcom-transcript/client.js +++ b/modules/prodcom-transcript/client.js @@ -296,11 +296,17 @@ export default function create({ root, moduleApi }) { const text = document.createElement('span'); text.className = 'text'; + // channel name with its timestamp to the right; the clock button + // only toggles the timestamp's visibility + const chLine = document.createElement('span'); + chLine.className = 'channel-line'; + chLine.append(ch, time); + const body = document.createElement('div'); body.className = 'body'; - body.append(ch, text); + body.append(chLine, text); - el.append(time, avatar, body); + el.append(avatar, body); entryEls.set(id, el); applyFilter(el); entriesEl.appendChild(el); diff --git a/modules/prodcom-transcript/style.css b/modules/prodcom-transcript/style.css index 4b84fad..58e2358 100644 --- a/modules/prodcom-transcript/style.css +++ b/modules/prodcom-transcript/style.css @@ -82,15 +82,24 @@ to { opacity: 1; transform: none; } } +[data-module="prodcom-transcript"] .channel-line { + display: flex; + align-items: baseline; + gap: 8px; + margin-bottom: 4px; + min-width: 0; +} + +/* timestamp sits to the right of the channel name; the clock button only + toggles its visibility */ [data-module="prodcom-transcript"] .pt-entry .time { display: none; color: var(--muted); font-size: 0.72em; font-variant-numeric: tabular-nums; flex: none; - padding-top: 3px; } -[data-module="prodcom-transcript"] .show-times .pt-entry .time { display: block; } +[data-module="prodcom-transcript"] .show-times .pt-entry .time { display: inline; } [data-module="prodcom-transcript"] .pt-entry .avatar { flex: none; @@ -114,7 +123,9 @@ letter-spacing: 0.01em; line-height: 1; white-space: nowrap; - margin-bottom: 4px; + overflow: hidden; + text-overflow: ellipsis; + min-width: 0; } [data-module="prodcom-transcript"] .pt-entry .text { diff --git a/public/index.html b/public/index.html index 71abe71..eab549b 100644 --- a/public/index.html +++ b/public/index.html @@ -19,6 +19,13 @@ + +