Skip to content

Commit

Permalink
Add Tailwind
Browse files Browse the repository at this point in the history
  • Loading branch information
sondr3 committed Nov 15, 2021
1 parent e2bae73 commit b16de36
Show file tree
Hide file tree
Showing 8 changed files with 521 additions and 163 deletions.
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@
"devDependencies": {
"@types/node": "16.11.7",
"@types/react": "17.0.34",
"autoprefixer": "10.4.0",
"eslint": "7",
"eslint-config-next": "12.0.3",
"postcss": "8.3.11",
"tailwindcss": "2.2.19",
"typescript": "4.4.4"
}
}
2 changes: 1 addition & 1 deletion pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '../styles/globals.css'
import 'tailwindcss/tailwind.css'
import type { AppProps } from 'next/app'

function MyApp({ Component, pageProps }: AppProps) {
Expand Down
23 changes: 10 additions & 13 deletions pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,49 +1,46 @@
import type { NextPage } from 'next'
import Head from 'next/head'
import Image from 'next/image'
import styles from '../styles/Home.module.css'

const Home: NextPage = () => {
return (
<div className={styles.container}>
<div>
<Head>
<title>Create Next App</title>
<meta name="description" content="Generated by create next app" />
<link rel="icon" href="/favicon.ico" />
</Head>

<main className={styles.main}>
<h1 className={styles.title}>
<main>
<h1>
Welcome to <a href="https://nextjs.org">Next.js!</a>
</h1>

<p className={styles.description}>
<p>
Get started by editing{' '}
<code className={styles.code}>pages/index.tsx</code>
<code>pages/index.tsx</code>
</p>

<div className={styles.grid}>
<a href="https://nextjs.org/docs" className={styles.card}>
<div>
<a href="https://nextjs.org/docs">
<h2>Documentation &rarr;</h2>
<p>Find in-depth information about Next.js features and API.</p>
</a>

<a href="https://nextjs.org/learn" className={styles.card}>
<a href="https://nextjs.org/learn" >
<h2>Learn &rarr;</h2>
<p>Learn about Next.js in an interactive course with quizzes!</p>
</a>

<a
href="https://github.com/vercel/next.js/tree/master/examples"
className={styles.card}
>
<h2>Examples &rarr;</h2>
<p>Discover and deploy boilerplate example Next.js projects.</p>
</a>

<a
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
className={styles.card}
>
<h2>Deploy &rarr;</h2>
<p>
Expand All @@ -53,14 +50,14 @@ const Home: NextPage = () => {
</div>
</main>

<footer className={styles.footer}>
<footer>
<a
href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
target="_blank"
rel="noopener noreferrer"
>
Powered by{' '}
<span className={styles.logo}>
<span>
<Image src="/vercel.svg" alt="Vercel Logo" width={72} height={16} />
</span>
</a>
Expand Down
6 changes: 6 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
116 changes: 0 additions & 116 deletions styles/Home.module.css

This file was deleted.

16 changes: 0 additions & 16 deletions styles/globals.css

This file was deleted.

11 changes: 11 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
purge: ['./pages/**/*.tsx', './components/**/*.tsx'],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [],
}
Loading

0 comments on commit b16de36

Please sign in to comment.