Built Twitter Like App - 1

Install Next.Js

1
npx create-next-app@13.0.0 --typescript

Install tailwindcss

1
2
npm install -D tailwindcss postcss autoprefixer
npx tailwindcss init -p

Initial page

modify pages/index.js

1
2
3
4
5
6
7
export default function Home() {
return (
<div className="text-3xl text-sky-500">
Hello World!
</div>
)
}

modify sytles/globals.css

1
2
3
4
5
6
7
8
9
10
11
@tailwind base;
@tailwind components;
@tailwind utilities;

:root{
@apply h-full bg-black
}

body{ de
@apply h-full bg-black
}

modify tailwind.config.js

1
2
3
4
5
6
7
8
9
10
11
12
13
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./app/**/*.{js,ts,jsx,tsx,mdx}",
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
"./components/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: {
extend: {},
},
plugins: [],
}

First Run

1
npm run dev

Demo Page:

请我喝杯咖啡吧~

支付宝
微信