Move font export from layout to seperated comp

This commit is contained in:
2025-04-30 21:46:06 +03:00
parent 60cd97d68b
commit e20d3230af
9 changed files with 36 additions and 36 deletions

View File

@@ -2,7 +2,7 @@
import { MdClose, MdMenu } from "react-icons/md";
// Fonts
import { vipnagorgialla } from "@/app/layout";
import { vipnagorgialla } from "@/components/Vipnagorgialla";
const Header = ({ isOpen, toggleSidebar }: { isOpen: boolean; toggleSidebar: () => void }) => (
<header className="h-16 flex items-center bg-[#EEE5E5] border-b-3 border-[#007CAB] justify-between px-12 text-[#2A2C3F]">

View File

@@ -1,7 +1,7 @@
'use client';
// Fonts
import { vipnagorgialla } from '@/app/layout';
import { vipnagorgialla } from "@/components/Vipnagorgialla";
// Use effect to handle route changes and close the sidebar if it's open
// usePathName to listen to route changes in Next.js

View File

@@ -0,0 +1,28 @@
import localFont from 'next/font/local';
// Style 'only' has normal and italic for some reason.
// It uses the weight to determine the style used.
export const vipnagorgialla = localFont({
src: [
{
path: '../app/fonts/vipnagorgialla/Vipnagorgialla-Rg.otf',
weight: '400',
style: 'normal',
},
{
path: '../app/fonts/vipnagorgialla/Vipnagorgialla-Rg-It.otf',
weight: '400',
style: 'italic',
},
{
path: '../app/fonts/vipnagorgialla/Vipnagorgialla-Bd.otf',
weight: '700',
style: 'normal',
},
{
path: '../app/fonts/vipnagorgialla/Vipnagorgialla-Bd-It.otf',
weight: '700',
style: 'italic',
},
],
});