From 8d06749627159628d8cea379a41b7b70621e1a6a Mon Sep 17 00:00:00 2001 From: Jack Mechem Date: Sat, 28 Mar 2026 18:23:52 -0700 Subject: [PATCH] Switched to local fonts --- app/globals.css | 81 +++++++++++++++++++----------- app/layout.tsx | 14 +----- next.config.ts | 4 +- public/fonts/DMSans.woff2 | 11 ++++ public/fonts/PlayfairDisplay.woff2 | 11 ++++ 5 files changed, 77 insertions(+), 44 deletions(-) create mode 100644 public/fonts/DMSans.woff2 create mode 100644 public/fonts/PlayfairDisplay.woff2 diff --git a/app/globals.css b/app/globals.css index 1928c63..aabd55d 100644 --- a/app/globals.css +++ b/app/globals.css @@ -1,56 +1,79 @@ @import "tailwindcss"; +@font-face { + font-family: "DM Sans"; + src: url("/fonts/DMSans.woff2") format("woff2"); + font-display: swap; +} + +@font-face { + font-family: "Playfair Display"; + src: url("/fonts/PlayfairDisplay.woff2") format("woff2"); + font-display: swap; +} + :root { - --background: #f9fafb; - --foreground: #111827; + --background: #f9fafb; + --foreground: #111827; + --font-dm-sans: "DM Sans", sans-serif; + --font-playfair: "Playfair Display", serif; } @theme inline { - --color-background: var(--background); - --color-foreground: var(--foreground); - - /* Link Tailwind to the Next.js Font Variables */ - --font-sans: var(--font-dm-sans), ui-sans-serif, system-ui; - --font-serif: var(--font-playfair), ui-serif, Georgia; + --color-background: var(--background); + --color-foreground: var(--foreground); + + /* Link Tailwind to the Next.js Font Variables */ + --font-sans: var(--font-dm-sans), ui-sans-serif, system-ui; + --font-serif: var(--font-playfair), ui-serif, Georgia; } body { - background: var(--background); - color: var(--foreground); - font-family: var(--font-sans); - -webkit-font-smoothing: antialiased; + background: var(--background); + color: var(--foreground); + font-family: var(--font-sans); + -webkit-font-smoothing: antialiased; } /* --- Animations --- */ @keyframes fadeUp { - from { - opacity: 0; - transform: translateY(10px); - } - to { - opacity: 1; - transform: translateY(0); - } + from { + opacity: 0; + transform: translateY(10px); + } + to { + opacity: 1; + transform: translateY(0); + } } @keyframes shimmer { - from { background-position: 200% 0; } - to { background-position: -200% 0; } + from { + background-position: 200% 0; + } + to { + background-position: -200% 0; + } } @keyframes pulse-dot { - 0%, 100% { opacity: 1; } - 50% { opacity: 0.25; } + 0%, + 100% { + opacity: 1; + } + 50% { + opacity: 0.25; + } } .animate-fade-up { - animation: fadeUp 0.45s ease both; + animation: fadeUp 0.45s ease both; } .skeleton { - background: linear-gradient(90deg, #f3f4f6 25%, #e9eaec 50%, #f3f4f6 75%); - background-size: 200% 100%; - animation: shimmer 1.4s infinite; - border-radius: 8px; + background: linear-gradient(90deg, #f3f4f6 25%, #e9eaec 50%, #f3f4f6 75%); + background-size: 200% 100%; + animation: shimmer 1.4s infinite; + border-radius: 8px; } diff --git a/app/layout.tsx b/app/layout.tsx index d09470c..bb63997 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -2,18 +2,6 @@ import type { Metadata } from "next"; import { DM_Sans, Playfair_Display } from "next/font/google"; // Import your specific fonts import "./globals.css"; -const dmSans = DM_Sans({ - variable: "--font-dm-sans", - subsets: ["latin"], - display: "swap", -}); - -const playfair = Playfair_Display({ - variable: "--font-playfair", - subsets: ["latin"], - display: "swap", -}); - export const metadata: Metadata = { title: "Create Next App", description: "Generated by create next app", @@ -28,7 +16,7 @@ export default function RootLayout({ {children} diff --git a/next.config.ts b/next.config.ts index 2a9fe71..b1f67e7 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,8 +1,8 @@ import type { NextConfig } from "next"; const nextConfig: NextConfig = { - allowedDevOrigins: ['dashboard.jackmechem.dev', 'localhost'], - output: 'standalone', + allowedDevOrigins: ["dashboard.jackmechem.dev", "localhost"], + output: "standalone", }; export default nextConfig; diff --git a/public/fonts/DMSans.woff2 b/public/fonts/DMSans.woff2 new file mode 100644 index 0000000..4718525 --- /dev/null +++ b/public/fonts/DMSans.woff2 @@ -0,0 +1,11 @@ + + + + + Error 404 (Not Found)!!1 + + +

404. That’s an error. +

The requested URL /s/dmsans/v15/rP2Hp2ywxg089UriCZa4ET-DNl0.woff2 was not found on this server. That’s all we know. diff --git a/public/fonts/PlayfairDisplay.woff2 b/public/fonts/PlayfairDisplay.woff2 new file mode 100644 index 0000000..7fd3052 --- /dev/null +++ b/public/fonts/PlayfairDisplay.woff2 @@ -0,0 +1,11 @@ + + + + + Error 404 (Not Found)!!1 + + +

404. That’s an error. +

The requested URL /s/playfairdisplay/v37/nuFvD-vYSZviVYUb_rj3ij__anPXJzDwcbmjWBN2PKdFvUDQ.woff2 was not found on this server. That’s all we know.