Switch back to next fonts in layout

This commit is contained in:
Jack Mechem 2026-03-30 12:52:33 -07:00
parent 69567fcd3f
commit 9ad90aaa8d
4 changed files with 20 additions and 23 deletions

View file

@ -7,9 +7,12 @@ export async function GET(req: NextRequest) {
} }
// hit an endpoint that actually requires auth // hit an endpoint that actually requires auth
const res = await fetch("http://localhost:3001/services/sysapi/logs", { const res = await fetch(
headers: { Authorization: `Bearer ${token}` }, "http://localhost:3001/services/server-dash-api/logs",
}); {
headers: { Authorization: `Bearer ${token}` },
},
);
if (!res.ok) { if (!res.ok) {
return NextResponse.json({ error: "Unauthorized" }, { status: 401 }); return NextResponse.json({ error: "Unauthorized" }, { status: 401 });

View file

@ -1,31 +1,13 @@
@import "tailwindcss"; @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 { :root {
--background: #f9fafb; --background: #f9fafb;
--foreground: #111827; --foreground: #111827;
--font-dm-sans: "DM Sans", sans-serif;
--font-playfair: "Playfair Display", serif;
} }
@theme inline { @theme inline {
--color-background: var(--background); --color-background: var(--background);
--color-foreground: var(--foreground); --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 { body {

View file

@ -2,6 +2,18 @@ import type { Metadata } from "next";
import { DM_Sans, Playfair_Display } from "next/font/google"; // Import your specific fonts import { DM_Sans, Playfair_Display } from "next/font/google"; // Import your specific fonts
import "./globals.css"; 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 = { export const metadata: Metadata = {
title: "Create Next App", title: "Create Next App",
description: "Generated by create next app", description: "Generated by create next app",
@ -16,7 +28,7 @@ export default function RootLayout({
<html <html
lang="en" lang="en"
// Add the new font variables here // Add the new font variables here
className={`h-full antialiased`} className={`${dmSans.variable} ${playfair.variable} h-full antialiased`}
> >
<body className="min-h-full h-full flex flex-col">{children}</body> <body className="min-h-full h-full flex flex-col">{children}</body>
</html> </html>

View file

@ -7,7 +7,7 @@
"build": "next build", "build": "next build",
"start": "next start", "start": "next start",
"lint": "eslint", "lint": "eslint",
"deploy": "npm run build && sudo mkdir -p /var/lib/server-dash/build && sudo cp -r .next/standalone/. /var/lib/server-dash/build/ && sudo mkdir -p /var/lib/server-dash/build/.next && sudo cp -r .next/static /var/lib/server-dash/build/.next/static && sudo cp -r public /var/lib/server-dash/build/public && sudo chown -R server-dash:server-dash /var/lib/server-dash/build && sudo systemctl restart server-dash" "deploy": "npm run build && sudo mkdir -p /var/lib/server-dash/build && sudo cp -r .next/standalone/. /var/lib/server-dash/build/ && sudo mkdir -p /var/lib/server-dash/build/.next && sudo cp -r .next/static /var/lib/server-dash/build/.next/static && sudo cp -r public /var/lib/server-dash/build/public && sudo cp .env /var/lib/server-dash/.env && sudo chown -R server-dash:server-dash /var/lib/server-dash && sudo systemctl restart server-dash"
}, },
"dependencies": { "dependencies": {
"next": "16.2.1", "next": "16.2.1",