From 06d0c93804403c657752a25b98edd1d34ba88a5e Mon Sep 17 00:00:00 2001 From: Ricardo Date: Wed, 11 Feb 2026 17:42:40 +0100 Subject: [PATCH] feat: replace static GitHub widget with dynamic tabbed widget Uses Alpine.js client-side fetching from /githubapi/api/* for live data. Three tabs: Projects (featured repos), Commits (recent activity), PRs. Follows the blogroll widget pattern for dynamic data loading. Co-Authored-By: Claude Opus 4.6 --- _includes/components/widgets/github-repos.njk | 185 +++++++++++++++--- 1 file changed, 160 insertions(+), 25 deletions(-) diff --git a/_includes/components/widgets/github-repos.njk b/_includes/components/widgets/github-repos.njk index 2907324..687ee6b 100644 --- a/_includes/components/widgets/github-repos.njk +++ b/_includes/components/widgets/github-repos.njk @@ -1,32 +1,167 @@ -{# GitHub Repos Widget #} -{% if githubRepos and githubRepos.length %} -
+{# GitHub Activity Widget - Tabbed Projects/Commits/PRs with live API data #} +

- GitHub Projects + GitHub

-
    - {% for repo in githubRepos | head(5) %} -
  • - - {{ repo.name }} - - {% if repo.description %} -

    {{ repo.description | truncate(80) }}

    - {% endif %} -
    - {% if repo.language %} - {{ repo.language }} - {% endif %} - {{ repo.stargazers_count }} stars -
    -
  • - {% endfor %} -
- - View all repositories + + {# Tab buttons #} +
+ + + +
+ + {# Loading state #} +
+ Loading... +
+ + {# Projects Tab #} +
+
    + +
+
No projects found.
+
+ + {# Commits Tab #} +
+
    + +
+
No recent commits.
+
+ + {# PRs Tab #} +
+
    + +
+
No recent PRs or issues.
+
+ + {# Footer link #} + {% if site.feeds.github %} +
+ View on GitHub + + {% endif %}
-{% endif %} + +