0
0
mirror of https://github.com/yude-jp/yude.jp synced 2024-12-22 04:00:10 +09:00

Setup Tailwind CSS

This commit is contained in:
yude 2021-02-06 09:36:00 +09:00
parent 6165a111e1
commit b9f6b8a488
6 changed files with 933 additions and 52 deletions

952
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -22,8 +22,11 @@
"homepage": "https://github.com/yudemoe/yude.jp#readme", "homepage": "https://github.com/yudemoe/yude.jp#readme",
"dependencies": { "dependencies": {
"@zeit/next-css": "^1.0.1", "@zeit/next-css": "^1.0.1",
"autoprefixer": "^10.2.4",
"next": "^10.0.6", "next": "^10.0.6",
"postcss": "^8.2.4",
"react": "^17.0.1", "react": "^17.0.1",
"react-dom": "^17.0.1" "react-dom": "^17.0.1",
"tailwindcss": "^2.0.2"
} }
} }

View File

@ -1,5 +1,6 @@
import Head from "next/head" import Head from "next/head"
import Link from "next/link" import Link from "next/link"
import "tailwindcss/tailwind.css";
const Layout = (props) => { const Layout = (props) => {
const { title, children } = props const { title, children } = props
@ -18,14 +19,10 @@ const Layout = (props) => {
{children} {children}
</div> </div>
</main> </main>
<style jsx global>{` <style jsx global>{`
body { body {
text-align: center; text-align: center;
} }
.avatar{
border-radius: 50%;
}
`}</style> `}</style>
</div> </div>
) )

View File

@ -5,8 +5,8 @@ import Image from 'next/image'
const Index = () => ( const Index = () => (
<Layout title="ホーム"> <Layout title="ホーム">
<div> <div className="my-9">
<Image className="avatar" <Image className="rounded-full"
src = "/static/images/avatar.png" src = "/static/images/avatar.png"
alt = "yude's avatar" alt = "yude's avatar"
width = {200} width = {200}
@ -17,8 +17,8 @@ const Index = () => (
<p>For now, please visit <Link href="https://yude.moe"><a>yude.moe</a></Link>. <p>For now, please visit <Link href="https://yude.moe"><a>yude.moe</a></Link>.
</p> </p>
</div> </div>
</Layout> </Layout>
) )
export default Index export default Index

6
postcss.config.js Normal file
View File

@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}

11
tailwind.config.js Normal file
View File

@ -0,0 +1,11 @@
module.exports = {
purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [],
}