From e40fadec6c73ddb84f554f61f138eca025519edb Mon Sep 17 00:00:00 2001 From: Koen Lageveen Date: Mon, 28 Jul 2025 08:54:59 +0200 Subject: [PATCH 01/24] fix #53 overflow-wrap:anywhere on card titles --- static/style/grid.css | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/static/style/grid.css b/static/style/grid.css index 839d7b8ea..19d6b2203 100644 --- a/static/style/grid.css +++ b/static/style/grid.css @@ -29,25 +29,26 @@ transition: border-color .1s ease-in-out; } - h3 a { - color: var(--foreground); - &:hover { - text-decoration: none; - color: var(--foreground-darker); - } - } - h3 { padding-top: 0; padding-right: 2em; margin-top: 0; margin-bottom: 2px; + overflow-wrap: anywhere; + * { padding-top: 0; margin-top: 0; flex: 1; /* push other content to the end of the card */ } + + a { + color: var(--foreground); + &:hover { + text-decoration: none; + color: var(--foreground-darker); + } + } } dl { From 39bb97b84a8644e7160c788ce780095984ec768b Mon Sep 17 00:00:00 2001 From: Koen Lageveen Date: Mon, 28 Jul 2025 09:07:58 +0200 Subject: [PATCH 02/24] fix #54 make inline code wrap, code blocks scroll --- static/styles.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/static/styles.css b/static/styles.css index 51bfe35bd..ffb781287 100644 --- a/static/styles.css +++ b/static/styles.css @@ -72,10 +72,12 @@ code { border: 1px solid var(--background-darkest); padding: 0 4px; border-radius: 3px; + overflow-wrap: anywhere; } pre { white-space: break-spaces; + overflow-x: auto; background: var(--background-darker); &:not(.fallback) { border: 1px solid var(--background-darkest); @@ -86,6 +88,7 @@ pre { border: revert; padding: revert; border-radius: revert; + overflow-wrap: revert; } } From 7d4c7083509e1d3d6c486805ad512ac568033887 Mon Sep 17 00:00:00 2001 From: Koen Lageveen Date: Mon, 28 Jul 2025 09:46:47 +0200 Subject: [PATCH 03/24] further anti-blink optimization --- _includes/head.njk | 35 +---------------------------------- _includes/scripts.njk | 42 ++++++++++++++++++++++++++++++++++++++++++ static/module/list.js | 2 +- static/styles.css | 1 + 4 files changed, 45 insertions(+), 35 deletions(-) create mode 100644 _includes/scripts.njk diff --git a/_includes/head.njk b/_includes/head.njk index 911d04110..508d2bb18 100644 --- a/_includes/head.njk +++ b/_includes/head.njk @@ -9,40 +9,7 @@ - {# handle color scheme without delay #} - - - {# while initializing search, hide package listings, - and change the h1 to indicate this state #} - + {% include "scripts.njk" %} diff --git a/_includes/scripts.njk b/_includes/scripts.njk new file mode 100644 index 000000000..3d5c92347 --- /dev/null +++ b/_includes/scripts.njk @@ -0,0 +1,42 @@ +{# handle color scheme without delay #} + + +{# while initializing search, hide package listings, + and change the h1 to indicate this state #} + diff --git a/static/module/list.js b/static/module/list.js index 629df24af..03ec50908 100644 --- a/static/module/list.js +++ b/static/module/list.js @@ -126,7 +126,7 @@ export class List { this.renderPage(sortedResults, page); this.getSection().dispatchEvent( - new Event('search-is-done', {bubbles: true}) + new Event('search-is-ready', {bubbles: true}) ); } } diff --git a/static/styles.css b/static/styles.css index ffb781287..934cff757 100644 --- a/static/styles.css +++ b/static/styles.css @@ -17,6 +17,7 @@ html { /* while initializing search, hide package listings */ &.initializing { + h1, section { visibility: hidden; } From c7e509df85b36ad1b27b4bf3bc22a7496afd916f Mon Sep 17 00:00:00 2001 From: Koen Lageveen Date: Mon, 28 Jul 2025 16:25:13 +0200 Subject: [PATCH 04/24] move images from static -> assets --- .eleventy.js | 1 + _includes/footer.njk | 2 +- _includes/head.njk | 4 ++-- {static => assets}/favicon.ico | Bin {static => assets}/favicon.png | Bin {static => assets}/logo.svg | 0 {static => assets}/logo.webp | Bin {static => assets}/og.png | Bin 8 files changed, 4 insertions(+), 3 deletions(-) rename {static => assets}/favicon.ico (100%) rename {static => assets}/favicon.png (100%) rename {static => assets}/logo.svg (100%) rename {static => assets}/logo.webp (100%) rename {static => assets}/og.png (100%) diff --git a/.eleventy.js b/.eleventy.js index b80a39c48..c93caabed 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -70,6 +70,7 @@ function minimalPackage(pkg) { module.exports = function (eleventyConfig) { eleventyConfig.addPassthroughCopy("static"); + eleventyConfig.addPassthroughCopy("assets"); const data = JSON.parse(fs.readFileSync("workspace.json", "utf8")); // eslint-disable-next-line no-unused-vars diff --git a/_includes/footer.njk b/_includes/footer.njk index 9a2e9811d..148b58c68 100644 --- a/_includes/footer.njk +++ b/_includes/footer.njk @@ -1,7 +1,7 @@ {% import "packages/macros.njk" as pack %}