Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

tailwindcsss next js change font

//You can override the default document file by adding the following code into the _document.js file.
//import Document, { Html, Head, Main, NextScript } from 'next/document'

class MyDocument extends Document {
  static async getInitialProps(ctx) {
    const initialProps = await Document.getInitialProps(ctx)
    return { ...initialProps }
  }

  render() {
    return (
      <Html>
       <Head>
          <link
            href="https://fonts.googleapis.com/css2?family=Russo+One"
            rel="stylesheet"
          />
          <link
            href="https://fonts.googleapis.com/css2?family=Dancing+Script"
            rel="stylesheet"
          />
        </Head>
        <body>
          <Main />
          <NextScript />
        </body>
      </Html>
    )
  }
}

export default MyDocument

//The final step will be to update the tailwind.config.js file.
const defaultTheme = require('tailwindcss/defaultTheme');
module.exports = {
  purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
  darkMode: false, // or 'media' or 'class'
  theme: {
    extend: {
      fontFamily: {
        sans: ['Russo One', ...defaultTheme.fontFamily.sans],
      },
    },
  },
  variants: {
    extend: {},
  },
  plugins: [],
};
Comment

PREVIOUS NEXT
Code Example
Javascript :: angular httpclient post body 
Javascript :: angular countdown begin stop pause 
Javascript :: jquery sticky sidebar on scroll 
Javascript :: jquery get value of td by class 
Javascript :: this.setstate is not a function in react native 
Javascript :: singleton function javascript 
Javascript :: function prototype javascript 
Javascript :: jquery moment js 
Javascript :: javascript trim whitespace 
Javascript :: javascript get selected text 
Javascript :: how to swap two images in javascript 
Javascript :: react router go back 
Javascript :: set time in javascript 
Javascript :: double logical not javascript 
Javascript :: how to insert a value into an array javascript 
Javascript :: import an image react in the public folder 
Javascript :: Return the highest number in Arrays in JavaScript 
Javascript :: find unique objects in an array of objects in javascript 5 
Javascript :: angular scroll to element horizontally 
Javascript :: how to restablished closed rxjs websocket 
Javascript :: how to install exact package lock version in package-lock.json 
Javascript :: jquery datatable update row cell value 
Javascript :: javascript arreglos 
Javascript :: react video 
Javascript :: new line in javascript string 
Javascript :: list of alphabet letter english for js 
Javascript :: target child event 
Javascript :: math random javascript 
Javascript :: get last element in array in javascript 
Javascript :: nodejs http 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =