Skip to content

Commit

Permalink
chore: sync template (#486)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpedroschmitz authored Aug 5, 2022
1 parent ff974c5 commit 74d084f
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 33 deletions.
11 changes: 5 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
# misc
.DS_Store
*.pem
tsconfig.tsbuildinfo

# debug
npm-debug.log*
Expand All @@ -30,11 +29,11 @@ yarn-error.log*
.pnpm-debug.log*

# local env files
.env
.env.local
.env.development.local
.env.test.local
.env.production.local
.env*.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
6 changes: 0 additions & 6 deletions next-env.d.ts

This file was deleted.

6 changes: 5 additions & 1 deletion next.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
module.exports = {
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
};

module.exports = nextConfig;
4 changes: 2 additions & 2 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AppProps } from 'next/app';
import '@/styles/global.css';
import type { AppProps } from 'next/app';
import '@/styles/globals.css';

export default function MyApp({ Component, pageProps }: AppProps) {
return <Component {...pageProps} />;
Expand Down
2 changes: 1 addition & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function Home() {
</a>

<a
href="https://github.com/vercel/next.js/tree/master/examples"
href="https://github.com/vercel/next.js/tree/canary/examples"
className={styles.card}
>
<h2>Examples &rarr;</h2>
Expand Down
34 changes: 21 additions & 13 deletions src/styles/Home.module.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
.container {
min-height: 100vh;
padding: 0 0.5rem;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
height: 100vh;
padding: 0 2rem;
}

.main {
padding: 5rem 0;
min-height: 100vh;
padding: 4rem 0;
flex: 1;
display: flex;
flex-direction: column;
Expand All @@ -18,10 +13,10 @@
}

.footer {
width: 100%;
height: 100px;
border-top: 1px solid #eaeaea;
display: flex;
flex: 1;
padding: 2rem 0;
border-top: 1px solid #eaeaea;
justify-content: center;
align-items: center;
}
Expand Down Expand Up @@ -56,6 +51,7 @@
}

.description {
margin: 4rem 0;
line-height: 1.5;
font-size: 1.5rem;
}
Expand All @@ -75,7 +71,6 @@
justify-content: center;
flex-wrap: wrap;
max-width: 800px;
margin-top: 3rem;
}

.card {
Expand All @@ -87,7 +82,7 @@
border: 1px solid #eaeaea;
border-radius: 10px;
transition: color 0.15s ease, border-color 0.15s ease;
width: 45%;
max-width: 300px;
}

.card:hover,
Expand Down Expand Up @@ -119,3 +114,16 @@
flex-direction: column;
}
}

@media (prefers-color-scheme: dark) {
.card,
.footer {
border-color: #222;
}
.code {
background: #111;
}
.logo img {
filter: invert(1);
}
}
10 changes: 10 additions & 0 deletions src/styles/global.css → src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,13 @@ a {
* {
box-sizing: border-box;
}

@media (prefers-color-scheme: dark) {
html {
color-scheme: dark;
}
body {
color: white;
background: black;
}
}
8 changes: 4 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"baseUrl": ".",
"paths": {
"@/*": ["./src/*"],
"@/public/*": ["./public/*"]
},
"incremental": true
}
},
"exclude": ["node_modules"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"]
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"]
}

1 comment on commit 74d084f

@vercel
Copy link

@vercel vercel bot commented on 74d084f Aug 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.