Skip to content

Commit ca460ab

Browse files
hsyl20claude
andcommitted
Docs: Windows tiles for the plinth mark, and fix the UPLC diagram path
The tiles are rendered from the same POV-Ray scene as the favicons, keeping their hard corners since Windows draws them as squares. assets/browserconfig.xml overrides the one the TeXt theme ships, which pointed at the theme's own default tiles and its own TileColor; a browserconfig.xml also takes precedence over the msapplication-* meta tags, so it is what fixes the stale #ffc40d TileColor the theme emits. The UPLC boundary diagram was referenced as a bare absolute path, which drops the baseurl the Pages workflow builds with -- the image 404'd on the deployed site. Now goes through relative_url, as the wordmark on the front page does. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent b4cd8c0 commit ca460ab

7 files changed

Lines changed: 51 additions & 1 deletion

File tree

_logo/make-icons.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
android-chrome-192x192.png 192
1616
android-chrome-512x512.png 512
1717
favicon.ico 16, 32, 48
18+
mstile-70x70.png 70 Windows tiles, square corners
19+
mstile-150x150.png 150
20+
mstile-310x310.png 310
21+
mstile-310x150.png 310x150, the wide tile
1822
<stem>-rounded.png full size, for READMEs and slides
1923
"""
2024

@@ -36,6 +40,16 @@
3640
}
3741
ICO_SIZES = [(16, 16), (32, 32), (48, 48)]
3842

43+
# Windows tiles. These keep their hard corners -- Windows draws them as squares
44+
# on a TileColor background -- so they come off the raw render, not the rounded
45+
# one. Only the sizes assets/browserconfig.xml actually references.
46+
TILE_SQUARES = {
47+
"mstile-70x70.png": 70,
48+
"mstile-150x150.png": 150,
49+
"mstile-310x310.png": 310,
50+
}
51+
TILE_WIDE = ("mstile-310x150.png", 310, 150)
52+
3953

4054
def rounded_mask(size: int) -> Image.Image:
4155
big = size * SUPERSAMPLE
@@ -66,6 +80,22 @@ def main(argv: list[str]) -> int:
6680
tile.resize((size, size), Image.LANCZOS).save(out, optimize=True)
6781
written.append((out.name, size))
6882

83+
# Windows tiles, square and wide. The wide one is the square tile centred on
84+
# a canvas of the tile colour, sampled from the render's own corner so the
85+
# join is invisible.
86+
square = Image.open(src).convert("RGB")
87+
for name, size in TILE_SQUARES.items():
88+
out = src.with_name(prefix + name)
89+
square.resize((size, size), Image.LANCZOS).save(out, optimize=True)
90+
written.append((out.name, size))
91+
92+
name, wide_w, wide_h = TILE_WIDE
93+
canvas = Image.new("RGB", (wide_w, wide_h), square.getpixel((2, 2)))
94+
canvas.paste(square.resize((wide_h, wide_h), Image.LANCZOS), ((wide_w - wide_h) // 2, 0))
95+
out = src.with_name(prefix + name)
96+
canvas.save(out, optimize=True)
97+
written.append((out.name, f"{wide_w}x{wide_h}"))
98+
6999
ico = src.with_name(prefix + "favicon.ico")
70100
tile.save(ico, sizes=ICO_SIZES)
71101
written.append((ico.name, ", ".join(str(w) for w, _ in ICO_SIZES)))

assets/browserconfig.xml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<!-- Windows tile configuration, overriding the one the TeXt theme ships (which
3+
points at the theme's own default tiles and its own TileColor). Tile images
4+
here are rendered from the POV-Ray scene in _logo/.
5+
6+
src paths are resolved relative to this file, i.e. relative to /assets/, so
7+
they are bare filenames and need no baseurl. Note also that when a
8+
browserconfig.xml is present Windows ignores the msapplication-* meta tags,
9+
which is how the theme's stale #ffc40d TileColor gets overridden. -->
10+
<browserconfig>
11+
<msapplication>
12+
<tile>
13+
<square70x70logo src="mstile-70x70.png"/>
14+
<square150x150logo src="mstile-150x150.png"/>
15+
<wide310x150logo src="mstile-310x150.png"/>
16+
<square310x310logo src="mstile-310x310.png"/>
17+
<TileColor>#fc4d50</TileColor>
18+
</tile>
19+
</msapplication>
20+
</browserconfig>

assets/mstile-150x150.png

4.89 KB
Loading

assets/mstile-310x150.png

5.2 KB
Loading

assets/mstile-310x310.png

13.3 KB
Loading

assets/mstile-70x70.png

1.96 KB
Loading

explanation/from-plinth-to-the-chain.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ that it came from Plinth.
1919

2020
## The big picture
2121

22-
![Plinth compiles Haskell source down to UPLC; everything after the UPLC boundary is shared by any UPLC script.](/assets/images/uplc-boundary.svg)
22+
![Plinth compiles Haskell source down to UPLC; everything after the UPLC boundary is shared by any UPLC script.]({{ '/assets/images/uplc-boundary.svg' | relative_url }})
2323

2424
Above the boundary is language-specific. Below the boundary is where
2525
[other languages]({% link explanation/languages.md %}) &mdash; Plutarch, Aiken,

0 commit comments

Comments
 (0)