Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 83 additions & 1 deletion site/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<img class="mast-art" src="img/justice.webp" alt="">
<h1>Some votes are more equal than others</h1>
<p class="sub">What if we used the same votes to divide the 435 House seats in three different ways: using each party&#39;s share of the vote, neutral maps drawn by a computer, or the maps the states drew for 2026? Would the outcome change?</p>
<p class="byline"><span>By <a class="author" href="#about">Govert Schoof</a>, <time datetime="2026-10-08">October 8, 2026</time></span><a href="#method">Methodology</a></p>
<p class="byline"><span>By <a class="author" href="#about">Govert Schoof</a>, <time datetime="2026-10-08">October 8, 2026</time></span><a href="#method">Methodology</a><a href="#videos">Videos</a></p>
</div>
</header>
<section class="keyfacts" aria-labelledby="keyfacts-title">
Expand Down Expand Up @@ -262,6 +262,88 @@ <h3 id="byvote-title"></h3>
</div>
</section>

<section class="videos" id="videos" aria-labelledby="videos-title">
<div class="wrap">
<h2 id="videos-title">Videos</h2>
<div class="vcards">
<div class="vcard" id="video-teaser">
<div class="vcard-head">
<h3 id="video-teaser-title">Teaser</h3>
<p class="note"><time datetime="PT57S">0:57</time></p>
</div>
<video controls preload="none" playsinline width="540" height="960" poster="video/1-somevotes-teaser-poster.webp" aria-labelledby="video-teaser-title">
<source src="video/1-somevotes-teaser-720.mp4" type="video/mp4">
</video>
<div class="gbar">
<a class="sharebtn" href="https://github.com/geodienst/Gerry/releases/download/videos-2026-10-27/1-somevotes-teaser-9x16-v6.2.mp4"><svg viewBox="0 0 16 16" aria-hidden="true"><use href="#icon-download"/></svg>Download MP4</a>
</div>
<details class="why">
<summary>Text in the video</summary>
<p class="note">Democrats need 50% for a House majority?</p>
<p class="note">Democrats need 52.4% for a House majority.</p>
<p class="note">Nine states changed their map since the 2024 election.</p>
<p class="note">Compared with neutral maps<br>Democrats +12<br>Republicans +22<br>Net effect: +10 Republican</p>
<p class="note">The votes didn't move. The lines did.</p>
<p class="note">Some votes are more equal than others.</p>
<p class="note">somevotes.org<br>Geodienst<br>University of Groningen</p>
</details>
</div>
<div class="vcard" id="video-house">
<div class="vcard-head">
<h3 id="video-house-title">How House elections work</h3>
<p class="note"><time datetime="PT1M40S">1:40</time></p>
</div>
<video controls preload="none" playsinline width="540" height="960" poster="video/2-somevotes-house-elections-explainer-poster.webp" aria-labelledby="video-house-title">
<source src="video/2-somevotes-house-elections-explainer-720.mp4" type="video/mp4">
</video>
<div class="gbar">
<a class="sharebtn" href="https://github.com/geodienst/Gerry/releases/download/videos-2026-10-27/2-somevotes-house-elections-explainer-9x16-v2.8.mp4"><svg viewBox="0 0 16 16" aria-hidden="true"><use href="#icon-download"/></svg>Download MP4</a>
</div>
<details class="why">
<summary>Text in the video</summary>
<p class="note">November 3. All 435 House seats are up for election.</p>
<p class="note">Seats are divided among the states by population.</p>
<p class="note">Most states are split into districts. One district, one seat.</p>
<p class="note">Win the district, win the seat. Second place gets nothing.</p>
<p class="note">218 seats is a majority.</p>
<p class="note">Every federal law and every budget must pass the House.</p>
<p class="note">A law: fill every pothole. A budget: $12 billion.</p>
<p class="note">The winner decides which bills get a vote and chairs every committee.</p>
<p class="note">Who draws the districts? In most states, the state legislature. After every census. Several states redrew in 2025 and 2026.</p>
<p class="note">Why is this important?</p>
<p class="note">Same voters. Different lines. Different winners.</p>
<p class="note">See what the lines do in your state.<br>somevotes.org</p>
</details>
</div>
<div class="vcard" id="video-rig">
<div class="vcard-head">
<h3 id="video-rig-title">How to rig a map</h3>
<p class="note"><time datetime="PT1M7S">1:07</time></p>
</div>
<video controls preload="none" playsinline width="540" height="960" poster="video/3-somevotes-how-to-rig-a-map-poster.webp" aria-labelledby="video-rig-title">
<source src="video/3-somevotes-how-to-rig-a-map-720.mp4" type="video/mp4">
</video>
<div class="gbar">
<a class="sharebtn" href="https://github.com/geodienst/Gerry/releases/download/videos-2026-10-27/3-somevotes-how-to-rig-a-map-9x16-v2.1.mp4"><svg viewBox="0 0 16 16" aria-hidden="true"><use href="#icon-download"/></svg>Download MP4</a>
</div>
<details class="why">
<summary>Text in the video</summary>
<p class="note">Two ways to rig a map.</p>
<p class="note">Ten of 25 voters are blue. Most live in the city.</p>
<p class="note">Compact districts: blue wins 2 of 5.</p>
<p class="note">Packing. Squeeze them into one district. They win it big, and waste votes.</p>
<p class="note">Cracking. Slice them up. They lose everywhere, by a little.</p>
<p class="note">Tennessee: Nashville and Memphis cut into slices. 37% of the votes. 0 of 9 seats.</p>
<p class="note">Illinois: Republicans packed into three districts. 41% of the votes. 3 of 17 seats.</p>
<p class="note">Both parties do it.</p>
<p class="note">See what the lines do in your state.<br>somevotes.org</p>
</details>
</div>
</div>
<p class="terms">You may reuse the videos, also commercially, under <a href="https://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>. Credit: Govert Schoof, Geodienst, University of Groningen, somevotes.org.</p>
</div>
</section>

