Switch back to next fonts in layout
This commit is contained in:
parent
69567fcd3f
commit
9ad90aaa8d
4 changed files with 20 additions and 23 deletions
|
|
@ -7,9 +7,12 @@ export async function GET(req: NextRequest) {
|
|||
}
|
||||
|
||||
// hit an endpoint that actually requires auth
|
||||
const res = await fetch("http://localhost:3001/services/sysapi/logs", {
|
||||
headers: { Authorization: `Bearer ${token}` },
|
||||
});
|
||||
const res = await fetch(
|
||||
"http://localhost:3001/services/server-dash-api/logs",
|
||||
{
|
||||
headers: { Authorization: `Bearer ${token}` },
|
||||
},
|
||||
);
|
||||
|
||||
if (!res.ok) {
|
||||
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
|
||||
|
|
|
|||
|
|
@ -1,31 +1,13 @@
|
|||
@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;
|
||||
--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;
|
||||
}
|
||||
|
||||
body {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,18 @@ 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",
|
||||
|
|
@ -16,7 +28,7 @@ export default function RootLayout({
|
|||
<html
|
||||
lang="en"
|
||||
// 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>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
"build": "next build",
|
||||
"start": "next start",
|
||||
"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": {
|
||||
"next": "16.2.1",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue