From 6ff40c8317e1aac23a5c4fe0190908d0891b2443 Mon Sep 17 00:00:00 2001 From: Ricardo Date: Sat, 7 Mar 2026 20:13:45 +0100 Subject: [PATCH] perf: address PageSpeed Insights issues (CLS, contrast, touch targets, JS minification) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Reserve sidebar min-height on desktop to prevent CLS from Alpine.js hydration - Defer lite-yt-embed.css with media="print" onload pattern - Add terser JS minification in eleventy.after build hook - Increase touch target sizing for category pills, facepile avatars, nav items - Fix text-surface-400 contrast ratio (3.05:1 → 6.23:1) across 20 instances Confab-Link: http://localhost:8080/sessions/edb1b7b0-da66-4486-bd9c-d1cfa7553b88 --- .../components/funkwhale-stats-content.njk | 4 +-- .../components/sections/featured-posts.njk | 8 ++--- .../components/sections/recent-posts.njk | 8 ++--- _includes/layouts/base.njk | 3 +- changelog.njk | 4 +-- css/critical.css | 2 ++ css/tailwind.css | 8 ++--- eleventy.config.js | 31 +++++++++++++++++++ funkwhale.njk | 2 +- interactions.njk | 4 +-- lib/unfurl-shortcode.js | 2 +- podroll.njk | 2 +- readlater.njk | 2 +- webmention-debug.njk | 4 +-- 14 files changed, 59 insertions(+), 25 deletions(-) diff --git a/_includes/components/funkwhale-stats-content.njk b/_includes/components/funkwhale-stats-content.njk index eea0017..7e89fb7 100644 --- a/_includes/components/funkwhale-stats-content.njk +++ b/_includes/components/funkwhale-stats-content.njk @@ -27,7 +27,7 @@
{% for artist in topArtists | head(5) %}
- {{ loop.index }} + {{ loop.index }} {{ artist.name }} {{ artist.playCount }} plays
@@ -54,7 +54,7 @@ {% endif %}

{{ album.title }}

{{ album.artist }}

-

{{ album.playCount }} plays

+

{{ album.playCount }} plays

{% endfor %} diff --git a/_includes/components/sections/featured-posts.njk b/_includes/components/sections/featured-posts.njk index 5c0e44b..8b45bc0 100644 --- a/_includes/components/sections/featured-posts.njk +++ b/_includes/components/sections/featured-posts.njk @@ -60,7 +60,7 @@ {{ likedUrl | unfurlCard | safe }} - + {{ likedUrl }} {% if post.templateContent %} @@ -93,7 +93,7 @@ {% endif %} {{ bookmarkedUrl | unfurlCard | safe }} - + {{ bookmarkedUrl }} {% if post.templateContent %} @@ -121,7 +121,7 @@ {{ repostedUrl | unfurlCard | safe }} - + {{ repostedUrl }} {% if post.templateContent %} @@ -149,7 +149,7 @@ {{ replyToUrl | unfurlCard | safe }} - + {{ replyToUrl }} {% if post.templateContent %} diff --git a/_includes/components/sections/recent-posts.njk b/_includes/components/sections/recent-posts.njk index a7af710..5e9f2ed 100644 --- a/_includes/components/sections/recent-posts.njk +++ b/_includes/components/sections/recent-posts.njk @@ -57,7 +57,7 @@ {{ likedUrl | unfurlCard | safe }} - + {{ likedUrl }} {% if post.templateContent %} @@ -90,7 +90,7 @@ {% endif %} {{ bookmarkedUrl | unfurlCard | safe }} - + {{ bookmarkedUrl }} {% if post.templateContent %} @@ -118,7 +118,7 @@ {{ repostedUrl | unfurlCard | safe }} - + {{ repostedUrl }} {% if post.templateContent %} @@ -146,7 +146,7 @@ {{ replyToUrl | unfurlCard | safe }} - + {{ replyToUrl }} {% if post.templateContent %} diff --git a/_includes/layouts/base.njk b/_includes/layouts/base.njk index 9a01c24..053c598 100644 --- a/_includes/layouts/base.njk +++ b/_includes/layouts/base.njk @@ -67,7 +67,8 @@ var _pfQueue = []; function initPagefind(sel, opts) { _pfQueue.push([sel, opts]); } - + + {# Alpine.js components — MUST load before Alpine core (Alpine.data() registration via alpine:init) #} diff --git a/changelog.njk b/changelog.njk index 09eb269..cdda470 100644 --- a/changelog.njk +++ b/changelog.njk @@ -67,7 +67,7 @@ withSidebar: false class="text-xs px-2 py-0.5 rounded-full bg-surface-100 dark:bg-surface-800 text-surface-600 dark:text-surface-400 hover:text-accent-600 dark:hover:text-accent-400" x-text="commit.repoName"> - +