feat: redesign technique page - meta stats, video filenames, monospace signal chains
This commit is contained in:
parent
0c4162a777
commit
39006ca5b6
3 changed files with 67 additions and 6 deletions
|
|
@ -1243,6 +1243,12 @@ body {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.technique-header__stats {
|
||||||
|
font-size: 0.8125rem;
|
||||||
|
color: var(--color-text-secondary);
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
/* ── Technique prose / sections ───────────────────────────────────────────── */
|
/* ── Technique prose / sections ───────────────────────────────────────────── */
|
||||||
|
|
||||||
.technique-summary {
|
.technique-summary {
|
||||||
|
|
@ -1329,6 +1335,16 @@ body {
|
||||||
font-variant-numeric: tabular-nums;
|
font-variant-numeric: tabular-nums;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.technique-moment__source {
|
||||||
|
font-size: 0.75rem;
|
||||||
|
color: var(--color-text-muted);
|
||||||
|
font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
|
||||||
|
max-width: 20rem;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
.technique-moment__summary {
|
.technique-moment__summary {
|
||||||
font-size: 0.8125rem;
|
font-size: 0.8125rem;
|
||||||
color: var(--color-text-secondary);
|
color: var(--color-text-secondary);
|
||||||
|
|
@ -1361,11 +1377,25 @@ body {
|
||||||
margin-bottom: 0.5rem;
|
margin-bottom: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.technique-chain__steps {
|
.technique-chain__flow {
|
||||||
padding-left: 1.25rem;
|
font-family: "SF Mono", "Fira Code", "Fira Mono", "Roboto Mono", monospace;
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
line-height: 1.6;
|
line-height: 1.8;
|
||||||
color: var(--color-text-primary);
|
color: var(--color-text-primary);
|
||||||
|
background: var(--color-bg-transcript);
|
||||||
|
padding: 0.75rem 1rem;
|
||||||
|
border-radius: 0.375rem;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.technique-chain__arrow {
|
||||||
|
color: var(--color-accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
.technique-chain__step {
|
||||||
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ── Plugins ──────────────────────────────────────────────────────────────── */
|
/* ── Plugins ──────────────────────────────────────────────────────────────── */
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ export interface KeyMomentSummary {
|
||||||
end_time: number;
|
end_time: number;
|
||||||
content_type: string;
|
content_type: string;
|
||||||
plugins: string[] | null;
|
plugins: string[] | null;
|
||||||
|
video_filename: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CreatorInfo {
|
export interface CreatorInfo {
|
||||||
|
|
|
||||||
|
|
@ -138,6 +138,22 @@ export default function TechniquePage() {
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
{/* Meta stats line */}
|
||||||
|
<div className="technique-header__stats">
|
||||||
|
{(() => {
|
||||||
|
const sourceCount = new Set(
|
||||||
|
technique.key_moments
|
||||||
|
.map((km) => km.video_filename)
|
||||||
|
.filter(Boolean),
|
||||||
|
).size;
|
||||||
|
const momentCount = technique.key_moments.length;
|
||||||
|
const updated = new Date(technique.updated_at).toLocaleDateString(
|
||||||
|
"en-US",
|
||||||
|
{ year: "numeric", month: "short", day: "numeric" },
|
||||||
|
);
|
||||||
|
return `Compiled from ${sourceCount} source${sourceCount !== 1 ? "s" : ""} · ${momentCount} key moment${momentCount !== 1 ? "s" : ""} · Last updated ${updated}`;
|
||||||
|
})()}
|
||||||
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
{/* Summary */}
|
{/* Summary */}
|
||||||
|
|
@ -179,6 +195,11 @@ export default function TechniquePage() {
|
||||||
<li key={km.id} className="technique-moment">
|
<li key={km.id} className="technique-moment">
|
||||||
<div className="technique-moment__header">
|
<div className="technique-moment__header">
|
||||||
<span className="technique-moment__title">{km.title}</span>
|
<span className="technique-moment__title">{km.title}</span>
|
||||||
|
{km.video_filename && (
|
||||||
|
<span className="technique-moment__source">
|
||||||
|
{km.video_filename}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
<span className="technique-moment__time">
|
<span className="technique-moment__time">
|
||||||
{formatTime(km.start_time)} – {formatTime(km.end_time)}
|
{formatTime(km.start_time)} – {formatTime(km.end_time)}
|
||||||
</span>
|
</span>
|
||||||
|
|
@ -211,11 +232,20 @@ export default function TechniquePage() {
|
||||||
<div key={i} className="technique-chain">
|
<div key={i} className="technique-chain">
|
||||||
<h3>{chainName}</h3>
|
<h3>{chainName}</h3>
|
||||||
{steps.length > 0 && (
|
{steps.length > 0 && (
|
||||||
<ol className="technique-chain__steps">
|
<div className="technique-chain__flow">
|
||||||
{steps.map((step, j) => (
|
{steps.map((step, j) => (
|
||||||
<li key={j}>{String(step)}</li>
|
<span key={j}>
|
||||||
|
{j > 0 && (
|
||||||
|
<span className="technique-chain__arrow">
|
||||||
|
{" → "}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
<span className="technique-chain__step">
|
||||||
|
{String(step)}
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
))}
|
))}
|
||||||
</ol>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue