Snook.ca

Life and Times of a Web Developer

I Added Syntax Highlighting Using the 11ty PrismJS Plugin

One thing I like about 11ty is that common tasks for development oriented blogs are easily handled and syntax highlighting is no exception.

I installed the Syntax Highlighting Plugin just like the documentation asked me to. Then, I had to modify my code blocks in my blog post Markdown files to indicate what language they were. Thankfully, I had only written two articles so far that contained code blocks. Nothing so far deviates from what the documentation says.

When I started considering the compile process, however, I had a few considerations.

Only using the CSS when there was code on the page

The first thing to note is that I inline my CSS. My thinking is that most users visiting my site aren’t likely to have my CSS file cached—either because they’re on my site for the first time or because it has been long enough since they visited my site and the file has expired.

Currently, I only have two templates: my universal template and my blog post template. I inline additional CSS in my blog post template that isn’t needed anywhere else on the site. As such, the first thing I did was add the PrismJS theme to my template and see how it looked. No surprise, it looked great.

But what if I have no code on the page? Why am I loading the CSS for every blog post? Easy enough. I added a yaml parameter of hascode: true. And then I check for that parameter in my template.

{% if hascode %}
    <link rel="stylesheet" ... >
{% endif %}

That was nice. But as I mentioned, why am I creating an HTTP request when I usually inline my CSS? No problem. A simple copy/paste and that was done.

Light and Dark Mode

Initially, because the themes are relatively small, I thought about finding a theme that worked for light mode and one for dark mode, wrapping them in prefers-color-scheme. But that still seemed excessive. I found the Duotone Light theme that I thought looked best for my light mode and then realized that much of it still worked in dark mode if I gave it a couple tweaks.

The first tweak was to use the light-dark declaration I had already had on my pre tags when I launched:

