SPB Git forge

spb/ai-atlas

Public
41commits 1branches 0releases
4.6 MBsize
maindefault branch
12 days agolast push
HTML 77.2% TypeScript 10.5% Python 9.6% JavaScript 2.5%
826 B · 18 lines tsx
Raw Blame History
1import { ImageResponse } from 'next/og';2import { MARK_DARK, MarkImg } from '@/components/brand/mark';34/**5 * Square PNG app icon (manifest 192 / 512) drawn from the atlas-plate mark — same geometry as `icon.svg` and `apple-icon.tsx`.6 * The plate fills the tile (maskable-safe: the graph sits inside the central 80 %). Raw hex is unavoidable in ImageResponse.7 */8export function renderIcon(px: number): ImageResponse {9  return new ImageResponse(10    (11      <div style={{ width: px, height: px, display: 'flex', alignItems: 'center', justifyContent: 'center', background: MARK_DARK.plate }}>12        <MarkImg px={px} colors={{ ...MARK_DARK, plate: '#12151b' }} radius={px >= 512 ? 5 : 6} />13      </div>14    ),15    { width: px, height: px, headers: { 'cache-control': 'public, max-age=86400, s-maxage=86400' } },16  );17}18