mirror of
https://github.com/luxfi/mpc.git
synced 2026-09-24 00:26:24 +00:00
the binary serves the face it names
pkg/api embedded 56KB of genuine Geist and served it at /fonts/Geist-Variable.woff2, and the landing page's @font-face asked for it by name — so mpc.hanzo.ai painted its only pre-auth surface in a typeface the estate does not use. The bytes are Zen now; checked at the name table, family 'Zen', with the OFL notice the licence requires intact. The dashboard was worse than wrong, it was blank: its layout published --font-geist-sans off the geist package while tailwind.config.ts asked for --font-zen-sans, so font-sans resolved to nothing and every screen fell back to the browser default. The docs layout imported Zen under the name GeistSans, which compiles and lies.
This commit is contained in:
+4
-4
@@ -1,9 +1,9 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1280" height="640" viewBox="0 0 1280 640" role="img" aria-label="mpc">
|
||||
<rect width="1280" height="640" fill="#0A0A0A"/>
|
||||
<svg x="96" y="215" width="210" height="210" viewBox="17 26 66 66"><path d="M50 88 L17.09 31 L82.91 31 Z" fill="#fff"/></svg>
|
||||
<text x="378" y="276" font-family="Inter,system-ui,-apple-system,sans-serif" font-size="78" font-weight="800" letter-spacing="-2" fill="#ffffff">mpc</text>
|
||||
<text x="378" y="322" font-family="Inter,system-ui,sans-serif" font-size="30" fill="#ffffff" opacity=".66">▼ LUX multi-party compute nodes / wallet service using CGGMP21, FROST…</text>
|
||||
<text x="378" y="276" font-family="Zen,system-ui,-apple-system,sans-serif" font-size="78" font-weight="800" letter-spacing="-2" fill="#ffffff">mpc</text>
|
||||
<text x="378" y="322" font-family="Zen,system-ui,sans-serif" font-size="30" fill="#ffffff" opacity=".66">▼ LUX multi-party compute nodes / wallet service using CGGMP21, FROST…</text>
|
||||
<rect x="378" y="338" width="806" height="3" rx="1.5" fill="#ffffff" opacity=".9"/>
|
||||
<text x="378" y="390" font-family="Inter,system-ui,sans-serif" font-size="24" font-weight="600" fill="#ffffff" opacity=".5">github.com/luxfi</text>
|
||||
<text x="1184" y="390" text-anchor="end" font-family="Inter,system-ui,sans-serif" font-size="24" font-weight="600" fill="#ffffff" opacity=".5">lux.network</text>
|
||||
<text x="378" y="390" font-family="Zen,system-ui,sans-serif" font-size="24" font-weight="600" fill="#ffffff" opacity=".5">github.com/luxfi</text>
|
||||
<text x="1184" y="390" text-anchor="end" font-family="Zen,system-ui,sans-serif" font-size="24" font-weight="600" fill="#ffffff" opacity=".5">lux.network</text>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
@@ -1,7 +1,7 @@
|
||||
import type { Metadata } from 'next'
|
||||
import { headers } from 'next/headers'
|
||||
import { GeistSans } from 'geist/font/sans'
|
||||
import { GeistMono } from 'geist/font/mono'
|
||||
import { Zen } from '@hanzo/font/sans'
|
||||
import { ZenMono } from '@hanzo/font/mono'
|
||||
import { resolveWhiteLabel } from '@luxfi/ui/white-label'
|
||||
import { Providers } from './providers'
|
||||
import './globals.css'
|
||||
@@ -23,7 +23,7 @@ export default function RootLayout({
|
||||
children: React.ReactNode
|
||||
}) {
|
||||
return (
|
||||
<html lang="en" className={`dark ${GeistSans.variable} ${GeistMono.variable}`}>
|
||||
<html lang="en" className={`dark ${Zen.variable} ${ZenMono.variable}`}>
|
||||
<body className="font-sans min-h-screen bg-background text-foreground antialiased">
|
||||
<Providers>
|
||||
{children}
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
import "./global.css"
|
||||
import { RootProvider } from "fumadocs-ui/provider/next"
|
||||
import { Zen as GeistSans } from "@hanzo/font/sans"
|
||||
import { ZenMono as GeistMono } from "@hanzo/font/mono"
|
||||
import { Zen } from "@hanzo/font/sans"
|
||||
import { ZenMono } from "@hanzo/font/mono"
|
||||
import type { ReactNode } from "react"
|
||||
|
||||
export const metadata = {
|
||||
@@ -16,7 +16,7 @@ export default function Layout({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<html
|
||||
lang="en"
|
||||
className={`${GeistSans.variable} ${GeistMono.variable}`}
|
||||
className={`${Zen.variable} ${ZenMono.variable}`}
|
||||
suppressHydrationWarning
|
||||
>
|
||||
<body className="min-h-svh bg-background font-sans antialiased">
|
||||
|
||||
Binary file not shown.
Binary file not shown.
+4
-4
@@ -76,13 +76,13 @@ func (b brand) favicon() string {
|
||||
b.Mark + `</svg>`
|
||||
}
|
||||
|
||||
// Geist is the typeface the page asks for, served from this binary. A
|
||||
// Zen is the typeface the page asks for, served from this binary. A
|
||||
// cross-origin stylesheet is refused by the browser (ERR_BLOCKED_BY_ORB) and
|
||||
// leaves every reader on system-ui while every rule asks for Geist, so the file
|
||||
// leaves every reader on system-ui while every rule asks for Zen, so the file
|
||||
// travels with the server that names it.
|
||||
//
|
||||
//go:embed assets/Geist-Variable.woff2
|
||||
var geistWoff2 []byte
|
||||
//go:embed assets/Zen-Variable.woff2
|
||||
var zenWoff2 []byte
|
||||
|
||||
// The same mark as an ICO, byte-for-byte what hanzo.ai serves. A browser asks
|
||||
// for /favicon.ico on its own even when the page names an SVG, and the ones
|
||||
|
||||
@@ -99,11 +99,11 @@ func TestFaviconIsTheMark(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// The page asks for Geist by URL; a URL that 404s leaves every reader on
|
||||
// The page asks for Zen by URL; a URL that 404s leaves every reader on
|
||||
// system-ui with no sign anything is wrong.
|
||||
func TestGeistIsServed(t *testing.T) {
|
||||
func TestZenIsServed(t *testing.T) {
|
||||
w := httptest.NewRecorder()
|
||||
geist(w, httptest.NewRequest("GET", "http://mpc.hanzo.ai/fonts/Geist-Variable.woff2", nil))
|
||||
zen(w, httptest.NewRequest("GET", "http://mpc.hanzo.ai/fonts/Zen-Variable.woff2", nil))
|
||||
|
||||
if got := w.Header().Get("Content-Type"); got != "font/woff2" {
|
||||
t.Errorf("Content-Type = %q, want font/woff2", got)
|
||||
|
||||
+4
-4
@@ -21,9 +21,9 @@ var landingTemplate = template.Must(template.New("landing").Parse(`<!DOCTYPE htm
|
||||
{{if .Mark}}<link rel="icon" type="image/svg+xml" href="/favicon.svg">{{end}}
|
||||
{{if .Ico}}<link rel="icon" href="/favicon.ico" sizes="48x48">{{end}}
|
||||
<style>
|
||||
@font-face{font-family:Geist;font-style:normal;font-weight:100 900;font-display:swap;src:local('Geist'),url('/fonts/Geist-Variable.woff2') format('woff2')}
|
||||
@font-face{font-family:Zen;font-style:normal;font-weight:100 900;font-display:swap;src:local('Zen'),url('/fonts/Zen-Variable.woff2') format('woff2')}
|
||||
*{margin:0;padding:0;box-sizing:border-box}
|
||||
body{font-family:Geist,system-ui,sans-serif;background:#000;color:#a1a1a1;-webkit-font-smoothing:antialiased;display:flex;flex-direction:column;min-height:100vh}
|
||||
body{font-family:Zen,system-ui,sans-serif;background:#000;color:#a1a1a1;-webkit-font-smoothing:antialiased;display:flex;flex-direction:column;min-height:100vh}
|
||||
a{color:#fff;text-decoration:none}
|
||||
a:hover{text-decoration:underline}
|
||||
.wrap{width:100%;max-width:980px;margin:0 auto;padding:0 24px}
|
||||
@@ -142,8 +142,8 @@ func ico(w http.ResponseWriter, r *http.Request) {
|
||||
_, _ = w.Write(b.Ico)
|
||||
}
|
||||
|
||||
func geist(w http.ResponseWriter, r *http.Request) {
|
||||
func zen(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "font/woff2")
|
||||
w.Header().Set("Cache-Control", "public,max-age=31536000,immutable")
|
||||
_, _ = w.Write(geistWoff2)
|
||||
_, _ = w.Write(zenWoff2)
|
||||
}
|
||||
|
||||
+1
-1
@@ -272,7 +272,7 @@ func NewServer(database *db.Database, mpcBackend MPCBackend, jwtSecret string, o
|
||||
r.Get("/", landing)
|
||||
r.Get("/favicon.svg", favicon)
|
||||
r.Get("/favicon.ico", ico)
|
||||
r.Get("/fonts/Geist-Variable.woff2", geist)
|
||||
r.Get("/fonts/Zen-Variable.woff2", zen)
|
||||
|
||||
// Health check (public, outside /v1, for K8s probes)
|
||||
r.Get("/healthz", func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user