mirror of
https://github.com/hanzoai/base.git
synced 2026-10-21 03:41:50 +00:00
base.hanzo.ai showed a rounded-square "B" — a placeholder, not Hanzo's logo — in the tab and in the app, which renders it from icon.ts in __root and login. The real marks already exist and are already served per brand at /brands/<brand>/logo.svg. They are carried here rather than linked cross-origin, and they draw in currentColor, so they take the surface's own colour instead of shipping a second palette. ONE map from host to brand, in index.html, resolved before the bundle loads and left on window for the app to read. The alternative was that map plus a copy in the bundle, and two answers to "which brand is this host" is exactly how a page ends up titled Hanzo over somebody else's logo. Title, favicon and in-app mark now come from the same answer and cannot disagree. Checked from the built output across every host the fleet serves: base.hanzo.ai / superbase / recipes.base Hanzo Base + hanzo mark lux.id, base.lux.network Lux Base + lux mark zoolabs.id, base.zoo.ngo Zoo Base + zoo mark localhost Base + generic glyph An unknown host keeps the unbranded glyph, and the patterns anchor to the registrable domain: evil-hanzo.ai.attacker.com and zoolabs.id.attacker.com are handed no mark of ours at all. Co-authored-by: Hanzo Dev <[email protected]>
43 lines
1.8 KiB
HTML
43 lines
1.8 KiB
HTML
<!doctype html>
|
|
<html lang="en" class="dark" style="background:#000;color-scheme:dark">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<link id="favicon" rel="icon" type="image/svg+xml" href="/icon.svg" />
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
<meta name="color-scheme" content="dark" />
|
|
<title>Base</title>
|
|
<!-- The page carries the mark and the name of the host it was served from.
|
|
Base is shared infrastructure: the same binary answers on hanzo.ai,
|
|
lux.network and zoo.ngo, so anything compiled in is right on one of them
|
|
and wrong on the rest.
|
|
|
|
THE BRAND IS RESOLVED HERE, ONCE, and left on window for the app to
|
|
read. The alternative was this map plus a second copy in the bundle, and
|
|
two copies of "which brand is this host" is how a page ends up titled
|
|
Hanzo over somebody else's mark.
|
|
|
|
Inline and ahead of the bundle, because the tab is titled and the icon
|
|
swapped while React is still downloading. -->
|
|
<script>
|
|
(function () {
|
|
var h = location.hostname
|
|
var slug = /(^|\.)(lux\.(network|finance|id))$/.test(h) ? 'lux'
|
|
: /(^|\.)(zoo\.(ngo|network)|zoolabs\.id)$/.test(h) ? 'zoo'
|
|
: /(^|\.)hanzo\.(ai|id)$/.test(h) ? 'hanzo'
|
|
: ''
|
|
// Unknown host keeps the unbranded mark. A lookalike domain must not be
|
|
// handed our logo, so the patterns anchor to the registrable domain.
|
|
window.__brand = slug
|
|
if (!slug) return
|
|
document.title = { lux: 'Lux', zoo: 'Zoo', hanzo: 'Hanzo' }[slug] + ' Base'
|
|
var link = document.getElementById('favicon')
|
|
if (link) link.href = '/brands/' + slug + '/favicon.svg'
|
|
})()
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div id="root"></div>
|
|
<script type="module" src="/src/main.tsx"></script>
|
|
</body>
|
|
</html>
|