<section class="graphics" id="graphics" aria-labelledby="graphics-title">
<div class="wrap">
<h2 id="graphics-title">Graphics to reuse</h2>
Expand Down
Binary file added site/public/video/1-somevotes-teaser-720.mp4
Binary file not shown.
Binary file added site/public/video/1-somevotes-teaser-poster.webp
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions site/src/styles/controls.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ select { font: inherit; font-size: 0.87rem; padding: 0.3rem 0.4rem; background:
.sharebtn { display: inline-flex; align-items: center; gap: 0.45rem; flex: none; font: 500 0.87rem/1 var(--font-body); padding: 0.4rem 0.65rem;
border: 1px solid var(--rule); background: var(--sheet); color: var(--fg); cursor: pointer; }
.sharebtn:hover { border-color: var(--ink); }
a.sharebtn { text-decoration: none; } /* a download link in the look of the buttons */
.sharebtn svg { width: 0.95rem; height: 0.95rem; }
.mapbar, .whead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
/* The Share panel of chapter 01: the image as it will be shared, with the ways to share it under it */
Expand Down
1 change: 1 addition & 0 deletions site/src/styles/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@
@import './outcomes.css';
@import './detail.css';
@import './method.css';
@import './video.css';
13 changes: 7 additions & 6 deletions site/src/styles/page.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
.mast .wrap { display: grid; gap: 0.7rem; }
.mast h1 { margin: 0; font: 700 clamp(1.9rem, 1.2rem + 2vw, 2.9rem)/1.1 var(--font-head); letter-spacing: -0.01em; max-width: 36ch; text-wrap: balance; }
.mast .sub { margin: 0; font-size: 1.0625rem; line-height: 1.5; max-width: 80ch; }
/* The byline as a news story has it: author, date, and a link to the method. */
/* The byline as a news story has it: author, date, and links to the method and the videos. */
/* Justitia at the top right of the masthead: a black line drawing on white, turned into
light lines on the dark green */
.mast .wrap { position: relative; }
Expand All @@ -23,11 +23,12 @@
.about { border-top: 1px solid var(--rule); padding-block: 2rem 2.4rem; }
.about h2 { font: 700 1.25rem/1.2 var(--font-head); margin: 0 0 0.6rem; }
.about p { max-width: 64ch; margin: 0.45rem 0 0; }
/* Graphics to reuse, between the method and About: the two images side by side, each with its caption and buttons */
.graphics { border-top: 1px solid var(--rule); padding-block: 2rem 2.4rem; }
.graphics h2 { font: 700 1.25rem/1.2 var(--font-head); margin: 0 0 0.6rem; }
.graphics .intro, .graphics .terms { max-width: 64ch; margin: 0.45rem 0 0; }
.graphics .terms { margin-top: 1.4rem; font-size: 0.87rem; }
/* Videos and Graphics to reuse, between the method and About, with one heading and intro style (the videos in
video.css); here the two images side by side, each with its caption and buttons */
.videos, .graphics { border-top: 1px solid var(--rule); padding-block: 2rem 2.4rem; }
.videos h2, .graphics h2 { font: 700 1.25rem/1.2 var(--font-head); margin: 0 0 0.6rem; }
.graphics .intro, .videos .terms, .graphics .terms { max-width: 64ch; margin: 0.45rem 0 0; }
.videos .terms, .graphics .terms { margin-top: 1.4rem; font-size: 0.87rem; }
.gcards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: 1.6rem; margin-top: 1.2rem; align-items: start; }
.gcard { margin: 0; display: grid; gap: 0.7rem; min-width: 0; }
.gcard canvas { display: block; width: 100%; height: auto; border: 1px solid var(--rule); }
Expand Down
28 changes: 28 additions & 0 deletions site/src/styles/video.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/* Videos, above Graphics to reuse: the three videos, each with its title and length, the player, its downloads and the
text in the video. A player loads only its poster until the reader presses play (preload="none"). */

/* Each column is as wide as its player, so the title, the buttons and the text line up with it. A player stays within
80% of the screen height, so it fits whole, and at most 24rem wide. On a phone the videos stand one under the other. */
.vcards { display: grid; gap: 2.4rem 1.6rem; margin-top: 1.2rem; align-items: start;
grid-template-columns: minmax(0, min(24rem, 80vh * 9 / 16 + 2px));
grid-template-columns: minmax(0, min(24rem, 80svh * 9 / 16 + 2px)); }
.vcard { display: grid; gap: 0.7rem; min-width: 0; align-content: start; }
.vcard-head { display: grid; gap: 0.15rem; }
.vcard-head h3 { font: 700 1.0625rem/1.25 var(--font-head); }
.vcard-head time { font-variant-numeric: tabular-nums; }
/* a button may wrap rather than run past a narrow column, as with the phone on its side */
.vcard .sharebtn { flex: 0 1 auto; }
/* the border sits outside the 9:16 box (content-box), so the poster fills it exactly */
.vcard video { display: block; aspect-ratio: 9 / 16; height: auto; border: 1px solid var(--rule); background: var(--mid);
width: min(100% - 2px, 80vh * 9 / 16); width: min(100% - 2px, 80svh * 9 / 16); }

/* From 720px the three side by side. Each video spans four rows of the grid (subgrid), so the titles, the players, the
buttons and the text stand level across the three, also when a title or the two teaser buttons wrap. */
@media (min-width: 720px) {
.vcards { row-gap: 0.7rem;
grid-template-columns: repeat(3, minmax(0, min(24rem, 80vh * 9 / 16 + 2px)));
grid-template-columns: repeat(3, minmax(0, min(24rem, 80svh * 9 / 16 + 2px))); }
.vcard { grid-row: span 4; grid-template-rows: subgrid; }
/* a single button keeps its height when the two teaser buttons take two lines */
.vcard .gbar { align-self: start; }
}
8 changes: 5 additions & 3 deletions site/test/page.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The page as files (site design, chapter 7): index.html loads only its own entry module, the modules import each other
// and the two bundled libraries, one module fetches the two data files, no em dashes in visible text, and the built
// page stays under 1.5 MB. Run with: pnpm test
// page stays under 1.5 MB without its videos (video.test.ts). Run with: pnpm test
import { test } from 'node:test';
import assert from 'node:assert/strict';
import { existsSync, readFileSync, readdirSync, statSync } from 'node:fs';
Expand Down Expand Up @@ -105,8 +105,10 @@ test('the built page and everything it loads stay under 1.5 MB', (t) => {
return;
}
// the license texts are linked from the footer, the preview image is for shared links and the touch icon for a
// phone's home screen: none is loaded with the page
const apart = (file: string) => file.startsWith('licenses/') || file === 'img/preview.png' || file === 'apple-touch-icon.png';
// phone's home screen: none is loaded with the page. A video loads only when the reader presses play (video.test.ts),
// so the MP4 files are left out; their posters load with the page and count.
const apart = (file: string) => file.startsWith('licenses/') || file === 'img/preview.png' || file === 'apple-touch-icon.png'
|| (file.startsWith('video/') && file.endsWith('.mp4'));
const files = filesUnder(DIST, DIST).filter((file) => !apart(file));
const bytes = files.reduce((total, file) => total + statSync(join(DIST, file)).size, 0);
assert.ok(bytes < 1_500_000, `${bytes} bytes in dist/`);
Expand Down
Loading
Loading