Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Add Font (Mulish) #130

Merged
merged 1 commit into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/app/(app)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { getUserTeams } from '@/services/database/team';
import '@/theme/app.css';
import '@/theme/globals.css';
import { Metadata } from 'next';
import { Mulish } from 'next/font/google';
import Providers from './providers';

export const dynamic = 'force-dynamic';
Expand Down Expand Up @@ -47,6 +48,12 @@ export const metadata: Metadata = {
},
};

const mulish = Mulish({
subsets: ['latin'],
weight: ['400', '500', '600', '700'],
variable: '--font-mulish',
});

export default async function RootLayout({ children }: Props) {
const session = await getSession();
const teams = session?.user.id
Expand All @@ -55,7 +62,9 @@ export default async function RootLayout({ children }: Props) {

return (
<html lang="en">
<body className="flex flex-col font-sans overflow-x-hidden">
<body
className={`flex flex-col font-sans overflow-x-hidden ${mulish.variable} font-mulish`}
>
<Providers>
<Header teams={teams} user={session?.user} />
{children}
Expand Down
14 changes: 11 additions & 3 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ module.exports = {
xs: '480px',
...defaultTheme.screens,
},
fontFamily: {
mulish: 'var(--font-mulish)',
},
extends: {
typography: ({ theme }) => ({
violet: {
Expand Down Expand Up @@ -47,8 +50,13 @@ module.exports = {
'--tw-prose-invert-td-borders': theme('colors.violet[700]'),
},
},
})
}
}),
},
},
plugins: [require('@tailwindcss/forms'), require('tailwindcss-animate'), require('@tailwindcss/line-clamp'), require('@tailwindcss/typography')],
plugins: [
require('@tailwindcss/forms'),
require('tailwindcss-animate'),
require('@tailwindcss/line-clamp'),
require('@tailwindcss/typography'),
],
};
Loading