Spaces:
Running
Running
Download quanxue-src/src/quanxue/ui/Transcript.tsx from Ethscriptions/mx: direct link, hf CLI and curl.
- Browser
- Download file 1.48 kB
-
https://huggingface.co/spaces/Ethscriptions/mx/resolve/main/quanxue-src/src/quanxue/ui/Transcript.tsx
- Command line
-
hf download hf://spaces/Ethscriptions/mx/quanxue-src/src/quanxue/ui/Transcript.tsx
-
curl -L -o Transcript.tsx https://huggingface.co/spaces/Ethscriptions/mx/resolve/main/quanxue-src/src/quanxue/ui/Transcript.tsx
1.48 kB
| import { TL } from '../timeline' | |
| import { fmtTime } from './store' | |
| export function Transcript({ onSeek }: { onSeek: (t: number) => void }) { | |
| return ( | |
| <div className="grid md:grid-cols-2 gap-x-10 gap-y-8"> | |
| {TL.chapters.map((c, ci) => ( | |
| <div key={c.id} className="flex flex-col gap-3"> | |
| <button onClick={() => onSeek(c.start + 0.01)} className="flex items-baseline gap-3 text-left group"> | |
| <span className="qx-brush text-2xl text-[#b8392b]">{c.no}</span> | |
| <span className="qx-song text-lg text-[#efe6d2] group-hover:text-[#cfa961] tracking-wider">{c.title.replace(/\s/g, '')}</span> | |
| <span className="text-xs text-[#9d927f] tabular-nums">{fmtTime(c.start)}</span> | |
| </button> | |
| <div className="flex flex-col gap-2 border-l border-white/10 pl-4"> | |
| {TL.lines.filter((l) => l.chapter === ci).map((l) => ( | |
| <button key={l.id} onClick={() => onSeek(l.start - 0.3)} className="text-left group"> | |
| {l.kind === 'quote' | |
| ? <span className="qx-kai text-[15px] leading-relaxed text-[#e9d7a8] group-hover:text-white">{l.text}</span> | |
| : <span className="text-sm leading-relaxed text-[#b9ae98] group-hover:text-[#efe6d2]">{l.text}</span>} | |
| <span className="ml-2 text-[10px] text-[#6f6656] tabular-nums">{fmtTime(l.start)}</span> | |
| </button> | |
| ))} | |
| </div> | |
| </div> | |
| ))} | |
| </div> | |
| ) | |
| } | |