Code: Select all
// src/app/layout.tsx
import localFont from 'next/font/local'
const dinround = localFont({
src: [
{
path: '../../public/fonts/DIN Round Pro/dinroundpro.otf'
}
],
variable: '--font-dinround'
})
export default function RootLayout({
children,
}: Readonly) {
return (
{children}
);
}
< /code>
In den nächsten JS -Dokumenten soll die Variablen zur Datei tailwind.config.js hinzugefügt werden, aber für Tailwind 4 gibt es keine Konfigurationsdatei mehr. Es gibt eine postcs.config.mjs-Datei, aber ich denke nicht, dass das dasselbe ist, also habe ich angenommen, dass ich sie in meiner Datei global.css.css-Datei mache.// src/styles/globals.css
@import "tailwindcss";
@plugin "daisyui" {
themes: light --default, dark;
root: ":root";
logs: true;
}
@theme {
}