Everything else in 1.5

Part 7 of 7 of ./blog.sh v1.5

Five posts covered the shape of this release. Here is the rest of it, a paragraph each.

A copy button on code blocks

Issue #44, from somebody running a blog full of terminal how-tos. It is always there rather than on hover: a phone has no hover, and a button only a mouse can find is one half the readers never get. Only on code blocks — a chat is a <dl>, inline code is a bare <code> — so it hangs on the block type, not on the tag. On an http:// install there is no button rather than a dead one, and it copies what the block stores, not what wrapped on screen.

Two things you will see

Every listing by content type has an icon now. The other four kinds of listing got theirs in earlier releases, which left these seven looking unfinished; the quotation mark is filled rather than stroked, because outlined at twenty pixels the pair closed up into something that read as the digits 99. And the page is framed on all four sides: a heavy rule has closed it off top and bottom since 1.3, but the sides stayed open, so on a wide screen the text had a beginning and an end and no shape. Off below 700 pixels, where the column already reaches both edges.

Where one paragraph ended and the next began

A search snippet is a post's text with the paragraphs taken out, so the last words of one and the first of the next meet as one broken sentence. A middle dot stands between them now — not an ellipsis, which already means "cut here" at the end of every snippet, and one mark with two meanings is how a reader learns to trust neither. On the reference archive, 593 of the 1,636 titled posts run past their first paragraph.

The appearance button, in a window that refuses to remember

Safari's private windows — and any profile with site data blocked — throw when localStorage is merely read, not only when written. That threw out of the last line of theme-toggle.js, so the code wiring the button up never ran: no cycling, no symbol, nothing. Both sides are guarded now, and the cycle asks the page which theme it is showing rather than the storage it may not have.

Thirty-four lines of your own configuration

Choosing a palette in ./style.sh deleted them. The last colour key is the last active key in its section, and the commented-out fonts: block underneath holds a line that uncomments to the same indentation as a colour — so the writer claimed it, and everything below it, as part of what it was rewriting. The file came back without its documented block, and the wizard reported success.

The other door to a photograph

./blog.sh add strips the coordinates out of a photograph, exactly as the documentation promises. ./blog.sh edit — the path people use far more — had grown a bare copy of the same work, and did not. Two implementations of one promise is one too many.

01.JPG and 01.jpg

An importer keeps the source URL's extension exactly as it was, case and all, and 01.JPG is an ordinary name in a real archive: Posterous served IMG_2669.JPG, and a decade of cameras wrote nothing else. The allocator compared bytes and handed a new picture 01.jpg believing it free; the copy asks the volume, and on macOS, or any Windows share, 01.JPG answers for 01.jpg. So the copy was skipped, the arrival's bytes were never written anywhere, the post showed the old photograph under both names — and check reported a reassuring "misnamed". Names are folded on every volume now: one that is free on Linux and taken on macOS is a picture that vanishes when somebody moves their site.

Somebody else's stylesheet, inside your post

An imported embed's HTML was rendered with its scripts, style blocks and stylesheet links intact. The site's policy already stopped the scripts — but the feed carries the same HTML and has no policy at all, and the style block was never inert anyway: style-src has to carry unsafe-inline for a post's own colour formatting. Both Instagram embeds in this house's archive carry body > iframe { min-width: auto !important }, reaching out of the embed to every iframe on the page. Nothing hostile; simply not this site's to decide.

Comments