├── .nvmrc ├── .eslintrc.json ├── css └── index.css ├── tailwind.config.js ├── public ├── screenshot.png ├── tailwind-logo.svg ├── critter.svg └── team-of-critters.svg ├── jsconfig.json ├── .gitignore ├── components ├── layout.js ├── footer.js └── header.js ├── postcss.config.js ├── pages ├── _app.js ├── _document.js ├── index.js └── about.js ├── .all-contributorsrc ├── LICENSE ├── package.json └── README.md /.nvmrc: -------------------------------------------------------------------------------- 1 | lts/* -------------------------------------------------------------------------------- /.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "next/core-web-vitals" 3 | } 4 | -------------------------------------------------------------------------------- /css/index.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | -------------------------------------------------------------------------------- /tailwind.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | purge: ["./components/**/*.js", "./pages/**/*.js"], 3 | }; 4 | -------------------------------------------------------------------------------- /public/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/taylorbryant/next-starter-tailwind/HEAD/public/screenshot.png -------------------------------------------------------------------------------- /jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "paths": { 5 | "@components/*": ["components/*"] 6 | } 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # next.js 12 | /.next/ 13 | /out/ 14 | 15 | # production 16 | /build 17 | 18 | # misc 19 | .DS_Store 20 | .env* 21 | 22 | # debug 23 | npm-debug.log* 24 | yarn-debug.log* 25 | yarn-error.log* 26 | -------------------------------------------------------------------------------- /components/layout.js: -------------------------------------------------------------------------------- 1 | import Header from "./header"; 2 | import Footer from "./footer"; 3 | 4 | export default function Layout(props) { 5 | return ( 6 |
7 |
8 | 9 |
10 | {props.children} 11 |
12 | 13 |
15 | ); 16 | } 17 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | "tailwindcss", 4 | "postcss-flexbugs-fixes", 5 | "postcss-100vh-fix", 6 | "postcss-hover-media-feature", 7 | [ 8 | "postcss-preset-env", 9 | { 10 | autoprefixer: { 11 | flexbox: "no-2009", 12 | }, 13 | stage: 3, 14 | features: { 15 | "custom-properties": false, 16 | }, 17 | }, 18 | ], 19 | ], 20 | }; 21 | -------------------------------------------------------------------------------- /public/tailwind-logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /pages/_app.js: -------------------------------------------------------------------------------- 1 | import "../css/index.css"; 2 | import Head from "next/head"; 3 | import Layout from "@components/layout"; 4 | 5 | function MyApp({ Component, pageProps }) { 6 | return ( 7 | 8 | 9 | Next.js Starter Tailwind 10 | 14 | 15 | 16 | 17 | 18 | ); 19 | } 20 | 21 | export default MyApp; 22 | -------------------------------------------------------------------------------- /pages/_document.js: -------------------------------------------------------------------------------- 1 | import Document, { Html, Head, Main, NextScript } from "next/document"; 2 | 3 | class MyDocument extends Document { 4 | static async getInitialProps(ctx) { 5 | const initialProps = await Document.getInitialProps(ctx); 6 | return { ...initialProps }; 7 | } 8 | 9 | render() { 10 | return ( 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | ); 19 | } 20 | } 21 | 22 | export default MyDocument; 23 | -------------------------------------------------------------------------------- /pages/index.js: -------------------------------------------------------------------------------- 1 | import Image from "next/image"; 2 | 3 | export default function IndexPage() { 4 | return ( 5 |
6 | Four one-eyed aliens playing 13 | 14 |

15 | Hi! Welcome to your first Next.js site. 16 |

17 |
18 | ); 19 | } 20 | -------------------------------------------------------------------------------- /components/footer.js: -------------------------------------------------------------------------------- 1 | export default function Footer() { 2 | return ( 3 | 29 | ); 30 | } 31 | -------------------------------------------------------------------------------- /.all-contributorsrc: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | "README.md" 4 | ], 5 | "imageSize": 100, 6 | "commit": false, 7 | "contributors": [ 8 | { 9 | "login": "Mozart409", 10 | "name": "Amadeus", 11 | "avatar_url": "https://avatars2.githubusercontent.com/u/38767929?v=4", 12 | "profile": "https://github.com/Mozart409", 13 | "contributions": [ 14 | "code", 15 | "ideas" 16 | ] 17 | }, 18 | { 19 | "login": "egdavid", 20 | "name": "David Eugene", 21 | "avatar_url": "https://avatars3.githubusercontent.com/u/10560326?v=4", 22 | "profile": "https://www.synaptech.fr", 23 | "contributions": [ 24 | "code" 25 | ] 26 | } 27 | ], 28 | "contributorsPerLine": 7, 29 | "projectName": "next-starter-tailwind", 30 | "projectOwner": "taylorbryant", 31 | "repoType": "github", 32 | "repoHost": "https://github.com", 33 | "skipCi": true 34 | } 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Taylor Bryant 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /pages/about.js: -------------------------------------------------------------------------------- 1 | import Image from "next/image"; 2 | 3 | export default function AboutPage() { 4 | return ( 5 |
6 |
7 |
8 |

What is Tailwind?

9 | 10 |

11 | Tailwind CSS is a highly customizable, low-level CSS framework that 12 | gives you all of the building blocks you need to build bespoke 13 | designs without any annoying opinionated styles you have to fight to 14 | override. 15 |

16 |
17 | 18 |
19 |

What is Next.js?

20 |

21 | Next.js is a minimalistic framework for creating server-rendered 22 | React applications. 23 |

24 |
25 |
26 | 27 | A one-eyed alien holding a broken cable connected between a server and a desktop computer 33 |
34 | ); 35 | } 36 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "next-starter-tailwind", 3 | "version": "2.0.0", 4 | "description": "Next.js starter styled with Tailwind CSS", 5 | "main": "index.js", 6 | "scripts": { 7 | "dev": "next", 8 | "build": "next build", 9 | "start": "next start", 10 | "lint": "next lint" 11 | }, 12 | "repository": { 13 | "type": "git", 14 | "url": "git+https://github.com/taylorbryant/next-starter-tailwind.git" 15 | }, 16 | "author": "Taylor Bryant", 17 | "license": "MIT", 18 | "bugs": { 19 | "url": "https://github.com/taylorbryant/next-starter-tailwind/issues" 20 | }, 21 | "homepage": "https://github.com/taylorbryant/next-starter-tailwind#readme", 22 | "dependencies": { 23 | "next": "12.2.4", 24 | "react": "17.0.2", 25 | "react-dom": "17.0.2" 26 | }, 27 | "devDependencies": { 28 | "autoprefixer": "10.3.4", 29 | "classnames": "2.3.1", 30 | "eslint": "7.32.0", 31 | "eslint-config-next": "11.1.2", 32 | "postcss": "8.3.6", 33 | "postcss-100vh-fix": "1.0.2", 34 | "postcss-flexbugs-fixes": "5.0.2", 35 | "postcss-hover-media-feature": "1.0.1", 36 | "postcss-preset-env": "6.7.0", 37 | "tailwindcss": "2.2.15" 38 | } 39 | } -------------------------------------------------------------------------------- /components/header.js: -------------------------------------------------------------------------------- 1 | import Link from "next/link"; 2 | import { useState } from "react"; 3 | import cn from "classnames"; 4 | import Image from "next/image"; 5 | 6 | export default function Header() { 7 | const [mobileMenuIsOpen, setMobileMenuIsOpen] = useState(false); 8 | 9 | return ( 10 |
11 |
12 |
13 | Tailwind CSS logo 20 | 21 | 22 | 23 | Next.js Starter Tailwind 24 | 25 | 26 |
27 | 28 | 41 | 42 |
    48 | {[ 49 | { title: "Home", route: "/" }, 50 | { title: "About", route: "/about" }, 51 | ].map(({ route, title }) => ( 52 |
  • 53 | 54 | {title} 55 | 56 |
  • 57 | ))} 58 |
59 |
60 |
61 | ); 62 | } 63 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Next.js Starter Tailwind 2 | 3 | 4 | 5 | [![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-) 6 | 7 | 8 | 9 | ![alt text](https://github.com/taylorbryant/next-starter-tailwind/blob/master/public/screenshot.png "Screenshot of Tailwind Next.js Starter homepage") 10 | 11 |
12 |

A Next.js starter styled using Tailwind CSS.

13 |

Uses Tailwind CSS' built-in purge option to remove unused CSS.

14 |

Illustrations by unDraw.

15 |

View demo here.

16 |
17 | 18 | ## Deploy 19 | 20 | ### Vercel 21 | 22 | [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/git?s=https%3A%2F%2Fgithub.com%2Ftaylorbryant%2Fnext-starter-tailwind%2Ftree%2Fmaster) 23 | 24 | ## License 25 | 26 | [MIT](https://github.com/taylorbryant/next-starter-tailwind/blob/master/LICENSE.md) 27 | 28 | ## How you can help 29 | 30 | Enjoying this starter and want to help? You can: 31 | 32 | - [Create an issue](https://github.com/taylorbryant/next-starter-tailwind/issues/new) with some constructive criticism 33 | - [Submit a pull request](https://github.com/taylorbryant/next-starter-tailwind/compare) with some improvements to the project 34 | 35 | ## Contributors ✨ 36 | 37 | Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)): 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 |

Amadeus

💻 🤔

David Eugene

💻
48 | 49 | 50 | 51 | 52 | 53 | 54 | This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome! 55 | -------------------------------------------------------------------------------- /public/critter.svg: -------------------------------------------------------------------------------- 1 | server down -------------------------------------------------------------------------------- /public/team-of-critters.svg: -------------------------------------------------------------------------------- 1 | good team --------------------------------------------------------------------------------