mirror of
https://github.com/luxfi/bridge.git
synced 2026-09-24 00:26:46 +00:00
favicon: serve a real icon file, and wear the outline mark
The app shipped its icon only as a data: URI in the markup, so nothing existed at /favicon.ico. A browser asking for that path on its own fell through the SPA catch-all and got index.html back with a text/html type, which is not an icon by any reading. Put the mark in public/ as favicon.svg and favicon.ico so the embedded file server answers with an image type, and point the tags at them. The tags stay in the static HTML because both the tenant rewrite in frontend.go and bridge.config.ts need the elements to already be there. The mark itself is @luxfi/[email protected] getFaviconSVG, the same hairline triangle every other Lux surface now shows. Co-authored-by: Hanzo Dev <[email protected]>
This commit is contained in:
+10
-7
@@ -4,14 +4,17 @@
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<!--
|
||||
Favicon is the canonical Lux mark from @luxfi/logo (getFaviconSVG):
|
||||
white triangle on a black rounded square. This is hardcoded in
|
||||
index.html because favicons must be present in the static HTML
|
||||
(the bundler can't inject them into <link rel="icon"> at runtime).
|
||||
Logo OTHER than the favicon comes from @luxfi/logo at runtime via
|
||||
bridge.config.ts. Source: ~/work/lux/logo/dist/logos.js#getFaviconSVG.
|
||||
The tab icon is the canonical Lux mark, @luxfi/logo@1.0.11
|
||||
getFaviconSVG, served from public/ as a real file. Both tags are
|
||||
written here rather than injected by the bundler because the
|
||||
elements have to exist in the static HTML: the Go server rewrites
|
||||
the href per tenant, and bridge.config.ts rewrites it again at
|
||||
runtime. The .ico is what a browser fetches on its own when it
|
||||
asks for /favicon.ico without reading the markup.
|
||||
Logo OTHER than the tab icon comes from @luxfi/logo at runtime.
|
||||
-->
|
||||
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml;utf8,<svg viewBox='0 0 64 64' xmlns='http://www.w3.org/2000/svg'><rect width='64' height='64' rx='8' fill='%23000000'/><path d='M32 52 L12 18 L52 18 Z' fill='%23ffffff'/></svg>" />
|
||||
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
||||
<link rel="alternate icon" href="/favicon.ico" />
|
||||
<title>Lux Bridge</title>
|
||||
<meta name="description" content="Cross-chain bridge for the Lux Network." />
|
||||
<!--
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.9 KiB |
@@ -0,0 +1,3 @@
|
||||
<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><!-- @luxfi/[email protected] getFaviconSVG() — the mark as a hairline outline, one device pixel at every size, stroke follows the tab --><style>.w{stroke:#121312}@media(prefers-color-scheme:dark){.w{stroke:#fff}}</style>
|
||||
<path class="w" d="M50 85 L15 25 L85 25 Z" transform="translate(0 -5)" fill="none" stroke-width="1" vector-effect="non-scaling-stroke"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 426 B |
Reference in New Issue
Block a user