Skip to content

Commit 4a313cd

Browse files
committed
ci+style: fix broken pages deploy (PyYAML missing) + consolidate 8 heading clamps onto tokens
CI fix (root cause of stale onchainattack.org): The deploy-pages workflow was failing silently since I added specs/ axis support — npm run build chains into npm run site:data, which calls python3 tools/build_specs.py, which imports yaml. The GitHub Actions runner had setup-node but no setup-python and no pip install pyyaml step, so every push since the spec axis introduction ran into ModuleNotFoundError: No module named 'yaml' on the build step and the deploy job never ran. That's why production was last modified Apr 30. - Added actions/setup-python@v5 (3.12) step before npm install - Added 'pip install -r tools/requirements.txt' step - New tools/requirements.txt pinning PyYAML>=6.0 (the only non-stdlib Python dep across tools/) Style — heading clamp consolidation: There were still 8 different clamp() values for headings, each in one place — large/medium/small variants of essentially the same role. Consolidated: clamp(36, 5.5vw, 68) → new --fs-display (hero numbers) clamp(28, 3.5vw, 44) → new --fs-display-sm (large section heading) clamp(28, 3.5vw, 40) → --fs-display-sm (close variant — merged) clamp(32, 4vw, 56) → --fs-h1 (within range) clamp(24, 2.6vw, 36) → --fs-h2 (close to existing h2) clamp(20, 5vw, 28) → --fs-h3 (within fluid h3 range) clamp(15, 1.3vw, 17) → --fs-h3 (close to h3) clamp(14, 1.15vw, 16) → --fs-md (equivalent) Final scale carries 11 sizes covering display → micro mono. Future edge-case hero variants should use --fs-display / --fs-display-sm instead of new clamps.
1 parent 44ba0e4 commit 4a313cd

3 files changed

Lines changed: 20 additions & 9 deletions

File tree

.github/workflows/deploy-pages.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,17 @@ jobs:
2525
with:
2626
node-version: "22"
2727

28-
- name: Install dependencies
28+
- name: Set up Python
29+
uses: actions/setup-python@v5
30+
with:
31+
python-version: "3.12"
32+
33+
- name: Install Node dependencies
2934
run: npm install --no-package-lock
3035

36+
- name: Install Python dependencies
37+
run: pip install -r tools/requirements.txt
38+
3139
- name: Build static site
3240
run: npm run build
3341

src/styles.css

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@
5353
--surface-3: rgba(255, 255, 255, 0.04);
5454

5555
/* typography scale */
56+
--fs-display: clamp(36px, 5.5vw, 68px);
57+
--fs-display-sm: clamp(28px, 3.5vw, 44px);
5658
--fs-h1: clamp(32px, 4vw, 48px);
5759
--fs-h2: clamp(22px, 2.4vw, 30px);
5860
--fs-h3: clamp(15px, 1.6vw, 19px);
@@ -789,7 +791,7 @@ line-height: 1.3;
789791
}
790792

791793
.hero-copy h1 {
792-
font-size: clamp(36px, 5.5vw, 68px);
794+
font-size: var(--fs-display);
793795
font-weight: 600;
794796
letter-spacing: -0.04em;
795797
line-height: 1.02;
@@ -804,7 +806,7 @@ line-height: 1.3;
804806
.signal-panel p,
805807
.coverage-panel p {
806808
color: var(--muted-strong);
807-
font-size: clamp(15px, 1.3vw, 17px);
809+
font-size: var(--fs-h3);
808810
line-height: 1.65;
809811
font-weight: 400;
810812
}
@@ -947,7 +949,7 @@ transition:
947949
.feature-card h2,
948950
.coverage-panel h2,
949951
.section-heading h2 {
950-
font-size: clamp(24px, 2.6vw, 36px);
952+
font-size: var(--fs-h2);
951953
font-weight: 600;
952954
letter-spacing: -0.03em;
953955
line-height: 1.1;
@@ -2571,7 +2573,7 @@ margin-bottom: 10px;
25712573

25722574
.document-hero h1 {
25732575
color: var(--ink-strong);
2574-
font-size: clamp(28px, 3.5vw, 44px);
2576+
font-size: var(--fs-display-sm);
25752577
font-weight: 600;
25762578
letter-spacing: -0.025em;
25772579
line-height: 1.1;
@@ -2683,7 +2685,7 @@ line-height: 1.55;
26832685
}
26842686

26852687
.markdown-shell h1 {
2686-
font-size: clamp(28px, 3.5vw, 40px);
2688+
font-size: var(--fs-display-sm);
26872689
font-weight: 600;
26882690
letter-spacing: -0.025em;
26892691
margin: 0 0 20px;
@@ -3540,7 +3542,7 @@ color: var(--muted);
35403542
}
35413543

35423544
.overview-hero h1 {
3543-
font-size: clamp(32px, 4vw, 56px);
3545+
font-size: var(--fs-h1);
35443546
font-weight: 600;
35453547
letter-spacing: -0.035em;
35463548
line-height: 1.05;
@@ -3550,7 +3552,7 @@ color: var(--muted);
35503552
}
35513553

35523554
.overview-lede {
3553-
font-size: clamp(14px, 1.15vw, 16px);
3555+
font-size: var(--fs-md);
35543556
line-height: 1.55;
35553557
color: var(--muted-strong);
35563558
max-width: 680px;
@@ -4632,7 +4634,7 @@ transition: border-color 0.15s, background 0.15s;
46324634
@media (max-width: 720px) {
46334635
/* Topline section headings — clamp instead of fixed sizes */
46344636
.section-heading h2 {
4635-
font-size: clamp(20px, 5vw, 28px);
4637+
font-size: var(--fs-h3);
46364638
line-height: 1.25;
46374639
}
46384640
.section-heading p {

tools/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
PyYAML>=6.0

0 commit comments

Comments
 (0)