Skip to content

feat: rework the repo page to look like GitHub - #107

Merged
cletqui merged 1 commit into
mainfrom
petithub-ui
Sep 2, 2026
Merged

cletqui merged 1 commit into
mainfrom
petithub-ui

Conversation

@cletqui

@cletqui cletqui commented Sep 2, 2026

Copy link
Copy Markdown
Owner

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

  • Header padding — the login button was flush against the screen edge (the buttons became <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.ts optimizeDeps still referenced the removed octokit package.

GitHub-alignment

  • style.css rewrite: removed all legacy -moz-box-* and duplicate declarations; palette tokens on bare :root with a dark override; :focus-visible; prefers-reduced-motion; rgba shadows; 14px base font + 6px radius (GitHub density).
  • Repo action buttons unified into one 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 (Counter style). code.svg / triangle.svg glyphs redrawn.
  • Sidebar order now matches GitHub: About → description → link (homepage) → tags (topics) → info list → Languages.
  • Footer: dropped the <p> wrapper, spaced the icons.

New, from data already in repos.get

  • Archived banner — amber, GitHub's wording (no date; repos.get has no archived_at).
  • allow_forking: false → Fork button hidden.
  • Organization owner (owner.type) → square avatar instead of a circle.
  • License link kept as the …/blob/<branch>/LICENSE guess (per owner's call; license.html_url is always null here).

Tooling

  • src/routes/__preview.tsxdev-only route (if (import.meta.env.DEV) + a side-effect-free previewApp() 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.png regenerated.

bun run typecheck + bun run build pass. Bundle unchanged (484 kB) — CSS is a static asset.

Follow-ups noted in CLAUDE.md: Languages bar with %, README rendering, open_issues_count / is_template badges, Code → clone-URL dropdown.

- 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
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying petithub with  Cloudflare Pages  Cloudflare Pages

Latest commit: cada144
Status: ✅  Deploy successful!
Preview URL: https://3871f0ca.petithub.pages.dev
Branch Preview URL: https://petithub-ui.petithub.pages.dev

View logs

@cletqui
cletqui merged commit eb378e9 into main Sep 2, 2026
5 checks passed
@cletqui
cletqui deleted the petithub-ui branch September 2, 2026 12:14
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.

1 participant