Kaynağa Gözat

Initial commit from Create Next App

Sergio Mattei 2 yıl önce
işleme
2c05285fdd
14 değiştirilmiş dosya ile 5457 ekleme ve 0 silme
  1. 3
    0
      .eslintrc.json
  2. 36
    0
      .gitignore
  3. 34
    0
      README.md
  4. 7
    0
      next.config.js
  5. 5086
    0
      package-lock.json
  6. 22
    0
      package.json
  7. 6
    0
      pages/_app.tsx
  8. 13
    0
      pages/api/hello.ts
  9. 71
    0
      pages/index.tsx
  10. BIN
      public/favicon.ico
  11. 4
    0
      public/vercel.svg
  12. 129
    0
      styles/Home.module.css
  13. 26
    0
      styles/globals.css
  14. 20
    0
      tsconfig.json

+ 3
- 0
.eslintrc.json Dosyayı Görüntüle

@@ -0,0 +1,3 @@
1
+{
2
+  "extends": "next/core-web-vitals"
3
+}

+ 36
- 0
.gitignore Dosyayı Görüntüle

@@ -0,0 +1,36 @@
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
+*.pem
21
+
22
+# debug
23
+npm-debug.log*
24
+yarn-debug.log*
25
+yarn-error.log*
26
+.pnpm-debug.log*
27
+
28
+# local env files
29
+.env*.local
30
+
31
+# vercel
32
+.vercel
33
+
34
+# typescript
35
+*.tsbuildinfo
36
+next-env.d.ts

+ 34
- 0
README.md Dosyayı Görüntüle

@@ -0,0 +1,34 @@
1
+This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
2
+
3
+## Getting Started
4
+
5
+First, run the development server:
6
+
7
+```bash
8
+npm run dev
9
+# or
10
+yarn dev
11
+```
12
+
13
+Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
14
+
15
+You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file.
16
+
17
+[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`.
18
+
19
+The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
20
+
21
+## Learn More
22
+
23
+To learn more about Next.js, take a look at the following resources:
24
+
25
+- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
26
+- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
27
+
28
+You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
29
+
30
+## Deploy on Vercel
31
+
32
+The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
33
+
34
+Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.

+ 7
- 0
next.config.js Dosyayı Görüntüle

@@ -0,0 +1,7 @@
1
+/** @type {import('next').NextConfig} */
2
+const nextConfig = {
3
+  reactStrictMode: true,
4
+  swcMinify: true,
5
+}
6
+
7
+module.exports = nextConfig

+ 5086
- 0
package-lock.json
Dosya farkı çok büyük olduğundan ihmal edildi
Dosyayı Görüntüle


+ 22
- 0
package.json Dosyayı Görüntüle

@@ -0,0 +1,22 @@
1
+{
2
+  "name": "renacer-api",
3
+  "version": "0.1.0",
4
+  "private": true,
5
+  "scripts": {
6
+    "dev": "next dev",
7
+    "build": "next build",
8
+    "start": "next start",
9
+    "lint": "next lint"
10
+  },
11
+  "dependencies": {
12
+    "@types/node": "18.11.11",
13
+    "@types/react": "18.0.26",
14
+    "@types/react-dom": "18.0.9",
15
+    "eslint": "8.29.0",
16
+    "eslint-config-next": "13.0.6",
17
+    "next": "13.0.6",
18
+    "react": "18.2.0",
19
+    "react-dom": "18.2.0",
20
+    "typescript": "4.9.3"
21
+  }
22
+}

+ 6
- 0
pages/_app.tsx Dosyayı Görüntüle

@@ -0,0 +1,6 @@
1
+import '../styles/globals.css'
2
+import type { AppProps } from 'next/app'
3
+
4
+export default function App({ Component, pageProps }: AppProps) {
5
+  return <Component {...pageProps} />
6
+}

+ 13
- 0
pages/api/hello.ts Dosyayı Görüntüle

@@ -0,0 +1,13 @@
1
+// Next.js API route support: https://nextjs.org/docs/api-routes/introduction
2
+import type { NextApiRequest, NextApiResponse } from 'next'
3
+
4
+type Data = {
5
+  name: string
6
+}
7
+
8
+export default function handler(
9
+  req: NextApiRequest,
10
+  res: NextApiResponse<Data>
11
+) {
12
+  res.status(200).json({ name: 'John Doe' })
13
+}

+ 71
- 0
pages/index.tsx Dosyayı Görüntüle

@@ -0,0 +1,71 @@
1
+import Head from 'next/head'
2
+import Image from 'next/image'
3
+import styles from '../styles/Home.module.css'
4
+
5
+export default function Home() {
6
+  return (
7
+    <div className={styles.container}>
8
+      <Head>
9
+        <title>Create Next App</title>
10
+        <meta name="description" content="Generated by create next app" />
11
+        <link rel="icon" href="/favicon.ico" />
12
+      </Head>
13
+
14
+      <main className={styles.main}>
15
+        <h1 className={styles.title}>
16
+          Welcome to <a href="https://nextjs.org">Next.js!</a>
17
+        </h1>
18
+
19
+        <p className={styles.description}>
20
+          Get started by editing{' '}
21
+          <code className={styles.code}>pages/index.tsx</code>
22
+        </p>
23
+
24
+        <div className={styles.grid}>
25
+          <a href="https://nextjs.org/docs" className={styles.card}>
26
+            <h2>Documentation &rarr;</h2>
27
+            <p>Find in-depth information about Next.js features and API.</p>
28
+          </a>
29
+
30
+          <a href="https://nextjs.org/learn" className={styles.card}>
31
+            <h2>Learn &rarr;</h2>
32
+            <p>Learn about Next.js in an interactive course with quizzes!</p>
33
+          </a>
34
+
35
+          <a
36
+            href="https://github.com/vercel/next.js/tree/canary/examples"
37
+            className={styles.card}
38
+          >
39
+            <h2>Examples &rarr;</h2>
40
+            <p>Discover and deploy boilerplate example Next.js projects.</p>
41
+          </a>
42
+
43
+          <a
44
+            href="https://vercel.com/new?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
45
+            target="_blank"
46
+            rel="noopener noreferrer"
47
+            className={styles.card}
48
+          >
49
+            <h2>Deploy &rarr;</h2>
50
+            <p>
51
+              Instantly deploy your Next.js site to a public URL with Vercel.
52
+            </p>
53
+          </a>
54
+        </div>
55
+      </main>
56
+
57
+      <footer className={styles.footer}>
58
+        <a
59
+          href="https://vercel.com?utm_source=create-next-app&utm_medium=default-template&utm_campaign=create-next-app"
60
+          target="_blank"
61
+          rel="noopener noreferrer"
62
+        >
63
+          Powered by{' '}
64
+          <span className={styles.logo}>
65
+            <Image src="/vercel.svg" alt="Vercel Logo" width={72} height={16} />
66
+          </span>
67
+        </a>
68
+      </footer>
69
+    </div>
70
+  )
71
+}

BIN
public/favicon.ico Dosyayı Görüntüle


+ 4
- 0
public/vercel.svg Dosyayı Görüntüle

@@ -0,0 +1,4 @@
1
+<svg width="283" height="64" viewBox="0 0 283 64" fill="none" 
2
+    xmlns="http://www.w3.org/2000/svg">
3
+    <path d="M141.04 16c-11.04 0-19 7.2-19 18s8.96 18 20 18c6.67 0 12.55-2.64 16.19-7.09l-7.65-4.42c-2.02 2.21-5.09 3.5-8.54 3.5-4.79 0-8.86-2.5-10.37-6.5h28.02c.22-1.12.35-2.28.35-3.5 0-10.79-7.96-17.99-19-17.99zm-9.46 14.5c1.25-3.99 4.67-6.5 9.45-6.5 4.79 0 8.21 2.51 9.45 6.5h-18.9zM248.72 16c-11.04 0-19 7.2-19 18s8.96 18 20 18c6.67 0 12.55-2.64 16.19-7.09l-7.65-4.42c-2.02 2.21-5.09 3.5-8.54 3.5-4.79 0-8.86-2.5-10.37-6.5h28.02c.22-1.12.35-2.28.35-3.5 0-10.79-7.96-17.99-19-17.99zm-9.45 14.5c1.25-3.99 4.67-6.5 9.45-6.5 4.79 0 8.21 2.51 9.45 6.5h-18.9zM200.24 34c0 6 3.92 10 10 10 4.12 0 7.21-1.87 8.8-4.92l7.68 4.43c-3.18 5.3-9.14 8.49-16.48 8.49-11.05 0-19-7.2-19-18s7.96-18 19-18c7.34 0 13.29 3.19 16.48 8.49l-7.68 4.43c-1.59-3.05-4.68-4.92-8.8-4.92-6.07 0-10 4-10 10zm82.48-29v46h-9V5h9zM36.95 0L73.9 64H0L36.95 0zm92.38 5l-27.71 48L73.91 5H84.3l17.32 30 17.32-30h10.39zm58.91 12v9.69c-1-.29-2.06-.49-3.2-.49-5.81 0-10 4-10 10V51h-9V17h9v9.2c0-5.08 5.91-9.2 13.2-9.2z" fill="#000"/>
4
+</svg>

+ 129
- 0
styles/Home.module.css Dosyayı Görüntüle

@@ -0,0 +1,129 @@
1
+.container {
2
+  padding: 0 2rem;
3
+}
4
+
5
+.main {
6
+  min-height: 100vh;
7
+  padding: 4rem 0;
8
+  flex: 1;
9
+  display: flex;
10
+  flex-direction: column;
11
+  justify-content: center;
12
+  align-items: center;
13
+}
14
+
15
+.footer {
16
+  display: flex;
17
+  flex: 1;
18
+  padding: 2rem 0;
19
+  border-top: 1px solid #eaeaea;
20
+  justify-content: center;
21
+  align-items: center;
22
+}
23
+
24
+.footer a {
25
+  display: flex;
26
+  justify-content: center;
27
+  align-items: center;
28
+  flex-grow: 1;
29
+}
30
+
31
+.title a {
32
+  color: #0070f3;
33
+  text-decoration: none;
34
+}
35
+
36
+.title a:hover,
37
+.title a:focus,
38
+.title a:active {
39
+  text-decoration: underline;
40
+}
41
+
42
+.title {
43
+  margin: 0;
44
+  line-height: 1.15;
45
+  font-size: 4rem;
46
+}
47
+
48
+.title,
49
+.description {
50
+  text-align: center;
51
+}
52
+
53
+.description {
54
+  margin: 4rem 0;
55
+  line-height: 1.5;
56
+  font-size: 1.5rem;
57
+}
58
+
59
+.code {
60
+  background: #fafafa;
61
+  border-radius: 5px;
62
+  padding: 0.75rem;
63
+  font-size: 1.1rem;
64
+  font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono,
65
+    Bitstream Vera Sans Mono, Courier New, monospace;
66
+}
67
+
68
+.grid {
69
+  display: flex;
70
+  align-items: center;
71
+  justify-content: center;
72
+  flex-wrap: wrap;
73
+  max-width: 800px;
74
+}
75
+
76
+.card {
77
+  margin: 1rem;
78
+  padding: 1.5rem;
79
+  text-align: left;
80
+  color: inherit;
81
+  text-decoration: none;
82
+  border: 1px solid #eaeaea;
83
+  border-radius: 10px;
84
+  transition: color 0.15s ease, border-color 0.15s ease;
85
+  max-width: 300px;
86
+}
87
+
88
+.card:hover,
89
+.card:focus,
90
+.card:active {
91
+  color: #0070f3;
92
+  border-color: #0070f3;
93
+}
94
+
95
+.card h2 {
96
+  margin: 0 0 1rem 0;
97
+  font-size: 1.5rem;
98
+}
99
+
100
+.card p {
101
+  margin: 0;
102
+  font-size: 1.25rem;
103
+  line-height: 1.5;
104
+}
105
+
106
+.logo {
107
+  height: 1em;
108
+  margin-left: 0.5rem;
109
+}
110
+
111
+@media (max-width: 600px) {
112
+  .grid {
113
+    width: 100%;
114
+    flex-direction: column;
115
+  }
116
+}
117
+
118
+@media (prefers-color-scheme: dark) {
119
+  .card,
120
+  .footer {
121
+    border-color: #222;
122
+  }
123
+  .code {
124
+    background: #111;
125
+  }
126
+  .logo img {
127
+    filter: invert(1);
128
+  }
129
+}

+ 26
- 0
styles/globals.css Dosyayı Görüntüle

@@ -0,0 +1,26 @@
1
+html,
2
+body {
3
+  padding: 0;
4
+  margin: 0;
5
+  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
6
+    Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
7
+}
8
+
9
+a {
10
+  color: inherit;
11
+  text-decoration: none;
12
+}
13
+
14
+* {
15
+  box-sizing: border-box;
16
+}
17
+
18
+@media (prefers-color-scheme: dark) {
19
+  html {
20
+    color-scheme: dark;
21
+  }
22
+  body {
23
+    color: white;
24
+    background: black;
25
+  }
26
+}

+ 20
- 0
tsconfig.json Dosyayı Görüntüle

@@ -0,0 +1,20 @@
1
+{
2
+  "compilerOptions": {
3
+    "target": "es5",
4
+    "lib": ["dom", "dom.iterable", "esnext"],
5
+    "allowJs": true,
6
+    "skipLibCheck": true,
7
+    "strict": true,
8
+    "forceConsistentCasingInFileNames": true,
9
+    "noEmit": true,
10
+    "esModuleInterop": true,
11
+    "module": "esnext",
12
+    "moduleResolution": "node",
13
+    "resolveJsonModule": true,
14
+    "isolatedModules": true,
15
+    "jsx": "preserve",
16
+    "incremental": true
17
+  },
18
+  "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
19
+  "exclude": ["node_modules"]
20
+}