From 0aa45dc3eaf9cabf4d18b46875cfa6744b06910b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Niemier?= <~@hauleth.dev> Date: Tue, 11 Nov 2025 17:33:02 +0100 Subject: [PATCH] Include syntax colouring CSS only if there is anything to colour --- flake.lock | 4 ++-- sass/_post.scss | 7 ++++--- static/_headers | 1 - templates/index.html | 4 +++- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/flake.lock b/flake.lock index c591872..b1475f2 100644 --- a/flake.lock +++ b/flake.lock @@ -21,8 +21,8 @@ "nixpkgs": { "locked": { "lastModified": 0, - "narHash": "sha256-cnL5WWn/xkZoyH/03NNUS7QgW5vI7D1i74g48qplCvg=", - "path": "/nix/store/h15y13p2w17dhpiyh8pk42v1k4c38a0h-source", + "narHash": "sha256-yEJmtoFu4cJre1NuU4fb8q57Oux+NTbocnALtJ64aEI=", + "path": "/nix/store/9ja8k3j7nk0xhicz1cvswzl7kjs1rj06-source", "type": "path" }, "original": { diff --git a/sass/_post.scss b/sass/_post.scss index 8f3890a..f402ed7 100644 --- a/sass/_post.scss +++ b/sass/_post.scss @@ -1,9 +1,10 @@ @import "variables"; .post { + position: relative; width: 100%; text-align: justify; - text-wrap: pretty; + text-wrap: stable; hyphens: auto; hyphenate-limit-chars: 10; margin: 20px auto; @@ -175,9 +176,9 @@ .footnote-definition { @media (min-width: #{$tablet-max-width + 1px}) { position: absolute; - left: 105%; + right: calc(-12vw - 3em); - width: 10vw; + width: 12vw; margin-top: -7rem; } diff --git a/static/_headers b/static/_headers index 6d609cf..69c9743 100644 --- a/static/_headers +++ b/static/_headers @@ -3,7 +3,6 @@ X-Frame-Options: DENY X-XSS-Protection: 1; mode=block X-Clacks-Overhead: GNU Terry Pratchet - X-Clacks-Overhead: GNU Joe Armstrong Content-Security-Policy: default-src 'self'; script-src 'self'; connect-src 'self'; img-src 'self'; frame-src 'none'; frame-ancestors 'none'; form-action 'none'; base-uri 'self'; Permissions-Policy: accelerometer=(), ambient-light-sensor=(), autoplay=(), battery=(), camera=(), cross-origin-isolated=(), display-capture=(), document-domain=(), encrypted-media=(), execution-while-not-rendered=(), execution-while-out-of-viewport=(), fullscreen=(), geolocation=(), gyroscope=(), keyboard-map=(), magnetometer=(), microphone=(), midi=(), navigation-override=(), payment=(), picture-in-picture=(), publickey-credentials-get=(), screen-wake-lock=(), sync-xhr=(), usb=(), web-share=(), xr-spatial-tracking=(), clipboard-read=(), clipboard-write=(), gamepad=(), speaker-selection=() Referrer-Policy: strict-origin-when-cross-origin diff --git a/templates/index.html b/templates/index.html index c6261ea..482a792 100644 --- a/templates/index.html +++ b/templates/index.html @@ -49,7 +49,9 @@ {% block css %} - + {% if page.content and page.content is containing("data-lang") -%} + + {% endif %} {% if config.extra.theme_color != "orange" -%} {% set color = "/color/" ~ config.extra.theme_color ~ ".css" -%} -- 2.51.2