The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.
TypeScript b2b-marketplacecomposable-commerceecommerceenterpriseheadless-commercemarketplacemedusamedusajsmulti-vendortypescript
fix(storefront): self-host Funnel Display instead of fetching it at build time (#1611)
Viktor Holik6a6e22aff438
diff --git a/apps/storefront/src/app/fonts/funnel-display-latin-ext.woff2 b/apps/storefront/src/app/fonts/funnel-display-latin-ext.woff2new file mode 100644index 000000000..f22bf80feBinary files /dev/null and b/apps/storefront/src/app/fonts/funnel-display-latin-ext.woff2 differdiff --git a/apps/storefront/src/app/fonts/funnel-display-latin.woff2 b/apps/storefront/src/app/fonts/funnel-display-latin.woff2new file mode 100644index 000000000..9d9829b90Binary files /dev/null and b/apps/storefront/src/app/fonts/funnel-display-latin.woff2 differdiff --git a/apps/storefront/src/app/globals.css b/apps/storefront/src/app/globals.cssindex 107e61147..a161da429 100644--- a/apps/storefront/src/app/globals.css+++ b/apps/storefront/src/app/globals.css@@ -1,10 +1,31 @@/* Defined colors variables */@import "colors.css";+@font-face {+ font-family: "Funnel Display";+ font-style: normal;+ font-weight: 300 800;+ font-display: swap;+ src: url("./fonts/funnel-display-latin-ext.woff2") format("woff2");+ unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;+}+@font-face {+ font-family: "Funnel Display";+ font-style: normal;+ font-weight: 300 800;+ font-display: swap;+ src: url("./fonts/funnel-display-latin.woff2") format("woff2");+ unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;+}+@tailwind base;@tailwind components;@tailwind utilities;+body {+ font-family: "Funnel Display", sans-serif;+}+/* Typography */.text-xl {@apply font-light tracking-normal;diff --git a/apps/storefront/src/app/layout.tsx b/apps/storefront/src/app/layout.tsxindex 12669774f..3758cc74d 100644--- a/apps/storefront/src/app/layout.tsx+++ b/apps/storefront/src/app/layout.tsx@@ -1,5 +1,4 @@import type { Metadata } from 'next';-import { Funnel_Display } from 'next/font/google';import './globals.css';@@ -11,12 +10,6 @@ import { retrieveCart } from '@/lib/data/cart';import { Providers } from './providers';-const funnelDisplay = Funnel_Display({- variable: '--font-funnel-sans',- subsets: ['latin'],- weight: ['300', '400', '500', '600']-});-export const metadata: Metadata = {title: {template: `%s | ${@@ -45,24 +38,6 @@ export default async function RootLayout({className=""><Head>- <link- rel="preconnect"- href="https://fonts.gstatic.com"- crossOrigin="anonymous"- />- <link- rel="dns-prefetch"- href="https://fonts.gstatic.com"- />- <link- rel="preconnect"- href="https://fonts.googleapis.com"- crossOrigin="anonymous"- />- <link- rel="dns-prefetch"- href="https://fonts.googleapis.com"- /><linkrel="preconnect"href="https://i.imgur.com"@@ -110,7 +85,7 @@ export default async function RootLayout({href="https://api.mercurjs.com"/></Head>- <body className={`${funnelDisplay.className} relative bg-primary text-secondary antialiased`}>+ <body className="relative bg-primary text-secondary antialiased"><HtmlLangSetter /><Providers cart={cart}>{children}</Providers><Toaster position="top-right" />