New logo from one master: brand/, tools/brand-assets.py makes every app icon, favicon, header mark and og image; no hand-written SVG left
|
|
@ -2,6 +2,12 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
- New logo: a glossy indigo box with an upward arrow (`brand/master/logo-mark.png`, `brand/README.md`). Every logo
|
||||
file comes from it through `tools/brand-assets.py`: desktop app icons (PNG sizes, `.icns`, a `.ico` with its own
|
||||
image per size, Windows tiles), the site's favicon.ico, maskable web app icons with a manifest, apple-touch-icon,
|
||||
the header and footer marks (PNG next to the text wordmark), the desktop window's mark and `site/og.png`. Below
|
||||
48 px a bold "s" monogram on the same tile. The old hand-written SVG mark and `site/favicon.svg` are gone, and the
|
||||
no-hand-written-SVG guard no longer has a brand exception.
|
||||
- Desktop: the signed release showed only its background colour and never started the sidecar. Cause: Tauri's
|
||||
`freezePrototype` freezes `Object.prototype` before the bundle runs, and d3-color / d3-format (under the visx charts)
|
||||
assign `constructor` / `toString` on plain objects while loading, which throws on a frozen prototype; the bundle
|
||||
|
|
|
|||
|
|
@ -34,7 +34,8 @@ Try the screenshot and video pipeline on the demo game without any store account
|
|||
Google Play marks from simple-icons (vendored with the licences by `bun tools/site-icons.ts` into `site/img/icons/`
|
||||
and `apps/desktop/src/ui/store-marks/`, byte-equal to the packages),
|
||||
diagrams from Mermaid (`docs/diagrams/*.mmd`, rendered by `bun tools/diagrams.ts`), the desktop fixtures' art from
|
||||
`bun tools/fixture-art.ts`. The brand mark and `site/favicon.svg` are brand assets. `tests/no-handmade-svg.test.ts`
|
||||
`bun tools/fixture-art.ts`. The logo files (app icons, favicons, header marks, `site/og.png`) are PNG / ICO / ICNS from
|
||||
`tools/brand-assets.py` (`brand/README.md`). `tests/no-handmade-svg.test.ts`
|
||||
fails on new inline `<svg>` / `<path>` drawing in `apps/desktop/src` and `site/*.html` and on SVG files that are
|
||||
not vendored or rendered. These libraries are desktop
|
||||
dependencies (bundled by Vite) or devDependencies; the CLI package keeps zero runtime dependencies.
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
<p><img src="brand/logo-mark-256.png" width="96" height="96" alt="storebound logo"></p>
|
||||
|
||||
# storebound
|
||||
|
||||
**Website: [storebound.dev](https://storebound.dev) · npm: [storebound](https://www.npmjs.com/package/storebound) · `bunx storebound init`**
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 43 KiB |
BIN
apps/desktop/src-tauri/icons/256x256.png
Normal file
|
After Width: | Height: | Size: 43 KiB |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.6 KiB |
BIN
apps/desktop/src-tauri/icons/64x64.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
apps/desktop/src-tauri/icons/Square107x107Logo.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
apps/desktop/src-tauri/icons/Square142x142Logo.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
apps/desktop/src-tauri/icons/Square150x150Logo.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
apps/desktop/src-tauri/icons/Square284x284Logo.png
Normal file
|
After Width: | Height: | Size: 62 KiB |
BIN
apps/desktop/src-tauri/icons/Square30x30Logo.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
apps/desktop/src-tauri/icons/Square310x310Logo.png
Normal file
|
After Width: | Height: | Size: 73 KiB |
BIN
apps/desktop/src-tauri/icons/Square44x44Logo.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
apps/desktop/src-tauri/icons/Square71x71Logo.png
Normal file
|
After Width: | Height: | Size: 7.7 KiB |
BIN
apps/desktop/src-tauri/icons/Square89x89Logo.png
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
apps/desktop/src-tauri/icons/StoreLogo.png
Normal file
|
After Width: | Height: | Size: 4.4 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 73 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 119 KiB |
|
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024"><defs><linearGradient id="g" x1="0" y1="0" x2="0" y2="1"><stop offset="0" stop-color="#6366f1"/><stop offset="1" stop-color="#4338ca"/></linearGradient></defs><rect x="100" y="100" width="824" height="824" rx="185" fill="url(#g)"/><path d="M512 288v384M336 464 512 288l176 176M256 640v176h512V640" fill="none" stroke="#fff" stroke-width="88" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
|
Before Width: | Height: | Size: 461 B |
|
|
@ -118,7 +118,7 @@ svg { flex: none; }
|
|||
.side { background: var(--bg-sunken); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
|
||||
.side-top { padding: 14px 12px 8px; display: grid; gap: 10px; }
|
||||
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 6px; font-weight: 650; font-size: var(--t-em); letter-spacing: -.01em; }
|
||||
.brand-mark { width: 24px; height: 24px; }
|
||||
.brand-mark { width: 24px; height: 24px; flex: none; }
|
||||
.brand small { margin-left: auto; font: 600 10px/1 var(--mono); color: var(--muted); border: 1px solid var(--line-2); padding: 3px 5px; border-radius: 5px; letter-spacing: .04em; }
|
||||
.search-btn {
|
||||
all: unset; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px 0 10px; border-radius: 8px; cursor: pointer;
|
||||
|
|
|
|||
|
|
@ -1,16 +1,7 @@
|
|||
// The storebound brand mark (an arrow out of a tray, like site/favicon.svg). A brand asset, kept as the owner made it:
|
||||
// the one file in apps/desktop/src where the CI guard (tests/no-handmade-svg.test.ts) allows inline SVG.
|
||||
// The storebound brand mark: a PNG made by tools/brand-assets.py from brand/master/logo-mark.png (bundled by Vite, no
|
||||
// inline SVG). Decorative next to the "storebound" text, which stays real text.
|
||||
import logoMark from './logo-mark.png';
|
||||
|
||||
export function Mark({ className }: { className?: string }) {
|
||||
return (
|
||||
<svg viewBox="0 0 32 32" className={className} aria-hidden="true">
|
||||
<defs>
|
||||
<linearGradient id="sb-mark" x1="0" y1="0" x2="1" y2="1">
|
||||
<stop offset="0" stopColor="#6d67f0" />
|
||||
<stop offset="1" stopColor="#4338ca" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<rect width="32" height="32" rx="8" fill="url(#sb-mark)" />
|
||||
<path d="M16 7.5v11M11 12.5l5-5 5 5M8.5 18v5.5h15V18" fill="none" stroke="#fff" strokeWidth="2.6" strokeLinecap="round" strokeLinejoin="round" />
|
||||
</svg>
|
||||
);
|
||||
return <img src={logoMark} className={className} width={24} height={24} alt="" aria-hidden="true" draggable={false} />;
|
||||
}
|
||||
|
|
|
|||
BIN
apps/desktop/src/ui/logo-mark.png
Normal file
|
After Width: | Height: | Size: 8.5 KiB |
27
brand/README.md
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
# storebound brand
|
||||
|
||||
| File | What |
|
||||
| --- | --- |
|
||||
| `master/logo-mark.png` | The master: 1024 x 1024 PNG, transparent background. A glossy indigo box with an upward arrow and sparkles. |
|
||||
| `logo-mark-256.png` | The mark alone at 256 px (README, teaser video). Made from the master. |
|
||||
|
||||
**Source.** Generated with the image model `gpt-image-2.5-sunburst` and picked by the owner on 2026-10-11. The master
|
||||
is the model's output, copied unchanged (it keeps the model's C2PA content credentials). Nothing is painted into it
|
||||
afterwards: the background tile, the sizes and the small-size monogram are made in code.
|
||||
|
||||
**Every other logo file** (desktop app icons, `.icns` / `.ico`, Windows tiles, favicons, web app icons, the site and
|
||||
desktop header marks, `site/og.png`) comes from `tools/brand-assets.py` (Python with Pillow, a build-time tool):
|
||||
|
||||
```sh
|
||||
python3 tools/brand-assets.py # rewrite every file from the master
|
||||
python3 tools/brand-assets.py --sheet out.png # plus a contact sheet of every size
|
||||
```
|
||||
|
||||
Method: trim to the alpha bounding box, pad about 6 %, square, LANCZOS down, never up. The tile is a rounded square
|
||||
with a navy to indigo gradient from the site's colour tokens. Below 48 px the box and arrow turn to mush, so that tier
|
||||
is a bold "s" set in the system font on the same tile, rendered at the target size. Do not run `tauri icon` (it
|
||||
shrinks one image to every size). There is no hand-written SVG version of the mark
|
||||
(`tests/no-handmade-svg.test.ts`).
|
||||
|
||||
**Licence.** The storebound code is MIT (`LICENSE`). The logo is the project's brand mark: use it to refer to
|
||||
storebound (links, articles, packaging), not as the branding of another product, and do not alter it.
|
||||
BIN
brand/logo-mark-256.png
Normal file
|
After Width: | Height: | Size: 63 KiB |
BIN
brand/master/logo-mark.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
|
|
@ -82,8 +82,8 @@ Types of the protocol: `cli/lib/desktop-protocol.ts`; pure portfolio logic: `cli
|
|||
(`src/ui/illustrations.tsx`) are a Phosphor icon on a token-coloured tile with an optional bold badge icon, no
|
||||
artwork.
|
||||
The fixtures' app icons and screenshot stand-ins are PNGs from `bun tools/fixture-art.ts` (Phosphor "fill" icons
|
||||
on CSS gradients, photographed by Chromium). The brand mark (`src/ui/brand.tsx`, like `site/favicon.svg`) is the one
|
||||
inline SVG left: a brand asset. Bundle cost: about +97 kB minified, +31 kB gzip for visx (d3-scale / d3-shape and
|
||||
on CSS gradients, photographed by Chromium). The brand mark (`src/ui/brand.tsx`) is a PNG
|
||||
(`src/ui/logo-mark.png`, from `tools/brand-assets.py`, see `brand/README.md`): no inline SVG at all. Bundle cost: about +97 kB minified, +31 kB gzip for visx (d3-scale / d3-shape and
|
||||
@visx/text for the axes). The Phosphor icons cost about 168 kB minified / 41 kB gzip more than the lucide set they
|
||||
replaced (each per-icon module carries all six weights; 864 kB / 247 kB gzip for the whole webview script).
|
||||
|
||||
|
|
|
|||
|
|
@ -127,9 +127,7 @@ html, body { margin: 0; padding: 0; background: var(--bg); overflow: hidden; }
|
|||
#submit .fine { margin-top: 34px; font: 600 30px/1.3 var(--sans); color: var(--muted); }
|
||||
#cursor { z-index: 45; width: 64px; height: 64px; opacity: 0; filter: drop-shadow(0 6px 10px rgba(0,0,0,.6)); }
|
||||
|
||||
#brand .mark { width: 200px; height: 200px; border-radius: 48px; background: linear-gradient(180deg, #6366f1, #4338ca); display: grid; place-items: center;
|
||||
box-shadow: 0 30px 100px -20px rgba(79,70,229,.95), inset 0 3px 0 rgba(255,255,255,.25); }
|
||||
#brand .mark svg { width: 120px; height: 120px; }
|
||||
#brand .mark { width: 220px; height: 220px; display: block; filter: drop-shadow(0 30px 60px rgba(79,70,229,.7)); }
|
||||
#brand .word { margin-top: 40px; font: 900 150px/1 var(--sans); letter-spacing: -0.045em; }
|
||||
#brand .tag { margin-top: 30px; font: 600 42px/1.25 var(--sans); color: var(--ink-2); max-width: 860px; }
|
||||
#brand .tag b { color: var(--accent); font-weight: 800; }
|
||||
|
|
@ -157,8 +155,7 @@ html, body { margin: 0; padding: 0; background: var(--bg); overflow: hidden; }
|
|||
.h #quest { top: 330px; }
|
||||
.h #sizes { left: 120px; width: 700px; top: 760px; justify-content: flex-start; }
|
||||
.h #brand .word { font-size: 140px; }
|
||||
.h #brand .mark { width: 170px; height: 170px; border-radius: 42px; }
|
||||
.h #brand .mark svg { width: 102px; height: 102px; }
|
||||
.h #brand .mark { width: 190px; height: 190px; }
|
||||
.h #brand .tag { max-width: 1200px; margin-top: 24px; }
|
||||
.h #brand .url { margin-top: 36px; }
|
||||
.h #brand .inst { margin-top: 32px; }
|
||||
|
|
@ -207,7 +204,7 @@ html, body { margin: 0; padding: 0; background: var(--bg); overflow: hidden; }
|
|||
<svg id="cursor" viewBox="0 0 32 32" aria-hidden="true"><path d="M6 3 L6 25 L11.5 20 L15.5 29 L19.5 27.2 L15.6 18.6 L23 18.2 Z" fill="#fff" stroke="#0b1120" stroke-width="2" stroke-linejoin="round"/></svg>
|
||||
|
||||
<div id="brand">
|
||||
<div class="mark"><svg viewBox="0 0 32 32" aria-hidden="true"><path d="M16 7v12M10.5 12.5 16 7l5.5 5.5M8 18v5.5h16V18" fill="none" stroke="#fff" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg></div>
|
||||
<img class="mark" src="brand/logo-mark-256.png" width="256" height="256" alt="storebound logo">
|
||||
<div class="word">storebound</div>
|
||||
<div class="tag">From zero to <b>“Submit for review”</b><br>on Google Play and the App Store.</div>
|
||||
<div class="url">storebound.dev</div>
|
||||
|
|
|
|||
|
|
@ -48,7 +48,8 @@ function serve(): ReturnType<typeof Bun.serve> {
|
|||
fetch(req) {
|
||||
const p = decodeURIComponent(new URL(req.url).pathname).replace(/^\/+/, '') || 'index.html';
|
||||
if (p.includes('..')) return new Response('no', { status: 400 });
|
||||
const f = Bun.file(join(DIR, p));
|
||||
// the logo comes from the repo's brand/ folder (tools/brand-assets.py), not a copy
|
||||
const f = Bun.file(p.startsWith('brand/') ? join(DIR, '../..', p) : join(DIR, p));
|
||||
return f.size ? new Response(f) : new Response('not found', { status: 404 });
|
||||
},
|
||||
});
|
||||
|
|
|
|||
BIN
site/apple-touch-icon.png
Normal file
|
After Width: | Height: | Size: 26 KiB |
|
|
@ -9,14 +9,16 @@
|
|||
<meta name="color-scheme" content="light dark">
|
||||
<meta name="theme-color" content="#f8fafc" media="(prefers-color-scheme: light)">
|
||||
<meta name="theme-color" content="#0b1120" media="(prefers-color-scheme: dark)">
|
||||
<link rel="icon" href="../favicon.svg" type="image/svg+xml">
|
||||
<link rel="icon" href="../favicon.ico?v=2" sizes="16x16 32x32 48x48">
|
||||
<link rel="manifest" href="../manifest.webmanifest?v=2">
|
||||
<link rel="apple-touch-icon" href="../apple-touch-icon.png?v=2">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:site_name" content="storebound">
|
||||
<meta property="og:url" content="https://storebound.dev/desktop/">
|
||||
<meta property="og:title" content="storebound desktop · download">
|
||||
<meta property="og:description" content="Every app and game on both stores in one window. macOS, Windows, Linux.">
|
||||
<meta property="og:image" content="https://storebound.dev/og.png">
|
||||
<link rel="stylesheet" href="../style.css">
|
||||
<meta property="og:image" content="https://storebound.dev/og.png?v=2">
|
||||
<link rel="stylesheet" href="../style.css?v=a23e9a4">
|
||||
<script>document.documentElement.classList.add('js')</script>
|
||||
<style>
|
||||
/* page-only parts; colours and type come from ../style.css tokens (fallbacks keep the page readable alone) */
|
||||
|
|
@ -51,7 +53,7 @@
|
|||
<header class="top">
|
||||
<div class="wrap top-in">
|
||||
<a class="brand" href="../" aria-label="storebound home">
|
||||
<svg class="mark" viewBox="0 0 32 32" aria-hidden="true"><rect width="32" height="32" rx="8" fill="currentColor"/><path d="M16 7v12M10.5 12.5 16 7l5.5 5.5" fill="none" stroke="var(--mark-ink)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M8 18v5.5h16V18" fill="none" stroke="var(--mark-ink)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
<img class="mark" src="../img/logo-mark.png?v=2" srcset="../img/logo-mark.png?v=2 1x, ../img/logo-mark@2x.png?v=2 2x" width="28" height="28" alt="storebound logo">
|
||||
<span>storebound</span>
|
||||
</a>
|
||||
<nav aria-label="Primary">
|
||||
|
|
@ -110,7 +112,7 @@
|
|||
<div class="wrap foot-in">
|
||||
<div>
|
||||
<a class="brand" href="../" aria-label="storebound home">
|
||||
<svg class="mark" viewBox="0 0 32 32" aria-hidden="true"><rect width="32" height="32" rx="8" fill="currentColor"/><path d="M16 7v12M10.5 12.5 16 7l5.5 5.5" fill="none" stroke="var(--mark-ink)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M8 18v5.5h16V18" fill="none" stroke="var(--mark-ink)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
<img class="mark" src="../img/logo-mark.png?v=2" srcset="../img/logo-mark.png?v=2 1x, ../img/logo-mark@2x.png?v=2 2x" width="28" height="28" alt="storebound logo">
|
||||
<span>storebound</span>
|
||||
</a>
|
||||
<p class="fine">MIT · made by CRTkafa · not affiliated with Google or Apple.<br>App Store is a trademark of Apple Inc.; Google Play is a trademark of Google LLC.</p>
|
||||
|
|
|
|||
BIN
site/favicon.ico
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
|
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect width="32" height="32" rx="8" fill="#4f46e5"/><path d="M16 7v12M10.5 12.5 16 7l5.5 5.5M8 18v5.5h16V18" fill="none" stroke="#fff" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
|
Before Width: | Height: | Size: 267 B |
BIN
site/icon-192.png
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
site/icon-512.png
Normal file
|
After Width: | Height: | Size: 99 KiB |
BIN
site/img/logo-mark.png
Normal file
|
After Width: | Height: | Size: 2 KiB |
BIN
site/img/logo-mark@2x.png
Normal file
|
After Width: | Height: | Size: 5.7 KiB |
|
|
@ -9,21 +9,23 @@
|
|||
<meta name="color-scheme" content="light dark">
|
||||
<meta name="theme-color" content="#f8fafc" media="(prefers-color-scheme: light)">
|
||||
<meta name="theme-color" content="#0b1120" media="(prefers-color-scheme: dark)">
|
||||
<link rel="icon" href="favicon.svg" type="image/svg+xml">
|
||||
<link rel="icon" href="favicon.ico?v=2" sizes="16x16 32x32 48x48">
|
||||
<link rel="manifest" href="manifest.webmanifest?v=2">
|
||||
<link rel="apple-touch-icon" href="apple-touch-icon.png?v=2">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:site_name" content="storebound">
|
||||
<meta property="og:url" content="https://storebound.dev/">
|
||||
<meta property="og:title" content="storebound · take your app or game from zero to Submit for review">
|
||||
<meta property="og:description" content="For mobile apps and games: app records, in-app products and subscriptions, listings in every language, every questionnaire, privacy, icons, screenshots. One config and your AI coding agent. Open source, MIT.">
|
||||
<meta property="og:image" content="https://storebound.dev/og.png">
|
||||
<meta property="og:image" content="https://storebound.dev/og.png?v=2">
|
||||
<meta property="og:image:width" content="1200">
|
||||
<meta property="og:image:height" content="630">
|
||||
<meta property="og:image:alt" content="storebound: take a mobile app or game from zero to Submit for review on Google Play and the App Store">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:title" content="storebound · take your app or game from zero to Submit for review">
|
||||
<meta name="twitter:description" content="For mobile apps and games: app records, in-app products and subscriptions, listings in every language, every questionnaire, privacy, icons, screenshots. One config and your AI coding agent.">
|
||||
<meta name="twitter:image" content="https://storebound.dev/og.png">
|
||||
<link rel="stylesheet" href="style.css?v=f066e1c">
|
||||
<meta name="twitter:image" content="https://storebound.dev/og.png?v=2">
|
||||
<link rel="stylesheet" href="style.css?v=a23e9a4">
|
||||
<script>document.documentElement.classList.add('js')</script>
|
||||
<script src="main.js?v=0ac6422" defer></script>
|
||||
</head>
|
||||
|
|
@ -33,7 +35,7 @@
|
|||
<header class="top">
|
||||
<div class="wrap top-in">
|
||||
<a class="brand" href="#top" aria-label="storebound home">
|
||||
<svg class="mark" viewBox="0 0 32 32" aria-hidden="true"><rect width="32" height="32" rx="8" fill="currentColor"/><path d="M16 7v12M10.5 12.5 16 7l5.5 5.5" fill="none" stroke="var(--mark-ink)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M8 18v5.5h16V18" fill="none" stroke="var(--mark-ink)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
<img class="mark" src="img/logo-mark.png?v=2" srcset="img/logo-mark.png?v=2 1x, img/logo-mark@2x.png?v=2 2x" width="28" height="28" alt="storebound logo">
|
||||
<span>storebound</span>
|
||||
</a>
|
||||
<nav aria-label="Primary">
|
||||
|
|
@ -881,7 +883,7 @@ bunx storebound check <span class="c"># offline: config, copy limits, Data saf
|
|||
<div class="wrap foot-in">
|
||||
<div>
|
||||
<a class="brand" href="#top" aria-label="storebound, back to top">
|
||||
<svg class="mark" viewBox="0 0 32 32" aria-hidden="true"><rect width="32" height="32" rx="8" fill="currentColor"/><path d="M16 7v12M10.5 12.5 16 7l5.5 5.5" fill="none" stroke="var(--mark-ink)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M8 18v5.5h16V18" fill="none" stroke="var(--mark-ink)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>
|
||||
<img class="mark" src="img/logo-mark.png?v=2" srcset="img/logo-mark.png?v=2 1x, img/logo-mark@2x.png?v=2 2x" width="28" height="28" alt="storebound logo">
|
||||
<span>storebound</span>
|
||||
</a>
|
||||
<p class="fine">MIT · made by CRTkafa · not affiliated with Google or Apple.<br>App Store is a trademark of Apple Inc.; Google Play is a trademark of Google LLC.</p>
|
||||
|
|
|
|||
12
site/manifest.webmanifest
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"name": "storebound",
|
||||
"short_name": "storebound",
|
||||
"start_url": "/",
|
||||
"display": "browser",
|
||||
"background_color": "#0b1120",
|
||||
"theme_color": "#4338ca",
|
||||
"icons": [
|
||||
{ "src": "/icon-192.png?v=2", "sizes": "192x192", "type": "image/png", "purpose": "maskable" },
|
||||
{ "src": "/icon-512.png?v=2", "sizes": "512x512", "type": "image/png", "purpose": "maskable" }
|
||||
]
|
||||
}
|
||||
BIN
site/og.png
|
Before Width: | Height: | Size: 124 KiB After Width: | Height: | Size: 91 KiB |
|
|
@ -14,7 +14,6 @@
|
|||
--code-ink: #e2e8f0;
|
||||
--code-muted: #64748b;
|
||||
--mark: #0f172a;
|
||||
--mark-ink: #f8fafc;
|
||||
--api-bg: #dcfce7; --api-ink: #166534;
|
||||
--local-bg: #e0f2fe; --local-ink: #075985;
|
||||
--ui-bg: #fef3c7; --ui-ink: #92400e;
|
||||
|
|
@ -45,7 +44,6 @@
|
|||
--accent-soft: #1e1b4b;
|
||||
--code-bg: #060a14;
|
||||
--mark: #f1f5f9;
|
||||
--mark-ink: #0b1120;
|
||||
--api-bg: #14532d; --api-ink: #86efac;
|
||||
--local-bg: #0c4a6e; --local-ink: #7dd3fc;
|
||||
--ui-bg: #451a03; --ui-ink: #fcd34d;
|
||||
|
|
@ -99,7 +97,7 @@ p { margin: 0; }
|
|||
.top { position: sticky; top: 0; z-index: 50; background: var(--bg); box-shadow: 0 6px 16px -12px rgb(0 0 0 / .35); border-bottom: 1px solid var(--line); }
|
||||
.top-in { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
|
||||
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -.01em; font-size: 17px; }
|
||||
.mark { width: 28px; height: 28px; color: var(--accent); flex: none; --mark-ink: var(--accent-ink); }
|
||||
.mark { width: 28px; height: 28px; flex: none; display: block; }
|
||||
.top nav { display: flex; gap: 4px; align-items: center; }
|
||||
.top nav a { color: var(--ink-2); text-decoration: none; font-size: 14.5px; padding: 6px 10px; border-radius: 8px; }
|
||||
.top nav a:hover { background: var(--bg-alt); color: var(--ink); }
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// Owner rule: no hand-written SVG. Charts come from visx, icons from Phosphor, the store marks from simple-icons, the
|
||||
// journey diagram from Mermaid, the fixture art from tools/fixture-art.ts. This guard fails on inline SVG drawing in
|
||||
// the desktop webview and the site, and on any SVG file that is not a known asset.
|
||||
// Allowed: the brand mark (apps/desktop/src/ui/brand.tsx, the site's <svg class="mark"> and site/favicon.svg: brand
|
||||
// assets, owner decision), the <svg> root a visx chart renders into (files that import @visx/*), the vendored icon
|
||||
// The brand mark is a PNG (tools/brand-assets.py from brand/master/logo-mark.png): no inline brand SVG anywhere.
|
||||
// Allowed: the <svg> root a visx chart renders into (files that import @visx/*), the vendored icon
|
||||
// files (site/img/icons: Phosphor and simple-icons; apps/desktop/src/ui/store-marks: simple-icons), each byte-equal to
|
||||
// its package (tools/site-icons.ts), and the Mermaid output (docs/img, site/img journey*.svg).
|
||||
import { describe, expect, test } from 'bun:test';
|
||||
|
|
@ -20,8 +20,6 @@ const read = (f: string) => readFileSync(join(ROOT, f), 'utf8');
|
|||
|
||||
/** SVG drawing elements and inline SVG images. */
|
||||
const SHAPES = /<(path|circle|rect|ellipse|line|polyline|polygon)[\s/>]|data:image\/svg\+xml|<svg[\s>]/g;
|
||||
const BRAND_FILES = ['apps/desktop/src/ui/brand.tsx'];
|
||||
const SITE_MARK = '<svg class="mark" viewBox="0 0 32 32" aria-hidden="true"><rect width="32" height="32" rx="8" fill="currentColor"/><path d="M16 7v12M10.5 12.5 16 7l5.5 5.5" fill="none" stroke="var(--mark-ink)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/><path d="M8 18v5.5h16V18" fill="none" stroke="var(--mark-ink)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/></svg>';
|
||||
|
||||
/** Every hand-drawn hit in a source text: "file:line <tag". */
|
||||
export function svgHits(file: string, text: string, opts: { visxRoot?: boolean } = {}): string[] {
|
||||
|
|
@ -34,10 +32,10 @@ export function svgHits(file: string, text: string, opts: { visxRoot?: boolean }
|
|||
}
|
||||
|
||||
describe('no hand-written SVG', () => {
|
||||
test('desktop webview: charts through visx, icons through Phosphor, no inline SVG outside the brand mark', () => {
|
||||
test('desktop webview: charts through visx, icons through Phosphor, no inline SVG at all (the brand mark is a PNG)', () => {
|
||||
const files = walk('apps/desktop/src', n => /\.(tsx?|css|html)$/.test(n));
|
||||
expect(files.length).toBeGreaterThan(30);
|
||||
const hits = files.filter(f => !BRAND_FILES.includes(f)).flatMap(f => {
|
||||
const hits = files.flatMap(f => {
|
||||
const s = read(f);
|
||||
return svgHits(f, s, { visxRoot: /from '@visx\//.test(s) });
|
||||
});
|
||||
|
|
@ -54,16 +52,16 @@ describe('no hand-written SVG', () => {
|
|||
expect(svgHits('x.tsx', '<svg width={w}><circle r={2} /></svg>', { visxRoot: true })).toHaveLength(1);
|
||||
});
|
||||
|
||||
test('site pages: icons are vendored Phosphor / simple-icons files; only the brand mark is inline', () => {
|
||||
test('site pages: icons are vendored Phosphor / simple-icons files; no inline SVG, the brand mark is a PNG', () => {
|
||||
const pages = walk('site', n => n.endsWith('.html'));
|
||||
expect(pages.length).toBeGreaterThanOrEqual(2);
|
||||
const hits = pages.flatMap(f => svgHits(f, read(f).split(SITE_MARK).join('')));
|
||||
const hits = pages.flatMap(f => svgHits(f, read(f)));
|
||||
expect(hits).toEqual([]);
|
||||
expect(checkSiteIcons()).toEqual([]);
|
||||
for (const f of ['site/style.css', 'site/main.js']) expect(svgHits(f, read(f)), f).toEqual([]);
|
||||
});
|
||||
|
||||
test('SVG files: brand favicon, vendored Phosphor / simple-icons files and Mermaid diagrams only', () => {
|
||||
test('SVG files: vendored Phosphor / simple-icons files and Mermaid diagrams only', () => {
|
||||
const svgs = ['site', 'docs', 'apps/desktop/src'].flatMap(d => walk(d, n => n.endsWith('.svg'))).map(f => relative(ROOT, join(ROOT, f)));
|
||||
const vendored = new Set([
|
||||
...[...SITE_ICONS, ...STORE_MARKS].map(n => relative(ROOT, join(ICON_DIR, `${n}.svg`))),
|
||||
|
|
@ -71,9 +69,17 @@ describe('no hand-written SVG', () => {
|
|||
]);
|
||||
// byte equality with the packages is checked by checkSiteIcons (above); here: no other SVG file sneaks in
|
||||
for (const f of svgs) {
|
||||
if (f === 'site/favicon.svg' || vendored.has(f)) continue;
|
||||
if (vendored.has(f)) continue;
|
||||
expect(f, `${f}: not a known asset`).toMatch(/^(docs|site)\/img\/journey(-tall)?\.svg$/);
|
||||
expect(read(f), `${f}: render it with bun tools/diagrams.ts`).toContain('aria-roledescription="flowchart-v2"');
|
||||
}
|
||||
});
|
||||
|
||||
test('brand: the mark is the PNG set from tools/brand-assets.py, no SVG brand file', () => {
|
||||
const all = ['site', 'apps/desktop/src', 'apps/desktop/src-tauri/icons', 'brand'].flatMap(d => walk(d, n => n.endsWith('.svg')));
|
||||
expect(all.filter(f => !/^(site\/img\/icons|apps\/desktop\/src\/ui\/store-marks)\//.test(f) && !/journey(-tall)?\.svg$/.test(f))).toEqual([]);
|
||||
for (const f of ['brand/master/logo-mark.png', 'site/favicon.ico', 'site/img/logo-mark.png', 'apps/desktop/src/ui/logo-mark.png', 'apps/desktop/src-tauri/icons/icon.icns']) {
|
||||
expect(statSync(join(ROOT, f)).size, f).toBeGreaterThan(0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
|||
289
tools/brand-assets.py
Normal file
|
|
@ -0,0 +1,289 @@
|
|||
#!/usr/bin/env python3
|
||||
"""Every storebound logo file, made in code from one master: brand/master/logo-mark.png (1024 px, transparent).
|
||||
|
||||
python3 tools/brand-assets.py write everything below
|
||||
python3 tools/brand-assets.py --sheet out.png also write a contact sheet of every size (for a look, not committed)
|
||||
|
||||
Needs Pillow (`pip install pillow`); a build-time tool only, the CLI keeps zero runtime dependencies. The text (the
|
||||
small-size monogram, the og image) is set in the system UI font: SF Pro on macOS, else Inter / DejaVu Sans if found.
|
||||
Writes:
|
||||
brand/logo-mark-256.png the mark alone, for the README
|
||||
apps/desktop/src-tauri/icons/ 32/64/128/256 px, 128x128@2x, icon.png (512), icon.icns (iconutil,
|
||||
macOS only), icon.ico (16/24/32/48/64/256), Square*Logo, StoreLogo
|
||||
apps/desktop/src/ui/logo-mark.png the mark alone (72 px), next to the "storebound" text in the app
|
||||
site/favicon.ico (16/32/48), site/icon-192.png, site/icon-512.png (maskable), site/apple-touch-icon.png,
|
||||
site/img/logo-mark.png + logo-mark@2x.png the mark alone, next to the HTML "storebound" wordmark
|
||||
site/og.png 1200x630 share image: the mark plus real-font text
|
||||
Method: trim the master to its alpha bounding box, pad ~6 %, square it, LANCZOS down (never up). The tile behind the
|
||||
mark (rounded square, navy to indigo, the site's colour tokens) is drawn here and never painted into the master. Below
|
||||
48 px the mark turns to mush, so that tier is a separate design: a bold "s" set in the font at the target size on the
|
||||
same tile (rendered directly at 16/24/32, not shrunk from a big image). Do not use `tauri icon` (it shrinks one image to
|
||||
every size)."""
|
||||
from __future__ import annotations
|
||||
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import tempfile
|
||||
|
||||
from PIL import Image, ImageChops, ImageDraw, ImageFont
|
||||
|
||||
ROOT = os.path.normpath(os.path.join(os.path.dirname(os.path.abspath(__file__)), '..'))
|
||||
MASTER = os.path.join(ROOT, 'brand/master/logo-mark.png')
|
||||
TAURI = os.path.join(ROOT, 'apps/desktop/src-tauri/icons')
|
||||
SITE = os.path.join(ROOT, 'site')
|
||||
|
||||
# site/style.css tokens: dark --bg #0b1120, --bg-alt #0f172a; --accent #4f46e5 (light), indigo-700 #4338ca
|
||||
NAVY = (15, 23, 42)
|
||||
INDIGO = (67, 56, 202)
|
||||
WHITE = (248, 250, 252)
|
||||
SMALL = 48 # below this the monogram tier is used
|
||||
|
||||
FONT_CANDIDATES = ['/System/Library/Fonts/SFNS.ttf', '/Library/Fonts/Inter.ttc', '/usr/share/fonts/truetype/inter/Inter.ttc',
|
||||
'/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf']
|
||||
MONO_CANDIDATES = ['/System/Library/Fonts/SFNSMono.ttf', '/System/Library/Fonts/Menlo.ttc',
|
||||
'/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf']
|
||||
|
||||
|
||||
def font(size: float, weight: int = 700, mono: bool = False) -> ImageFont.FreeTypeFont:
|
||||
for path in MONO_CANDIDATES if mono else FONT_CANDIDATES:
|
||||
if not os.path.exists(path):
|
||||
continue
|
||||
f = ImageFont.truetype(path, size)
|
||||
try:
|
||||
axes = f.get_variation_axes()
|
||||
except OSError:
|
||||
return f # not a variable font
|
||||
vals = []
|
||||
for a in axes:
|
||||
name = a['name'].decode() if isinstance(a['name'], bytes) else a['name']
|
||||
if name == 'Weight':
|
||||
vals.append(max(a['minimum'], min(a['maximum'], weight)))
|
||||
elif name == 'Optical Size':
|
||||
vals.append(max(a['minimum'], min(a['maximum'], size)))
|
||||
else:
|
||||
vals.append(a['default'])
|
||||
f.set_variation_by_axes(vals)
|
||||
return f
|
||||
sys.exit('brand-assets: no usable font found (looked for ' + ', '.join(MONO_CANDIDATES if mono else FONT_CANDIDATES) + ')')
|
||||
|
||||
|
||||
# ---------- the mark ----------
|
||||
|
||||
def load_mark() -> Image.Image:
|
||||
"""The master, trimmed to its alpha bounding box, padded ~6 % and squared (transparent)."""
|
||||
im = Image.open(MASTER).convert('RGBA')
|
||||
box = im.getchannel('A').point(lambda a: 255 if a > 8 else 0).getbbox()
|
||||
if not box:
|
||||
sys.exit('brand-assets: the master has no visible pixels')
|
||||
im = im.crop(box)
|
||||
side = round(max(im.size) * 1.12) # ~6 % on each side
|
||||
sq = Image.new('RGBA', (side, side), (0, 0, 0, 0))
|
||||
sq.paste(im, ((side - im.width) // 2, (side - im.height) // 2))
|
||||
return sq
|
||||
|
||||
|
||||
MARK: Image.Image | None = None
|
||||
|
||||
|
||||
def mark(px: int) -> Image.Image:
|
||||
"""The squared mark at px, LANCZOS down; refuses to upscale."""
|
||||
global MARK
|
||||
if MARK is None:
|
||||
MARK = load_mark()
|
||||
if px > MARK.width:
|
||||
sys.exit(f'brand-assets: {px} px would upscale the {MARK.width} px master')
|
||||
return MARK if px == MARK.width else MARK.resize((px, px), Image.LANCZOS)
|
||||
|
||||
|
||||
# ---------- the tile ----------
|
||||
|
||||
def gradient(w: int, h: int, a=NAVY, b=INDIGO) -> Image.Image:
|
||||
"""Diagonal gradient, top left a to bottom right b."""
|
||||
v = Image.linear_gradient('L').resize((w, h), Image.BICUBIC)
|
||||
hz = Image.linear_gradient('L').rotate(90).resize((w, h), Image.BICUBIC)
|
||||
t = ImageChops.add(v, hz, scale=2.0)
|
||||
return Image.composite(Image.new('RGB', (w, h), b), Image.new('RGB', (w, h), a), t).convert('RGBA')
|
||||
|
||||
|
||||
def tile(size: int, inset: float, radius: float, full_bleed: bool = False) -> Image.Image:
|
||||
"""A size px canvas with the rounded gradient square inset by inset*size, drawn 4x and shrunk for clean edges."""
|
||||
if full_bleed:
|
||||
return gradient(size, size)
|
||||
ss = 4
|
||||
S = size * ss
|
||||
x0 = round(inset * S)
|
||||
body = gradient(S - 2 * x0, S - 2 * x0)
|
||||
m = Image.new('L', body.size, 0)
|
||||
ImageDraw.Draw(m).rounded_rectangle((0, 0, body.width - 1, body.height - 1), radius=radius * body.width, fill=255)
|
||||
body.putalpha(m)
|
||||
out = Image.new('RGBA', (S, S), (0, 0, 0, 0))
|
||||
out.paste(body, (x0, x0), body)
|
||||
return out.resize((size, size), Image.LANCZOS)
|
||||
|
||||
|
||||
def on_tile(size: int, inset: float, radius: float, scale: float, full_bleed: bool = False) -> Image.Image:
|
||||
"""The mark centred on the tile; scale is the mark's share of the tile's side."""
|
||||
t = tile(size, inset, radius, full_bleed)
|
||||
inner = size - 2 * round(inset * size) if not full_bleed else size
|
||||
m = mark(max(1, round(inner * scale)))
|
||||
t.alpha_composite(m, ((size - m.width) // 2, (size - m.height) // 2))
|
||||
return t
|
||||
|
||||
|
||||
def monogram(size: int, inset: float = 0.0, radius: float = 0.22) -> Image.Image:
|
||||
"""Small tier: a bold "s" set at the target size on the same tile."""
|
||||
inset = max(inset, 0.5 / size) # keep the corners off the canvas edge
|
||||
t = tile(size, inset, radius)
|
||||
f = font(size * 0.86, 760)
|
||||
d = ImageDraw.Draw(t)
|
||||
l, tp, r, b = d.textbbox((0, 0), 's', font=f)
|
||||
x = (size - (r - l)) / 2 - l
|
||||
y = (size - (b - tp)) / 2 - tp
|
||||
d.text((round(x), round(y)), 's', font=f, fill=WHITE + (255,))
|
||||
return t
|
||||
|
||||
|
||||
# layouts
|
||||
def app_icon(size: int) -> Image.Image:
|
||||
"""macOS / Linux app icon: Apple's grid (824 of 1024, ~22 % corner) with the mark at 86 % of the tile."""
|
||||
return monogram(size, 0.0625) if size < SMALL else on_tile(size, 100 / 1024, 0.2245, 0.86)
|
||||
|
||||
|
||||
def win_icon(size: int) -> Image.Image:
|
||||
"""Windows .ico / Store tiles: nearly full canvas."""
|
||||
return monogram(size) if size < SMALL else on_tile(size, 0.03, 0.2, 0.9)
|
||||
|
||||
|
||||
def save(im: Image.Image, path: str) -> None:
|
||||
os.makedirs(os.path.dirname(path), exist_ok=True)
|
||||
im.save(path, optimize=True)
|
||||
print(f' {os.path.relpath(path, ROOT)} {im.width}x{im.height} {os.path.getsize(path) / 1024:.1f} KB')
|
||||
|
||||
|
||||
def save_ico(path: str, sizes: list[int], make) -> None:
|
||||
imgs = [make(s) for s in sizes]
|
||||
big = imgs[-1]
|
||||
big.save(path, format='ICO', sizes=[(s, s) for s in sizes], append_images=imgs[:-1], bitmap_format='png')
|
||||
print(f' {os.path.relpath(path, ROOT)} {"/".join(map(str, sizes))} {os.path.getsize(path) / 1024:.1f} KB')
|
||||
|
||||
|
||||
def write_icns(path: str) -> None:
|
||||
if not shutil.which('iconutil'):
|
||||
print(' icon.icns skipped: iconutil is macOS only')
|
||||
return
|
||||
with tempfile.TemporaryDirectory() as tmp:
|
||||
d = os.path.join(tmp, 'icon.iconset')
|
||||
os.mkdir(d)
|
||||
for s in (16, 32, 128, 256, 512):
|
||||
app_icon(s).save(os.path.join(d, f'icon_{s}x{s}.png'))
|
||||
app_icon(s * 2).save(os.path.join(d, f'icon_{s}x{s}@2x.png'))
|
||||
subprocess.run(['iconutil', '-c', 'icns', d, '-o', path], check=True)
|
||||
print(f' {os.path.relpath(path, ROOT)} 16-1024 (iconutil) {os.path.getsize(path) / 1024:.1f} KB')
|
||||
|
||||
|
||||
# ---------- og image ----------
|
||||
|
||||
def og() -> Image.Image:
|
||||
W, H = 1200, 630
|
||||
im = Image.new('RGBA', (W, H), (11, 17, 32, 255))
|
||||
def glow(cx, cy, r, color, alpha):
|
||||
g = Image.radial_gradient('L').resize((r * 2, r * 2), Image.BICUBIC).point(lambda v: int((255 - v) * alpha))
|
||||
layer = Image.new('RGBA', (r * 2, r * 2), color + (0,))
|
||||
layer.putalpha(g)
|
||||
im.alpha_composite(layer, (cx - r, cy - r))
|
||||
glow(W + 40, -60, 560, (79, 70, 229), 0.42)
|
||||
glow(-80, H + 80, 420, (190, 24, 93), 0.22)
|
||||
d = ImageDraw.Draw(im)
|
||||
m = mark(60)
|
||||
im.alpha_composite(m, (68, 60))
|
||||
d.text((140, 90), 'storebound', font=font(30, 700), fill=WHITE, anchor='lm')
|
||||
h = font(72, 800)
|
||||
d.text((72, 206), 'Your app or game, from zero', font=h, fill=WHITE, anchor='lm')
|
||||
x = 72
|
||||
for part, col in (('to ', WHITE), ('“Submit for review”', (165, 180, 252)), ('.', WHITE)):
|
||||
d.text((x, 284), part, font=h, fill=col, anchor='lm')
|
||||
x += d.textlength(part, font=h)
|
||||
p = font(22, 400)
|
||||
for i, line in enumerate(('On Google Play and the App Store: records, in-app products and subscriptions, listings in every',
|
||||
'language, every questionnaire, privacy, icons, screenshots. One config and your AI coding agent.')):
|
||||
d.text((72, 381 + i * 33, ), line, font=p, fill=(203, 213, 225), anchor='lm')
|
||||
mono = font(17, 700, mono=True)
|
||||
x = 72
|
||||
for label, bg, fg in (('API', (20, 83, 45), (134, 239, 172)), ('LOCAL', (12, 74, 110), (125, 211, 252)),
|
||||
('UI', (69, 26, 3), (252, 211, 77)), ('YOU', (80, 7, 36), (249, 168, 212))):
|
||||
w = d.textlength(label, font=mono) + 34
|
||||
d.rounded_rectangle((x, 528, x + w, 566), radius=19, fill=bg)
|
||||
d.text((x + w / 2, 547), label, font=mono, fill=fg, anchor='mm')
|
||||
x += w + 15
|
||||
d.text((1128, 547), 'storebound.dev', font=font(24, 600, mono=True), fill=(148, 163, 184), anchor='rm')
|
||||
return im.convert('RGB')
|
||||
|
||||
|
||||
# ---------- contact sheet ----------
|
||||
|
||||
def sheet(path: str, items: list[tuple[str, Image.Image]]) -> None:
|
||||
pad, lab = 16, 18
|
||||
cells = [(n, i if i.width <= 256 else i.resize((256, round(256 * i.height / i.width)), Image.LANCZOS)) for n, i in items]
|
||||
W = 1400
|
||||
rows, row, x = [], [], pad
|
||||
for n, i in cells:
|
||||
if x + i.width + pad > W and row:
|
||||
rows.append(row); row, x = [], pad
|
||||
row.append((n, i)); x += max(i.width, 70) + pad
|
||||
rows.append(row)
|
||||
H = pad + sum(max(i.height for _, i in r) + lab + pad for r in rows)
|
||||
out = Image.new('RGB', (W, H), (128, 128, 128))
|
||||
half = Image.new('RGB', (W // 2, H), (245, 245, 245))
|
||||
out.paste(half, (0, 0))
|
||||
d = ImageDraw.Draw(out)
|
||||
y = pad
|
||||
f = font(12, 500)
|
||||
for r in rows:
|
||||
x = pad
|
||||
for n, i in r:
|
||||
out.paste(i, (x, y), i if i.mode == 'RGBA' else None)
|
||||
d.text((x, y + max(j.height for _, j in r) + 3), n, font=f, fill=(20, 20, 20))
|
||||
x += max(i.width, 70) + pad
|
||||
y += max(i.height for _, i in r) + lab + pad
|
||||
out.save(path)
|
||||
print(f' sheet {path}')
|
||||
|
||||
|
||||
def main() -> None:
|
||||
print('brand-assets:')
|
||||
sheet_items: list[tuple[str, Image.Image]] = []
|
||||
def keep(name, im):
|
||||
sheet_items.append((name, im)); return im
|
||||
|
||||
save(keep('README 256', mark(256)), os.path.join(ROOT, 'brand/logo-mark-256.png'))
|
||||
# desktop app
|
||||
for s in (32, 64, 128, 256):
|
||||
save(keep(f'app {s}', app_icon(s)), os.path.join(TAURI, f'{s}x{s}.png'))
|
||||
save(app_icon(256), os.path.join(TAURI, '128x128@2x.png'))
|
||||
save(app_icon(512), os.path.join(TAURI, 'icon.png'))
|
||||
write_icns(os.path.join(TAURI, 'icon.icns'))
|
||||
for s in (16, 24):
|
||||
keep(f'ico {s}', win_icon(s))
|
||||
keep('ico 48', win_icon(48))
|
||||
save_ico(os.path.join(TAURI, 'icon.ico'), [16, 24, 32, 48, 64, 256], win_icon)
|
||||
for s in (30, 44, 71, 89, 107, 142, 150, 284, 310):
|
||||
save(keep(f'Square{s}', win_icon(s)) if s in (30, 44, 71, 150) else win_icon(s), os.path.join(TAURI, f'Square{s}x{s}Logo.png'))
|
||||
save(win_icon(50), os.path.join(TAURI, 'StoreLogo.png'))
|
||||
save(keep('app UI 72', mark(72)), os.path.join(ROOT, 'apps/desktop/src/ui/logo-mark.png'))
|
||||
# site
|
||||
save_ico(os.path.join(SITE, 'favicon.ico'), [16, 32, 48], win_icon)
|
||||
keep('favicon 16', win_icon(16)); keep('favicon 32', win_icon(32))
|
||||
for s in (192, 512):
|
||||
save(keep(f'maskable {s}', on_tile(s, 0, 0, 0.66, full_bleed=True)), os.path.join(SITE, f'icon-{s}.png'))
|
||||
save(keep('apple-touch 180', on_tile(180, 0, 0, 0.8, full_bleed=True)), os.path.join(SITE, 'apple-touch-icon.png'))
|
||||
save(keep('site 28', mark(28)), os.path.join(SITE, 'img/logo-mark.png'))
|
||||
save(keep('site 56', mark(56)), os.path.join(SITE, 'img/logo-mark@2x.png'))
|
||||
save(keep('og', og()), os.path.join(SITE, 'og.png'))
|
||||
if '--sheet' in sys.argv:
|
||||
sheet(sys.argv[sys.argv.index('--sheet') + 1], sheet_items)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||