From 59d88339bd0427257ef35ff5c544dc84eb8ef249 Mon Sep 17 00:00:00 2001 From: skidoodle <53189968+skidoodle@users.noreply.github.com> Date: Sun, 9 Apr 2023 11:40:21 +0200 Subject: [PATCH] .use next/font --- src/pages/_app.tsx | 14 +++++++++++--- src/styles/globals.scss | 2 -- tailwind.config.js | 9 +++++++++ 3 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 1800058..82c26a4 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -2,17 +2,25 @@ import { AppProps } from 'next/app'; import { Analytics } from '@vercel/analytics/react'; import { ThemeProvider } from 'next-themes'; import Head from 'next/head'; +import { Inter } from 'next/font/google'; import '@/styles/globals.scss'; +const inter = Inter({ + subsets: ['latin'], + variable: '--font-inter', +}); + export default function App({ Component, pageProps }: AppProps) { return ( <> albert - - - +
+ + + +
); diff --git a/src/styles/globals.scss b/src/styles/globals.scss index 93f9ec5..535af9f 100644 --- a/src/styles/globals.scss +++ b/src/styles/globals.scss @@ -1,11 +1,9 @@ -@import url('https://cdn.albert.lol/ClearSansRegular.woff'); @tailwind base; @tailwind components; @tailwind utilities; @layer base { html { - font-family: 'Clear Sans', sans-serif; scrollbar-width: thin; scrollbar-color: #8a58e0 transparent; } diff --git a/tailwind.config.js b/tailwind.config.js index d3d8e10..c72fb5b 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,8 +1,17 @@ +const { fontFamily } = require('tailwindcss/defaultTheme'); + /** @type {import('tailwindcss').Config} */ module.exports = { content: [ './src/pages/**/*.{js,ts,jsx,tsx}', './src/components/**/*.{js,ts,jsx,tsx}', ], + theme: { + extend: { + fontFamily: { + sans: ['var(--font-inter)', ...fontFamily.sans], + }, + }, + }, plugins: [], };