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

@@ -1,4 +1,4 @@
import { vipnagorgialla } from "../layout";
import { vipnagorgialla } from "@/components/Vipnagorgialla";
export default function Expo() {
return (

View File

@@ -3,34 +3,6 @@
// Fonts
import { Work_Sans } from "next/font/google";
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: './fonts/vipnagorgialla/Vipnagorgialla-Rg.otf',
weight: '400',
style: 'normal',
},
{
path: './fonts/vipnagorgialla/Vipnagorgialla-Rg-It.otf',
weight: '400',
style: 'italic',
},
{
path: './fonts/vipnagorgialla/Vipnagorgialla-Bd.otf',
weight: '700',
style: 'normal',
},
{
path: './fonts/vipnagorgialla/Vipnagorgialla-Bd-It.otf',
weight: '700',
style: 'italic',
},
],
});
import "./globals.css";
import SidebarParent from "@/components/SidebarParent";

View File

@@ -1,4 +1,4 @@
import { vipnagorgialla } from "./layout";
import { vipnagorgialla } from "@/components/Vipnagorgialla";
import { MdEast, MdEmojiEvents, MdEventNote, MdWeekend } from "react-icons/md";
import Link from 'next/link';
@@ -9,7 +9,7 @@ export default function Home() {
<div className="border-b-3 border-[#007CAB] flex items-center justify-between pt-18">
<img src="/tipilan-white.svg" alt="TipiLAN Logo" className="h-64"/>
<div className="pr-12 hidden 2xl:block">
<h3 className={`text-6xl ${vipnagorgialla.className} font-bold italic text-[#2A2C3F]`}>Auhinnafond</h3>
<h3 className={`text-6xl ${vipnagorgialla.className} font-bold italic uppercase text-[#2A2C3F]`}>Auhinnafond</h3>
<h2 className={`text-8xl ${vipnagorgialla.className} font-bold italic text-[#007CAB]`}>10 000</h2>
</div>
</div>

View File

@@ -1,4 +1,4 @@
import { vipnagorgialla } from "../layout";
import { vipnagorgialla } from "@/components/Vipnagorgialla";
import Link from 'next/link';
export default function Tickets() {

View File

@@ -1,4 +1,4 @@
import { vipnagorgialla } from "../layout";
import { vipnagorgialla } from "@/components/Vipnagorgialla";
export default function Timetable() {
return (

View File

@@ -1,4 +1,4 @@
import { vipnagorgialla } from "../layout";
import { vipnagorgialla } from "@/components/Vipnagorgialla";
export default function Tourney() {
return (

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',
},
],
});