Skip to content

Commit e565588

Browse files
committed
Remove hero stats panel
1 parent a3ea9b6 commit e565588

2 files changed

Lines changed: 1 addition & 80 deletions

File tree

scripts/build-site.mjs

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ const tokens = md.parse(readme, {});
4040
const title = extractTitle(tokens) ?? "TPS Format Specification";
4141
const summary = extractSummary(tokens) ?? "Markdown-based teleprompter scripts with timing, pacing, emotion, and styling metadata.";
4242
const sections = extractSections(tokens);
43-
const stats = buildStats(readme, sections);
4443
const articleHtml = md.render(readme);
4544
const builtAt = new Intl.DateTimeFormat("en", {
4645
dateStyle: "long",
@@ -79,13 +78,6 @@ const page = `<!DOCTYPE html>
7978
<a class="button button-secondary" href="https://github.com/managedcode/TPS/blob/main/README.md">View Raw README</a>
8079
</div>
8180
</div>
82-
<aside class="hero-panel">
83-
<p class="panel-label">At a glance</p>
84-
<dl class="stats-grid">
85-
${stats.map(({ label, value }) => `<div><dt>${escapeHtml(label)}</dt><dd>${escapeHtml(value)}</dd></div>`).join("")}
86-
</dl>
87-
<p class="panel-note">Built from <code>README.md</code> and published with GitHub Pages.</p>
88-
</aside>
8981
</header>
9082
9183
<main class="layout">
@@ -187,24 +179,6 @@ function extractSections(tokenList) {
187179
return sectionList;
188180
}
189181

190-
function buildStats(markdown, sectionList) {
191-
const textOnly = markdown
192-
.replace(/```[\s\S]*?```/g, " ")
193-
.replace(/`[^`]+`/g, " ")
194-
.replace(/\[[^\]]+\]\([^)]+\)/g, " ")
195-
.replace(/[#>*_\-\n\r|]/g, " ");
196-
197-
const words = textOnly.match(/\b[\p{L}\p{N}'-]+\b/gu) ?? [];
198-
const segments = sectionList.filter((section) => section.depth === 2).length;
199-
const subSections = sectionList.filter((section) => section.depth === 3).length;
200-
201-
return [
202-
{ label: "Sections", value: String(segments) },
203-
{ label: "Subsections", value: String(subSections) },
204-
{ label: "Words", value: new Intl.NumberFormat("en").format(words.length) }
205-
];
206-
}
207-
208182
function renderSections(sectionList) {
209183
return sectionList
210184
.map((section) => {

website/site.css

Lines changed: 1 addition & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -91,14 +91,10 @@ pre code {
9191
}
9292

9393
.hero {
94-
display: grid;
95-
grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.9fr);
96-
gap: 1.5rem;
97-
align-items: stretch;
94+
display: block;
9895
}
9996

10097
.hero-copy,
101-
.hero-panel,
10298
.toc-card,
10399
.content-card {
104100
backdrop-filter: blur(18px);
@@ -112,11 +108,6 @@ pre code {
112108
padding: 3rem;
113109
}
114110

115-
.hero-panel {
116-
padding: 2rem;
117-
background: linear-gradient(180deg, rgba(13, 23, 39, 0.9), rgba(9, 17, 31, 0.92));
118-
}
119-
120111
.eyebrow {
121112
display: inline-flex;
122113
align-items: center;
@@ -193,41 +184,6 @@ pre code {
193184
text-transform: uppercase;
194185
}
195186

196-
.stats-grid {
197-
display: grid;
198-
grid-template-columns: repeat(3, minmax(0, 1fr));
199-
gap: 0.9rem;
200-
margin: 0;
201-
}
202-
203-
.stats-grid div {
204-
padding: 1rem;
205-
border-radius: 20px;
206-
background: rgba(125, 211, 252, 0.08);
207-
border: 1px solid rgba(125, 211, 252, 0.12);
208-
}
209-
210-
.stats-grid dt {
211-
margin: 0;
212-
color: var(--muted);
213-
font-size: 0.8rem;
214-
text-transform: uppercase;
215-
letter-spacing: 0.08em;
216-
}
217-
218-
.stats-grid dd {
219-
margin: 0.55rem 0 0;
220-
font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
221-
font-size: 1.8rem;
222-
font-weight: 700;
223-
}
224-
225-
.panel-note {
226-
margin: 1.2rem 0 0;
227-
color: var(--muted);
228-
line-height: 1.7;
229-
}
230-
231187
.layout {
232188
display: grid;
233189
grid-template-columns: minmax(250px, 290px) minmax(0, 1fr);
@@ -456,18 +412,13 @@ pre code {
456412
}
457413

458414
@media (max-width: 1040px) {
459-
.hero,
460415
.layout {
461416
grid-template-columns: 1fr;
462417
}
463418

464419
.toc-card {
465420
position: static;
466421
}
467-
468-
.stats-grid {
469-
grid-template-columns: repeat(3, minmax(0, 1fr));
470-
}
471422
}
472423

473424
@media (max-width: 760px) {
@@ -498,10 +449,6 @@ pre code {
498449
font-size: 1rem;
499450
}
500451

501-
.stats-grid {
502-
grid-template-columns: 1fr;
503-
}
504-
505452
.content-meta,
506453
.toc-header {
507454
align-items: flex-start;

0 commit comments

Comments
 (0)