feat: rework the repo page to look like GitHub - #107
Merged
Merged
Conversation
- style.css cleanup: drop legacy -moz-box-* and duplicate props, palette tokens on :root + dark override, :focus-visible, prefers-reduced-motion, rgba shadows, 14px base font, 6px radius - fix header padding (the login button was flush against the screen edge after the buttons became <a> in the security pass); bottom border; the login label collapses to just the icon under 680px - unify the repo action buttons into one RepoButton: [icon] label [count pill] [caret]. Caret only on branch + Code; Watch/Fork/Star show a neutral count pill. Bigger/tighter code + triangle glyphs. - sidebar order matches GitHub: About -> description -> link -> tags -> info list -> Languages - surface more repos.get data: archived banner, hide Fork when allow_forking is false, square avatar for organization owners - footer: drop the <p> wrapper, space the icons - add a dev-only /__preview route (tree-shaken from production builds) that renders a static repo snapshot offline; query flags ?archived=1 ?org=1 ?noforking=1 - vite optimizeDeps: octokit -> @octokit/* (leftover from the bundle slim) - regenerate .github/screenshot.png
Deploying petithub with
|
| Latest commit: |
cada144
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://3871f0ca.petithub.pages.dev |
| Branch Preview URL: | https://petithub-ui.petithub.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
UI pass — makes the page read like a real GitHub repo page. Checked against live GitHub (
honojs/hono,vercel/next.js) via WebFetch, not guesswork.Fixes
<a>in the security pass, which dropped the old.header button { margin }rule). Header now has padding + a bottom border; the "Login with GitHub" label collapses to just the icon under 680px.vite.config.tsoptimizeDepsstill referenced the removedoctokitpackage.GitHub-alignment
style.cssrewrite: removed all legacy-moz-box-*and duplicate declarations; palette tokens on bare:rootwith a dark override;:focus-visible;prefers-reduced-motion; rgba shadows; 14px base font + 6px radius (GitHub density).RepoButton:[icon] label [count pill] [caret]. Caret only on branch and Code (the real dropdowns on GitHub); Watch/Fork/Star show a neutral count pill (Counterstyle).code.svg/triangle.svgglyphs redrawn.<p>wrapper, spaced the icons.New, from data already in
repos.getrepos.gethas noarchived_at).allow_forking: false→ Fork button hidden.owner.type) → square avatar instead of a circle.…/blob/<branch>/LICENSEguess (per owner's call;license.html_urlis alwaysnullhere).Tooling
src/routes/__preview.tsx— dev-only route (if (import.meta.env.DEV)+ a side-effect-freepreviewApp()factory so production builds tree-shake it out — verified 0 bytes leak). Renders a static petithub snapshot with no API call, for offline design work / screenshots. Query flags:?archived=1?org=1?noforking=1..github/screenshot.pngregenerated.bun run typecheck+bun run buildpass. Bundle unchanged (484 kB) — CSS is a static asset.Follow-ups noted in
CLAUDE.md: Languages bar with %, README rendering,open_issues_count/is_templatebadges, Code → clone-URL dropdown.