Skip to content

Commit 56904c8

Browse files
Check in the decoded design mockup source
The redesign was supplied as a zip of PNG exports plus two bundler HTML files. Those bundles are not readable as delivered: the document is embedded inside a script as a JSON-escaped string and every font and image is a base64 resource keyed by UUID, so opening one shows a loader. Decode both bundles and check in the resulting markup and stylesheets, which are the authoritative source for the remaining pages. The PNG exports and the zip stay out of the tree; the README records where they live and how to repeat the decode. Worth naming: the mockups use Nunito, JetBrains Mono and Source Serif 4. The homepage approximates the first two with system stacks, which is why its type is close to the export without matching it. Refs #179
1 parent 7f98039 commit 56904c8

5 files changed

Lines changed: 2901 additions & 0 deletions

File tree

_docs/design/mockups/README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# Design 5a / 6x mockup source
2+
3+
The owner supplied the DataTalks.Club redesign as `DataTalks.Club UI mockups.zip`
4+
(issue #179, re-shared 2026-08-16 with the HTML added). The zip holds seven PNG page
5+
exports plus two bundler-produced HTML files.
6+
7+
The two HTML files are single-file bundles: the real document is embedded inside a
8+
`<script>` as a JSON-escaped string, and every font and image is a separate base64
9+
resource keyed by UUID. Opening them directly shows a loader, not the design.
10+
11+
What is checked in here is the **decoded document** from each bundle, which is the
12+
authoritative source for markup and CSS:
13+
14+
| File | What it is |
15+
| --- | --- |
16+
| `datatalks-homepage.source.html` | Decoded homepage bundle — markup, inline CSS, component scripts |
17+
| `datatalks-homepage.source.css` | The design stylesheet lifted out of that bundle, without the `@font-face` block |
18+
| `datatalks-pages.source.html` | Decoded bundle for the courses, course, events and podcast pages |
19+
| `datatalks-pages.source.css` | The design stylesheet from that bundle |
20+
21+
The PNG exports and the original zip are not checked in; they live under the
22+
gitignored `.tmp/design-mockups/` on the build machine. Re-extract them from the
23+
issue attachment when needed.
24+
25+
## Typefaces
26+
27+
The mockups use real webfonts, which the first homepage implementation approximated
28+
with system stacks:
29+
30+
| Role | Mockup | First implementation |
31+
| --- | --- | --- |
32+
| Sans / headings | **Nunito** | `ui-rounded, "Segoe UI", system-ui, …` |
33+
| Mono | **JetBrains Mono** | `ui-monospace, SFMono-Regular, …` |
34+
| Serif | **Source Serif 4** | not used |
35+
36+
The bundles reference the font binaries by UUID, so the files themselves are not here.
37+
Adopting them means adding the faces to the site's own static assets and deciding how
38+
they are served; until then the system stacks stand in, and the rendered type is close
39+
but not identical to the export.
40+
41+
## Reproducing the decode
42+
43+
The payload is the largest `<script>` body that JSON-decodes to a string beginning with
44+
`<!DOCTYPE`:
45+
46+
```python
47+
import json, re, pathlib
48+
49+
source = pathlib.Path("datatalks-homepage.html").read_text(errors="replace")
50+
best = None
51+
for match in re.finditer(r"<script[^>]*>", source):
52+
body = source[match.end() : source.find("</script>", match.end())].strip()
53+
if not body.startswith('"'):
54+
continue
55+
try:
56+
document = json.loads(body)
57+
except ValueError:
58+
continue
59+
if document.lstrip().startswith("<!DOCTYPE") and (best is None or len(document) > len(best)):
60+
best = document
61+
pathlib.Path("homepage.source.html").write_text(best)
62+
```

_docs/design/mockups/datatalks-homepage.source.css

Lines changed: 63 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)