From eedcee70cbcf49bfa2d796eac2d37dc1c4bef312 Mon Sep 17 00:00:00 2001 From: Ricardo Date: Wed, 11 Feb 2026 17:58:38 +0100 Subject: [PATCH] fix: stable height GitHub widget and consistent tab sizing - Add min-h-[320px] to prevent layout shift when switching tabs - Show 5 items per tab for consistent content height - Simplify tab buttons to text-only at text-xs for compact layout Co-Authored-By: Claude Opus 4.6 --- _includes/components/widgets/github-repos.njk | 217 +++++++++--------- 1 file changed, 109 insertions(+), 108 deletions(-) diff --git a/_includes/components/widgets/github-repos.njk b/_includes/components/widgets/github-repos.njk index 7f23058..5e53e95 100644 --- a/_includes/components/widgets/github-repos.njk +++ b/_includes/components/widgets/github-repos.njk @@ -12,140 +12,141 @@ - {# Loading state #} -
- Loading... -
+ {# Tab content — fixed height container to prevent layout shift #} +
- {# Commits Tab #} -
-
    - -
-
No recent commits.
-
+ {# Loading state #} +
+ Loading... +
- {# Repos Tab #} -
-
    - -
-
No repositories found.
-
+ {# Commits Tab #} +
+
    + +
+
No recent commits.
+
- {# Featured Tab #} -
-
    - -
-
No featured projects.
-
+ {# Repos Tab #} +
+
    + +
+
No repositories found.
+
+ + {# Featured Tab #} +
+
    + +
+
No featured projects.
+
+ + {# PRs Tab #} +
+
    + +
+
No recent PRs or issues.
+
- {# PRs Tab #} -
-
    - -
-
No recent PRs or issues.
{# Footer link #} @@ -176,7 +177,7 @@ function githubWidget(username) { ]; if (username) { fetches.push( - fetch(`https://api.github.com/users/${username}/repos?sort=updated&per_page=10&type=owner`, { + fetch('https://api.github.com/users/' + username + '/repos?sort=updated&per_page=10&type=owner', { headers: { 'Accept': 'application/vnd.github.v3+json' } }).then(r => r.ok ? r.json() : null).catch(() => null) );