Files
teahubxyzandClaude Opus 5.5 f853d7c97a Teahub home-screen icon and link-preview card (#11)
Teahub home-screen icon and link-preview card (#11)

- apple-touch-icon.png: the cup on Teahub green (#2f9e44), opaque 180x180, linked from header.tmpl
- og-card.png: 1200x630 link-preview card (the home page hero), 15 KB
- head_opengraph.tmpl: Gitea 28.0.0's; site pages get the absolute card URL with size and alt,
  and twitter:card summary_large_image
- src/: the HTML the two PNGs are rendered from

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XvDrpBDoAJjW8z1kaa3GAa
2026-10-16 10:31:26 +00:00
..

Teahub's look on Gitea

Gitea reads these from its custom directory, /data/gitea on green-tea's volume (GITEA_CUSTOM). It reads templates when it starts, so a template change needs a restart; files under public/ are served as they are.

  • templates/home.tmpl: the signed-out home page, Teahub = Git + Tea + Time beside the cup.
  • templates/user/dashboard/dashboard.tmpl: Gitea 28's dashboard with the repository list and the contribution heatmap moved into the sidebar.
  • templates/base/head_opengraph.tmpl: Gitea 28's link-preview tags. Pages that aren't a repository or a profile (home, explore, sign-in) point og:image at the absolute URL of og-card.png, give its size, and ask for the large card (twitter:card), so Discord, WhatsApp, iMessage and Slack show it. Repositories, issues and profiles keep Gitea's avatars.
  • templates/custom/header.tmpl, templates/custom/footer.tmpl: load teahub.css and teahub.js, and link the home-screen icon. Bump their ?v= when those files change, because browsers keep assets for hours.
  • public/assets/css/teahub.css: green tea colours for Gitea's light, dark and auto themes, the name beside the navbar's cup, the home page and the sidebar.
  • public/assets/js/teahub.js: the home page's title, "Powered by Teahub", and the dashboard's Domains tab, which asks Tea MCP's GET /domains (Cloudflare Registrar) and shows exact names and suggestions with their prices.
  • public/assets/img/: the 🍵 mark. The SVGs draw the emoji in the reader's own emoji font. The PNGs are Noto Emoji's U+1F375 (googlefonts/noto-emoji, Apache License 2.0). apple-touch-icon.png is the cup on Teahub green (#2f9e44), 180×180 and opaque (iOS turns transparency black), for phone home screens. og-card.png is the 1200×630 link preview, the home page's hero; keep it under 300 KB, because WhatsApp drops bigger preview images.
  • src/: the HTML those two PNGs are rendered from. Not copied to prod. To redo one: headless Chrome at 1× with the page's size (--headless=new --force-device-scale-factor=1 --window-size=1200,630 --virtual-time-budget=6000 --screenshot), then quantise to 256 colours (Pillow quantize(256, MEDIANCUT, dither NONE)) and look at it.

The three Gitea templates here (home, dashboard, head_opengraph) are Gitea 28.0.0's with Teahub's changes. After a Gitea upgrade, compare them with the new release's (gitea embedded extract --destination x 'templates/**') before deploying it.

../sync-custom.sh puts this directory on prod (it needs flyctl signed in to Teahub's Fly organisation).