mirror of
https://github.com/Lapikud/tipilan.git
synced 2026-03-23 21:34:21 +00:00
Move font export from layout to seperated comp
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { vipnagorgialla } from "../layout";
|
||||
import { vipnagorgialla } from "@/components/Vipnagorgialla";
|
||||
|
||||
export default function Expo() {
|
||||
return (
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { vipnagorgialla } from "../layout";
|
||||
import { vipnagorgialla } from "@/components/Vipnagorgialla";
|
||||
import Link from 'next/link';
|
||||
|
||||
export default function Tickets() {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { vipnagorgialla } from "../layout";
|
||||
import { vipnagorgialla } from "@/components/Vipnagorgialla";
|
||||
|
||||
export default function Timetable() {
|
||||
return (
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { vipnagorgialla } from "../layout";
|
||||
import { vipnagorgialla } from "@/components/Vipnagorgialla";
|
||||
|
||||
export default function Tourney() {
|
||||
return (
|
||||
|
||||
@@ -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]">
|
||||
|
||||
@@ -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
|
||||
|
||||
28
src/components/Vipnagorgialla.tsx
Normal file
28
src/components/Vipnagorgialla.tsx
Normal 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',
|
||||
},
|
||||
],
|
||||
});
|
||||
Reference in New Issue
Block a user