-
Notifications
You must be signed in to change notification settings - Fork 431
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Next/font & updated tailwind config (#52)
* refactor: use `next/font` for more optimized font loading * fix: update tailwind configuration to v3, remove unneeded properties & font @see https://tailwindcss.com/docs/upgrade-guide * fix: remove font-sans classname
- Loading branch information
1 parent
e56e01c
commit f2e0a46
Showing
4 changed files
with
14 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
@import url("https://fonts.bunny.net/css2?family=Nunito:wght@400;600;700&display=swap"); | ||
|
||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
import { Nunito } from 'next/font/google' | ||
import '@/app/global.css' | ||
|
||
export const metadata = { | ||
title: 'Laravel', | ||
} | ||
const nunitoFont = Nunito({ | ||
subsets: ['latin'], | ||
display: 'swap', | ||
}) | ||
|
||
const RootLayout = ({ children }) => { | ||
return ( | ||
<html lang="en"> | ||
<html lang="en" className={nunitoFont.className}> | ||
<body className="antialiased">{children}</body> | ||
</html> | ||
) | ||
} | ||
|
||
export const metadata = { | ||
title: 'Laravel', | ||
} | ||
|
||
export default RootLayout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,5 @@ | ||
const defaultTheme = require('tailwindcss/defaultTheme') | ||
|
||
module.exports = { | ||
content: ['./src/**/*.js'], | ||
darkMode: 'media', | ||
theme: { | ||
extend: { | ||
fontFamily: { | ||
sans: ['Nunito', ...defaultTheme.fontFamily.sans], | ||
}, | ||
}, | ||
}, | ||
variants: { | ||
extend: { | ||
opacity: ['disabled'], | ||
}, | ||
}, | ||
content: ['./src/**/*.{js,jsx,ts,tsx}'], | ||
theme: {}, | ||
plugins: [require('@tailwindcss/forms')], | ||
} |