From bb125932fb3b08afdca75911a55578681d87a67c Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 20 Aug 2026 18:14:47 +0000 Subject: [PATCH] Pin titanic to the top of the live Projects grid The Projects grid is replaced client-side by the GitHub API top 9 sorted by stars; with 9 repos already at 1+ stars, a 0-star repo can never appear. Add a PINNED list in main.js that floats listed repos to the front of the grid regardless of star count, pin titanic, and move its static fallback card first to mirror the live order. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_0134RyPcpFHf91sCa6WSv9MP --- assets/js/main.js | 9 +++++++++ index.html | 10 +++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/assets/js/main.js b/assets/js/main.js index 7bc0f9d..a760911 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -204,6 +204,9 @@ Text: "#6e7681" }; + /* Repos always shown first in the grid, whatever their star count */ + var PINNED = ["titanic"]; + var grid = document.getElementById("projects-grid"); if (grid) { fetch("https://api.github.com/users/dapiced/repos?per_page=100&sort=updated") @@ -216,6 +219,12 @@ return !r.fork && r.name !== "dapiced" && r.name !== "dapiced.github.io"; }); own.sort(function (a, b) { + var pa = PINNED.indexOf(a.name), pb = PINNED.indexOf(b.name); + if (pa !== -1 || pb !== -1) { + if (pa === -1) return 1; + if (pb === -1) return -1; + return pa - pb; + } var d = b.stargazers_count - a.stargazers_count; return d !== 0 ? d : (a.updated_at < b.updated_at ? 1 : -1); }); diff --git a/index.html b/index.html index b515894..f7c5db4 100644 --- a/index.html +++ b/index.html @@ -86,6 +86,11 @@

About

02 · FEATURED MISSIONS

Projects