Skip to content

Pin titanic to the top of the live Projects grid - #21

Merged
dapiced merged 1 commit into
mainfrom
claude/add-titanic-repo-projects-8mjgzu
Aug 20, 2026
Merged

Pin titanic to the top of the live Projects grid#21
dapiced merged 1 commit into
mainfrom
claude/add-titanic-repo-projects-8mjgzu

Conversation

@dapiced

@dapiced dapiced commented Aug 20, 2026

Copy link
Copy Markdown
Owner

Follow-up to #20: the titanic card never showed on the live site because the Projects grid is replaced client-side by the GitHub API top 9 sorted by stars — and 9 repos already have 1+ stars, so a 0-star repo can never make the cut. The static card only renders when the API call fails.

Changes

  • assets/js/main.js: add a PINNED list of repo names that are floated to the front of the grid regardless of star count, and pin titanic. The rest of the sort (stars desc, then last updated) is unchanged.
  • index.html: move the static fallback card for titanic to the first position so the fallback mirrors the live order.

node --check passes on the modified script.

🤖 Generated with Claude Code

https://claude.ai/code/session_0134RyPcpFHf91sCa6WSv9MP


Generated by Claude Code

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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0134RyPcpFHf91sCa6WSv9MP
@dapiced
dapiced marked this pull request as ready for review August 20, 2026 18:15
Copilot AI lite review requested due to automatic review settings August 20, 2026 18:15
@dapiced
dapiced merged commit a826344 into main Aug 20, 2026
1 check passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR ensures the titanic repository is visible at the top of the Projects grid on the live site by pinning it in the client-side GitHub API–driven sort, and aligning the static fallback ordering to match.

Changes:

  • Add a PINNED repo-name list and update the client-side sort to float pinned repos ahead of star-based ranking.
  • Reorder the static fallback titanic project card to appear first in the HTML grid.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
assets/js/main.js Introduces pinned-repo precedence in the GitHub API sorting so titanic appears in the top 9.
index.html Moves the static fallback titanic card to the first position to mirror the live pinned ordering.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread assets/js/main.js
Comment on lines 228 to 230
var d = b.stargazers_count - a.stargazers_count;
return d !== 0 ? d : (a.updated_at < b.updated_at ? 1 : -1);
});
@dapiced
dapiced deleted the claude/add-titanic-repo-projects-8mjgzu branch August 22, 2026 20:33
dapiced added a commit that referenced this pull request Aug 24, 2026
Pin titanic to the top of the live Projects grid
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants