Move font export from layout to seperated comp

pull/2/head
v4ltages 8 months ago
parent 60cd97d68b
commit e20d3230af
No known key found for this signature in database
GPG Key ID: DC7BC38E0DC642B
  1. 2
      src/app/expo/page.tsx
  2. 28
      src/app/layout.tsx
  3. 4
      src/app/page.tsx
  4. 2
      src/app/tickets/page.tsx
  5. 2
      src/app/timetable/page.tsx
  6. 2
      src/app/tourney/page.tsx
  7. 2
      src/components/Header.tsx
  8. 2
      src/components/Sidebar.tsx
  9. 28
      src/components/Vipnagorgialla.tsx

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

@ -3,34 +3,6 @@
// Fonts // Fonts
import { Work_Sans } from "next/font/google"; 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 "./globals.css";
import SidebarParent from "@/components/SidebarParent"; 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 { MdEast, MdEmojiEvents, MdEventNote, MdWeekend } from "react-icons/md";
import Link from 'next/link'; 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"> <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"/> <img src="/tipilan-white.svg" alt="TipiLAN Logo" className="h-64"/>
<div className="pr-12 hidden 2xl:block"> <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> <h2 className={`text-8xl ${vipnagorgialla.className} font-bold italic text-[#007CAB]`}>10 000</h2>
</div> </div>
</div> </div>

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

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

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

@ -2,7 +2,7 @@
import { MdClose, MdMenu } from "react-icons/md"; import { MdClose, MdMenu } from "react-icons/md";
// Fonts // Fonts
import { vipnagorgialla } from "@/app/layout"; import { vipnagorgialla } from "@/components/Vipnagorgialla";
const Header = ({ isOpen, toggleSidebar }: { isOpen: boolean; toggleSidebar: () => void }) => ( 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]"> <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'; 'use client';
// Fonts // 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 // Use effect to handle route changes and close the sidebar if it's open
// usePathName to listen to route changes in Next.js // usePathName to listen to route changes in Next.js

@ -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',
},
],
});
Loading…
Cancel
Save