background: light-dark(#FFFFFF50, #00000050);

I double-checked and noticed that the selector colour didn’t work in dark mode. So, instead of just trying to find a colour that would work, I decided to use a CSS colour function to solve the problem.

color: light-dark(#2d2006, hsl(from #2d2006 h s calc(l + 80)));

This uses the hsl function to shift the luminosity of the colour from the light mode version.

This is a bit of overkill as I could just take the rendered colour and put that in place of the function but sometimes it’s just fun to try new things.

Pretty

I really like how the code blocks look now, although I don’t love that there’s no indication that the code has overflowed the container if you have scrollbars turned off by default—which most people do these days. Once we get scroll-state container queries supported across all major browsers, maybe I’ll deal with it then.


Have something to say? Tell me about it.

Slashdot

News for nerds, stuff that matters

France Orders ISPs to Block Access to Polymarket

France's regulatory authority for licensed gambling/betting games "announced this week that it ordered ISPs to block access to Polymarket," reports Engadget. Anyone caught advertising an unauthorized betting site "could be fined up to 100,000 euros, or around $114,000." (The article notes this follows a previous regulatory action from November placing a geoblock on financial transactions from French residents on Polymarket's site.)


In May Spain blocked access to Polymarket and Kalshi while it launched a gambling license investigation.

Read more of this story at Slashdot.

How Microsoft's 'Little Workaround' Created a Major Threat to America's Defense Department

This week Slashdot reader joshuark found the story of exactly how in 2025 ProPublica reporter Renee Dudley confirmed Microsoft was running tech support for the U.S. Defense Department through China, America's biggest cybersecurity adversary — and how that investigation ultimately changed U.S. government policy.

The reporter first found an ad offering $18 to $28 to hire Americans as "digital escorts" for China-based tech support, then just searched LinkedIn for people who apparently had answered the ad. They discovered that at the time "Behind the scenes, unseen by the users at the U.S. government, it's not just one person who responds," explains ProPublica's podcast. "It's two people... The China-based engineer is the one who knows how to fix the problem. On their end, they produce a block of code to solve it and send it over to the digital escort in the U.S. The digital escort then just copy-pastes it... All of this so that they can follow the government's rule: that you have to be a U.S. citizen or permanent resident to handle sensitive data."


But amazingly to confirm it, ProPublica's researcher just had to input "Microsoft" and "escort" into the U.S. Patent Office search bar, and actually found patents related to digital escorts — along with names of the current and former Microsoft employees listed as inventors. Had the government signed off on the practice? "I could see what Microsoft actually told the government," the reporter says on the podcast, "And there was no mention of foreign engineers being used, and definitely no mention of China."

ProPublic's story was published on a Tuesday, according to the podcast, and by Friday "Microsoft said it had stopped using China-based engineers to support Defense Department cloud systems." And America's Defense Department "also opened up an investigation, looking into whether any of Microsoft's China-based engineers had compromised the government's national security.

Read more of this story at Slashdot.

Next UK Prime Minister Drops Digital ID Scheme

Reuters reports:


Incoming British prime minister Andy Burnham will scrap the government's troubled plans for a digital ID scheme when he enters office on Monday, a spokesperson for the new Labour Party leader said. Resources devoted to the scheme, deemed a "fiasco" by a cross-party committee of lawmakers, will be redirected to Burnham's priorities, the spokesperson said...

"All the time and resource that was going to be spent on a national ID scheme will go instead to where it's most needed, such as helping with the cost of living," Burnham's spokesperson said.
In November, the Office for Budget Responsibility watchdog estimated the cost of the digital ID scheme at around £1.8 billion ($2.4 billion) between financial years 2026/27 and 2028/29.


Read more of this story at Slashdot.

15119 20260717_093923 Photo of Sydney with modifications, from walls of Beca Bakes, Uralla

iain.davidson100 has added a photo to the pool:

15119 20260717_093923 Photo of Sydney with modifications, from walls of Beca Bakes, Uralla

15118 DSC_0025 Seven King parrots in the chook yard cropped db

iain.davidson100 has added a photo to the pool:

15118 DSC_0025 Seven King parrots in the chook yard cropped db

Found Photograph

Thomas Hawk posted a photo:

Found Photograph

BART

Thomas Hawk posted a photo:

BART

South Dakota Stockgrowers Association

Thomas Hawk posted a photo:

South Dakota Stockgrowers Association

Ritz Carlton New Orleans

Thomas Hawk posted a photo:

Ritz Carlton New Orleans

Jaleo

Thomas Hawk posted a photo:

Jaleo

Regent's Park station, London リージェンツ・パーク駅、ロンドン

Mr Mikage (ミスター御影) posted a photo:

Regent's  Park station, London リージェンツ・パーク駅、ロンドン

Found Slide

Thomas Hawk posted a photo:

Found Slide

looks like a zoo.

Zinderende troostfinale WK: Engeland wint van Frankrijk (6-4)

Engeland heeft de troostfinale van het WK voetbal gewonnen tegen Frankrijk. Tijdens de wervelende wedstrijd met een hoog doelpuntensaldo bleef het spannend tot de laatste minuut.

VK: Voorpagina

Volkskrant.nl biedt het laatste nieuws, opinie en achtergronden

Engelsen en Fransen hebben lol in troostfinale: 6-4 zege voor Engeland

Amerikaanse buitenlandminister Rubio roept Cuba op 700 politieke gevangenen vrij te laten

Rotterdam - FediMeteo (@rotterdam@nl.fedimeteo.com)

Weer voor de stad Rotterdam Deze bot wordt beheerd door het FediMeteo-project. Voor informatie en contact kunt u de pagina https://fedimeteo.com raadplegen.

Weer voor Rotterdam ☁️ - 19-07-2026 01:15 CEST...

Weer voor Rotterdam ☁️ - 19-07-2026 01:15 CEST

In één oogopslag:
• 16.7°C · Bewolkt ☁️ | Min 16.7°C / Max 19.5°C | Kans op neerslag 14%

Verwachting voor vandaag:
• Min 16.7°C, Max 19.5°C (Bewolkt) ☁️, Kans op neerslag 14%, 🧭 1020.6 hPa ↗️ +2.2 hPa/24h, Windsnelheid: 18.4 km/u (5.1 m/s), richting: ↘ 319°

Uurlijkse voorspelling voor de komende 12 uur:

02:00: 17.0°C (Bewolkt) ☁️, Kans op neerslag 24%, 🧭 1018.4 hPa ➡️ 0.0 hPa/1h, Windsnelheid: 15.5 km/u (4.3 m/s), richting: ↓ 338°
03:00: 16.7°C (Licht bewolkt) 🌕, Kans op neerslag 19%, 🧭 1018.2 hPa ➡️ 0.0 hPa/1h, Windsnelheid: 13.3 km/u (3.7 m/s), richting: ↘ 324°
04:00: 16.3°C (Helder) 🌕, Kans op neerslag 16%, 🧭 1018.1 hPa ➡️ 0.0 hPa/1h, Windsnelheid: 11.2 km/u (3.1 m/s), richting: ↘ 306°
05:00: 16.6°C (Helder) 🌕, Kans op neerslag 12%, 🧭 1018.2 hPa ➡️ 0.0 hPa/1h, Windsnelheid: 15.1 km/u (4.2 m/s), richting: ↘ 316°
06:00: 16.0°C (Zonnig) ☀️, Kans op neerslag 8%, 🧭 1018.6 hPa ➡️ 0.0 hPa/1h, Windsnelheid: 14.0 km/u (3.9 m/s), richting: ↘ 325°
07:00: 16.7°C (Bewolkt) ☁️, Kans op neerslag 3%, 🧭 1018.5 hPa ➡️ 0.0 hPa/1h, Windsnelheid: 15.8 km/u (4.4 m/s), richting: ↘ 315°
08:00: 17.3°C (Bewolkt) ☁️, 🧭 1018.7 hPa ➡️ 0.0 hPa/1h, Windsnelheid: 15.1 km/u (4.2 m/s), richting: ↘ 319°
09:00: 17.7°C (Bewolkt) ☁️, 🧭 1019.2 hPa ↗️ +0.5 hPa/1h, Windsnelheid: 16.6 km/u (4.6 m/s), richting: ↘ 324°
10:00: 18.2°C (Gedeeltelijk bewolkt) ⛅, 🧭 1019.7 hPa ↗️ +0.5 hPa/1h, Windsnelheid: 17.6 km/u (4.9 m/s), richting: ↘ 327°
11:00: 19.2°C (Licht bewolkt) 🌤️, 🧭 1020.3 hPa ↗️ +0.6 hPa/1h, Windsnelheid: 19.1 km/u (5.3 m/s), richting: ↘ 337°
12:00: 20.1°C (Gedeeltelijk bewolkt) ⛅, Kans op neerslag 1%, 🧭 1020.8 hPa ↗️ +0.5 hPa/1h, Windsnelheid: 18.7 km/u (5.2 m/s), richting: ↘ 336°
13:00: 20.6°C (Gedeeltelijk bewolkt) ⛅, Kans op neerslag 2%, 🧭 1021.3 hPa ↗️ +0.5 hPa/1h, Windsnelheid: 18.4 km/u (5.1 m/s), richting: ↘ 333°

Voorspelling voor de komende dagen:

maandag 20 juli: Min 16.0°C, Max 21.0°C (Bewolkt) ☁️, Kans op neerslag 5%, 🧭 1024.2 hPa ↗️ +3.6 hPa/24h, Windsnelheid: 19.8 km/u (5.5 m/s), richting: ↘ 327°
dinsdag 21 juli: Min 17.3°C, Max 22.4°C (Bewolkt) ☁️, Kans op neerslag 1%, 🧭 1026.5 hPa ↗️ +2.3 hPa/24h, Windsnelheid: 19.4 km/u (5.4 m/s), richting: ↓ 344°
woensdag 22 juli: Min 15.5°C, Max 21.1°C (Lichte motregen) 🌦️, Neerslag 0.2 mm, Kans op neerslag 1%, 🧭 1022.8 hPa ↘️ -3.7 hPa/24h, Windsnelheid: 14.7 km/u (4.1 m/s), richting: ↓ 343°
donderdag 23 juli: Min 15.8°C, Max 20.6°C (Lichte motregen) 🌦️, Neerslag 1.2 mm, Kans op neerslag 28%, 🧭 1021.5 hPa ↘️ -1.3 hPa/24h, Windsnelheid: 16.9 km/u (4.7 m/s), richting: ↘ 321°
vrijdag 24 juli: Min 14.7°C, Max 19.2°C (Lichte motregen) 🌦️, Neerslag 0.3 mm, Kans op neerslag 3%, 🧭 1016.4 hPa ↘️ -5.1 hPa/24h, Windsnelheid: 13.4 km/u (3.7 m/s), richting: ↓ 340°
zaterdag 25 juli: Min 13.3°C, Max 24.7°C (Bewolkt) ☁️, Kans op neerslag 5%, 🧭 1009.7 hPa ↘️ -6.7 hPa/24h, Windsnelheid: 9.0 km/u (2.5 m/s), richting: ↗ 233°

Details:
• 🌡️ Huidige temperatuur (om 01:15): 16.7°C (Bewolkt)
• 🤚 Gevoelstemperatuur: 14.9°C (-1.8°C)
• 💨 Windsnelheid: 18.0 km/u (5.0 m/s), richting: ↓ 343°
• 🌬️ Windstoten: 34.9 km/h (9.7 m/s)
• 💧 Luchtvochtigheid: 66%
• 🧭 Luchtdruk: 1018.4 hPa ➡️ 0.0 hPa/3h
• 👁️ Zichtbaarheid: 22.0 km
• ☀️ UV-index: 0.0
• 🌅 Zonsopgang: 05:44 · 🌇 Zonsondergang: 21:52

Luchtkwaliteit:
• AQI: 37 🟢 (Goed)
• PM2.5: 4.8 μg/m³
• PM10: 14.0 μg/m³

Gegevens geleverd door Open-Meteo



The Guardian

Latest news, sport, business, comment, analysis and reviews from the Guardian, the world's leading liberal voice

Saka hat-trick seals 6-4 England win over France in epic World Cup third-place playoff

Where to start with this rollercoaster of a match? Thomas Tuchel had promised a reaction but he could not have imagined the manner of the response from England, albeit against a France team firmly on their sunloungers during an incredible first half in which they conceded four times.

Yet with Kylian Mbappé on the hunt for his second successive Golden Boot in Didier Deschamps’ last match in charge of Les Bleus, even that lead courtesy of goals from Declan Rice, Ezri Konsa two from Bukayo Saka almost wasn’t enough. Mbappé began the comeback straight after half-time before adding his second after Bradley Barcola’s strike.

Continue reading...

Fifa to announce record $15bn World Cup revenue, smashing expectations

  • Hospitality and secondary ticket market help fuel rise

  • Gianni Infantino will feel this shores up his position

Fifa will announce record $15bn (£11.2bn) revenues from this summer’s World Cup, significantly exceeding the targets set before the tournament.

Fifa’s member associations were informed of the boost in income by Gianni Infantino on Saturday. Originally the governing body had projected $11bn in earnings. Sources have indicated that hospitality and ticketing, especially through the steeply priced secondary market, account for a significant amount of the increase. Fifa takes 15% from the buyer and another 15% from the seller on the secondary market.

Continue reading...

Hungary’s president agrees to stand down after law change ends his term

Tamás Sulyok signed the constitutional amendment that cited ‘serious loss of confidence’ in him as leader

Hungary’s president, Tamás Sulyok, has agreed to step down after signing a constitutional amendment passed by the ruling Tisza party of the prime minister, Péter Magyar.

The amendment will end Sulyok’s term immediately, citing society’s “serious loss of confidence” in a leader elected in early 2024 by lawmakers from the former prime minister Viktor Orbán’s nationalist Fidesz party.

Continue reading...