├── .gitignore
├── components
└── layout.js
├── package-lock.json
├── package.json
├── pages
├── _app.js
├── about.js
├── blog.js
├── blog
│ └── [slug].js
└── index.js
└── styles
├── global.css
└── post.module.css
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | .next
3 | out
4 | build
5 | .DS_Store
--------------------------------------------------------------------------------
/components/layout.js:
--------------------------------------------------------------------------------
1 | import Link from "next/link"
2 | import { useRouter } from "next/router"
3 |
4 | export default function Layout({ children }) {
5 | const router = useRouter()
6 |
7 | return (
8 | <>
9 |
10 |
OurSite
11 |
12 |
13 |
14 |
15 | Home
16 |
17 |
18 |
19 |
20 | About
21 |
22 |
23 |
24 |
25 | Blog
26 |
27 |
28 |
29 |
30 |
31 | {children}
32 |
33 |
Footer text, all rights reserved ©
34 |
35 | >
36 | )
37 | }
38 |
--------------------------------------------------------------------------------
/package-lock.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "new-clean-minimal",
3 | "version": "1.0.0",
4 | "lockfileVersion": 2,
5 | "requires": true,
6 | "packages": {
7 | "": {
8 | "name": "new-clean-minimal",
9 | "version": "1.0.0",
10 | "license": "ISC",
11 | "dependencies": {
12 | "next": "^13.1.2",
13 | "react": "^18.2.0",
14 | "react-dom": "^18.2.0"
15 | }
16 | },
17 | "node_modules/@next/env": {
18 | "version": "13.1.2",
19 | "resolved": "https://registry.npmjs.org/@next/env/-/env-13.1.2.tgz",
20 | "integrity": "sha512-PpT4UZIX66VMTqXt4HKEJ+/PwbS+tWmmhZlazaws1a+dbUA5pPdjntQ46Jvj616i3ZKN9doS9LHx3y50RLjAWg=="
21 | },
22 | "node_modules/@next/swc-android-arm-eabi": {
23 | "version": "13.1.2",
24 | "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.1.2.tgz",
25 | "integrity": "sha512-7mRz1owoGsbfIcdOJA3kk7KEwPZ+OvVT1z9DkR/yru4QdVLF69h/1SHy0vlUNQMxDRllabhxCfkoZCB34GOGAg==",
26 | "cpu": [
27 | "arm"
28 | ],
29 | "optional": true,
30 | "os": [
31 | "android"
32 | ],
33 | "engines": {
34 | "node": ">= 10"
35 | }
36 | },
37 | "node_modules/@next/swc-android-arm64": {
38 | "version": "13.1.2",
39 | "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.1.2.tgz",
40 | "integrity": "sha512-mgjZ2eJSayovQm1LcE54BLSI4jjnnnLtq5GY5g+DdPuUiCT644gKtjZ/w2BQvuIecCqqBO+Ph9yzo/wUTq7NLg==",
41 | "cpu": [
42 | "arm64"
43 | ],
44 | "optional": true,
45 | "os": [
46 | "android"
47 | ],
48 | "engines": {
49 | "node": ">= 10"
50 | }
51 | },
52 | "node_modules/@next/swc-darwin-arm64": {
53 | "version": "13.1.2",
54 | "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.1.2.tgz",
55 | "integrity": "sha512-RikoQqy109r2222UJlyGs4dZw2BibkfPqpeFdW5JEGv+L2PStlHID8DwyVYbmHfQ0VIBGvbf/NAUtFakAWlhwg==",
56 | "cpu": [
57 | "arm64"
58 | ],
59 | "optional": true,
60 | "os": [
61 | "darwin"
62 | ],
63 | "engines": {
64 | "node": ">= 10"
65 | }
66 | },
67 | "node_modules/@next/swc-darwin-x64": {
68 | "version": "13.1.2",
69 | "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.1.2.tgz",
70 | "integrity": "sha512-JbDZjaTvL8gyPC5TAH6OnD4jmXPkyUxRYPvu08ZmhT/XAFBb/Cso0BdXyDax/BPCG70mimP9d3hXNKNq+A0VtQ==",
71 | "cpu": [
72 | "x64"
73 | ],
74 | "optional": true,
75 | "os": [
76 | "darwin"
77 | ],
78 | "engines": {
79 | "node": ">= 10"
80 | }
81 | },
82 | "node_modules/@next/swc-freebsd-x64": {
83 | "version": "13.1.2",
84 | "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.1.2.tgz",
85 | "integrity": "sha512-ax4j8VrdFQ/xc3W7Om0u1vnDxVApQHKsChBbAMynCrnycZmpbqK4MZu4ZkycT+mx2eccCiqZROpbzDbEdPosEw==",
86 | "cpu": [
87 | "x64"
88 | ],
89 | "optional": true,
90 | "os": [
91 | "freebsd"
92 | ],
93 | "engines": {
94 | "node": ">= 10"
95 | }
96 | },
97 | "node_modules/@next/swc-linux-arm-gnueabihf": {
98 | "version": "13.1.2",
99 | "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.1.2.tgz",
100 | "integrity": "sha512-NcRHTesnCxnUvSJa637PQJffBBkmqi5XS/xVWGY7dI6nyJ+pC96Oj7kd+mcjnFUQI5lHKbg39qBWKtOzbezc4w==",
101 | "cpu": [
102 | "arm"
103 | ],
104 | "optional": true,
105 | "os": [
106 | "linux"
107 | ],
108 | "engines": {
109 | "node": ">= 10"
110 | }
111 | },
112 | "node_modules/@next/swc-linux-arm64-gnu": {
113 | "version": "13.1.2",
114 | "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.1.2.tgz",
115 | "integrity": "sha512-AxJdjocLtPrsBY4P2COSBIc3crT5bpjgGenNuINoensOlXhBkYM0aRDYZdydwXOhG+kN2ngUvfgitop9pa204w==",
116 | "cpu": [
117 | "arm64"
118 | ],
119 | "optional": true,
120 | "os": [
121 | "linux"
122 | ],
123 | "engines": {
124 | "node": ">= 10"
125 | }
126 | },
127 | "node_modules/@next/swc-linux-arm64-musl": {
128 | "version": "13.1.2",
129 | "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.1.2.tgz",
130 | "integrity": "sha512-JmNimDkcCRq7P5zpkdqeaSZ69qKDntEPtyIaMNWqy5M0WUJxGim0Fs6Qzxayiyvuuh9Guxks4woQ/j/ZvX/c8Q==",
131 | "cpu": [
132 | "arm64"
133 | ],
134 | "optional": true,
135 | "os": [
136 | "linux"
137 | ],
138 | "engines": {
139 | "node": ">= 10"
140 | }
141 | },
142 | "node_modules/@next/swc-linux-x64-gnu": {
143 | "version": "13.1.2",
144 | "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.1.2.tgz",
145 | "integrity": "sha512-TsLsjZwUlgmvI42neTuIoD6K9RlXCUzqPtvIClgXxVO0um0DiZwK+M+0zX/uVXhMVphfPY2c5YeR1zFSIONY4A==",
146 | "cpu": [
147 | "x64"
148 | ],
149 | "optional": true,
150 | "os": [
151 | "linux"
152 | ],
153 | "engines": {
154 | "node": ">= 10"
155 | }
156 | },
157 | "node_modules/@next/swc-linux-x64-musl": {
158 | "version": "13.1.2",
159 | "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.1.2.tgz",
160 | "integrity": "sha512-eSkyXgCXydEFPTkcncQOGepafedPte6JT/OofB9uvruucrrMVBagCASOuPxodWEMrlfEKSXVnExMKIlfmQMD7A==",
161 | "cpu": [
162 | "x64"
163 | ],
164 | "optional": true,
165 | "os": [
166 | "linux"
167 | ],
168 | "engines": {
169 | "node": ">= 10"
170 | }
171 | },
172 | "node_modules/@next/swc-win32-arm64-msvc": {
173 | "version": "13.1.2",
174 | "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.1.2.tgz",
175 | "integrity": "sha512-DmXFaRTgt2KrV9dmRLifDJE+cYiutHVFIw5/C9BtnwXH39uf3YbPxeD98vNrtqqqZVVLXY/1ySaSIwzYnqeY9g==",
176 | "cpu": [
177 | "arm64"
178 | ],
179 | "optional": true,
180 | "os": [
181 | "win32"
182 | ],
183 | "engines": {
184 | "node": ">= 10"
185 | }
186 | },
187 | "node_modules/@next/swc-win32-ia32-msvc": {
188 | "version": "13.1.2",
189 | "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.1.2.tgz",
190 | "integrity": "sha512-3+nBkuFs/wT+lmRVQNH5SyDT7I4vUlNPntosEaEP63FuYQdPLaxz0GvcR66MdFSFh2fsvazpe4wciOwVS4FItQ==",
191 | "cpu": [
192 | "ia32"
193 | ],
194 | "optional": true,
195 | "os": [
196 | "win32"
197 | ],
198 | "engines": {
199 | "node": ">= 10"
200 | }
201 | },
202 | "node_modules/@next/swc-win32-x64-msvc": {
203 | "version": "13.1.2",
204 | "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.1.2.tgz",
205 | "integrity": "sha512-avsyveEvcvH42PvKjR4Pb8JlLttuGURr2H3ZhS2b85pHOiZ7yjH3rMUoGnNzuLMApyxYaCvd4MedPrLhnNhkog==",
206 | "cpu": [
207 | "x64"
208 | ],
209 | "optional": true,
210 | "os": [
211 | "win32"
212 | ],
213 | "engines": {
214 | "node": ">= 10"
215 | }
216 | },
217 | "node_modules/@swc/helpers": {
218 | "version": "0.4.14",
219 | "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.14.tgz",
220 | "integrity": "sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==",
221 | "dependencies": {
222 | "tslib": "^2.4.0"
223 | }
224 | },
225 | "node_modules/caniuse-lite": {
226 | "version": "1.0.30001445",
227 | "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001445.tgz",
228 | "integrity": "sha512-8sdQIdMztYmzfTMO6KfLny878Ln9c2M0fc7EH60IjlP4Dc4PiCy7K2Vl3ITmWgOyPgVQKa5x+UP/KqFsxj4mBg==",
229 | "funding": [
230 | {
231 | "type": "opencollective",
232 | "url": "https://opencollective.com/browserslist"
233 | },
234 | {
235 | "type": "tidelift",
236 | "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
237 | }
238 | ]
239 | },
240 | "node_modules/client-only": {
241 | "version": "0.0.1",
242 | "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
243 | "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="
244 | },
245 | "node_modules/js-tokens": {
246 | "version": "4.0.0",
247 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
248 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
249 | },
250 | "node_modules/loose-envify": {
251 | "version": "1.4.0",
252 | "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
253 | "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
254 | "dependencies": {
255 | "js-tokens": "^3.0.0 || ^4.0.0"
256 | },
257 | "bin": {
258 | "loose-envify": "cli.js"
259 | }
260 | },
261 | "node_modules/nanoid": {
262 | "version": "3.3.4",
263 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
264 | "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==",
265 | "bin": {
266 | "nanoid": "bin/nanoid.cjs"
267 | },
268 | "engines": {
269 | "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
270 | }
271 | },
272 | "node_modules/next": {
273 | "version": "13.1.2",
274 | "resolved": "https://registry.npmjs.org/next/-/next-13.1.2.tgz",
275 | "integrity": "sha512-Rdnnb2YH///w78FEOR/IQ6TXga+qpth4OqFSem48ng1PYYKr6XBsIk1XVaRcIGM3o6iiHnun0nJvkJHDf+ICyQ==",
276 | "dependencies": {
277 | "@next/env": "13.1.2",
278 | "@swc/helpers": "0.4.14",
279 | "caniuse-lite": "^1.0.30001406",
280 | "postcss": "8.4.14",
281 | "styled-jsx": "5.1.1"
282 | },
283 | "bin": {
284 | "next": "dist/bin/next"
285 | },
286 | "engines": {
287 | "node": ">=14.6.0"
288 | },
289 | "optionalDependencies": {
290 | "@next/swc-android-arm-eabi": "13.1.2",
291 | "@next/swc-android-arm64": "13.1.2",
292 | "@next/swc-darwin-arm64": "13.1.2",
293 | "@next/swc-darwin-x64": "13.1.2",
294 | "@next/swc-freebsd-x64": "13.1.2",
295 | "@next/swc-linux-arm-gnueabihf": "13.1.2",
296 | "@next/swc-linux-arm64-gnu": "13.1.2",
297 | "@next/swc-linux-arm64-musl": "13.1.2",
298 | "@next/swc-linux-x64-gnu": "13.1.2",
299 | "@next/swc-linux-x64-musl": "13.1.2",
300 | "@next/swc-win32-arm64-msvc": "13.1.2",
301 | "@next/swc-win32-ia32-msvc": "13.1.2",
302 | "@next/swc-win32-x64-msvc": "13.1.2"
303 | },
304 | "peerDependencies": {
305 | "fibers": ">= 3.1.0",
306 | "node-sass": "^6.0.0 || ^7.0.0",
307 | "react": "^18.2.0",
308 | "react-dom": "^18.2.0",
309 | "sass": "^1.3.0"
310 | },
311 | "peerDependenciesMeta": {
312 | "fibers": {
313 | "optional": true
314 | },
315 | "node-sass": {
316 | "optional": true
317 | },
318 | "sass": {
319 | "optional": true
320 | }
321 | }
322 | },
323 | "node_modules/picocolors": {
324 | "version": "1.0.0",
325 | "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
326 | "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
327 | },
328 | "node_modules/postcss": {
329 | "version": "8.4.14",
330 | "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz",
331 | "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==",
332 | "funding": [
333 | {
334 | "type": "opencollective",
335 | "url": "https://opencollective.com/postcss/"
336 | },
337 | {
338 | "type": "tidelift",
339 | "url": "https://tidelift.com/funding/github/npm/postcss"
340 | }
341 | ],
342 | "dependencies": {
343 | "nanoid": "^3.3.4",
344 | "picocolors": "^1.0.0",
345 | "source-map-js": "^1.0.2"
346 | },
347 | "engines": {
348 | "node": "^10 || ^12 || >=14"
349 | }
350 | },
351 | "node_modules/react": {
352 | "version": "18.2.0",
353 | "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
354 | "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",
355 | "dependencies": {
356 | "loose-envify": "^1.1.0"
357 | },
358 | "engines": {
359 | "node": ">=0.10.0"
360 | }
361 | },
362 | "node_modules/react-dom": {
363 | "version": "18.2.0",
364 | "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
365 | "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",
366 | "dependencies": {
367 | "loose-envify": "^1.1.0",
368 | "scheduler": "^0.23.0"
369 | },
370 | "peerDependencies": {
371 | "react": "^18.2.0"
372 | }
373 | },
374 | "node_modules/scheduler": {
375 | "version": "0.23.0",
376 | "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz",
377 | "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==",
378 | "dependencies": {
379 | "loose-envify": "^1.1.0"
380 | }
381 | },
382 | "node_modules/source-map-js": {
383 | "version": "1.0.2",
384 | "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
385 | "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
386 | "engines": {
387 | "node": ">=0.10.0"
388 | }
389 | },
390 | "node_modules/styled-jsx": {
391 | "version": "5.1.1",
392 | "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.1.tgz",
393 | "integrity": "sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==",
394 | "dependencies": {
395 | "client-only": "0.0.1"
396 | },
397 | "engines": {
398 | "node": ">= 12.0.0"
399 | },
400 | "peerDependencies": {
401 | "react": ">= 16.8.0 || 17.x.x || ^18.0.0-0"
402 | },
403 | "peerDependenciesMeta": {
404 | "@babel/core": {
405 | "optional": true
406 | },
407 | "babel-plugin-macros": {
408 | "optional": true
409 | }
410 | }
411 | },
412 | "node_modules/tslib": {
413 | "version": "2.4.1",
414 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
415 | "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="
416 | }
417 | },
418 | "dependencies": {
419 | "@next/env": {
420 | "version": "13.1.2",
421 | "resolved": "https://registry.npmjs.org/@next/env/-/env-13.1.2.tgz",
422 | "integrity": "sha512-PpT4UZIX66VMTqXt4HKEJ+/PwbS+tWmmhZlazaws1a+dbUA5pPdjntQ46Jvj616i3ZKN9doS9LHx3y50RLjAWg=="
423 | },
424 | "@next/swc-android-arm-eabi": {
425 | "version": "13.1.2",
426 | "resolved": "https://registry.npmjs.org/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-13.1.2.tgz",
427 | "integrity": "sha512-7mRz1owoGsbfIcdOJA3kk7KEwPZ+OvVT1z9DkR/yru4QdVLF69h/1SHy0vlUNQMxDRllabhxCfkoZCB34GOGAg==",
428 | "optional": true
429 | },
430 | "@next/swc-android-arm64": {
431 | "version": "13.1.2",
432 | "resolved": "https://registry.npmjs.org/@next/swc-android-arm64/-/swc-android-arm64-13.1.2.tgz",
433 | "integrity": "sha512-mgjZ2eJSayovQm1LcE54BLSI4jjnnnLtq5GY5g+DdPuUiCT644gKtjZ/w2BQvuIecCqqBO+Ph9yzo/wUTq7NLg==",
434 | "optional": true
435 | },
436 | "@next/swc-darwin-arm64": {
437 | "version": "13.1.2",
438 | "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-13.1.2.tgz",
439 | "integrity": "sha512-RikoQqy109r2222UJlyGs4dZw2BibkfPqpeFdW5JEGv+L2PStlHID8DwyVYbmHfQ0VIBGvbf/NAUtFakAWlhwg==",
440 | "optional": true
441 | },
442 | "@next/swc-darwin-x64": {
443 | "version": "13.1.2",
444 | "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-13.1.2.tgz",
445 | "integrity": "sha512-JbDZjaTvL8gyPC5TAH6OnD4jmXPkyUxRYPvu08ZmhT/XAFBb/Cso0BdXyDax/BPCG70mimP9d3hXNKNq+A0VtQ==",
446 | "optional": true
447 | },
448 | "@next/swc-freebsd-x64": {
449 | "version": "13.1.2",
450 | "resolved": "https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-13.1.2.tgz",
451 | "integrity": "sha512-ax4j8VrdFQ/xc3W7Om0u1vnDxVApQHKsChBbAMynCrnycZmpbqK4MZu4ZkycT+mx2eccCiqZROpbzDbEdPosEw==",
452 | "optional": true
453 | },
454 | "@next/swc-linux-arm-gnueabihf": {
455 | "version": "13.1.2",
456 | "resolved": "https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-13.1.2.tgz",
457 | "integrity": "sha512-NcRHTesnCxnUvSJa637PQJffBBkmqi5XS/xVWGY7dI6nyJ+pC96Oj7kd+mcjnFUQI5lHKbg39qBWKtOzbezc4w==",
458 | "optional": true
459 | },
460 | "@next/swc-linux-arm64-gnu": {
461 | "version": "13.1.2",
462 | "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-13.1.2.tgz",
463 | "integrity": "sha512-AxJdjocLtPrsBY4P2COSBIc3crT5bpjgGenNuINoensOlXhBkYM0aRDYZdydwXOhG+kN2ngUvfgitop9pa204w==",
464 | "optional": true
465 | },
466 | "@next/swc-linux-arm64-musl": {
467 | "version": "13.1.2",
468 | "resolved": "https://registry.npmjs.org/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-13.1.2.tgz",
469 | "integrity": "sha512-JmNimDkcCRq7P5zpkdqeaSZ69qKDntEPtyIaMNWqy5M0WUJxGim0Fs6Qzxayiyvuuh9Guxks4woQ/j/ZvX/c8Q==",
470 | "optional": true
471 | },
472 | "@next/swc-linux-x64-gnu": {
473 | "version": "13.1.2",
474 | "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-13.1.2.tgz",
475 | "integrity": "sha512-TsLsjZwUlgmvI42neTuIoD6K9RlXCUzqPtvIClgXxVO0um0DiZwK+M+0zX/uVXhMVphfPY2c5YeR1zFSIONY4A==",
476 | "optional": true
477 | },
478 | "@next/swc-linux-x64-musl": {
479 | "version": "13.1.2",
480 | "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-13.1.2.tgz",
481 | "integrity": "sha512-eSkyXgCXydEFPTkcncQOGepafedPte6JT/OofB9uvruucrrMVBagCASOuPxodWEMrlfEKSXVnExMKIlfmQMD7A==",
482 | "optional": true
483 | },
484 | "@next/swc-win32-arm64-msvc": {
485 | "version": "13.1.2",
486 | "resolved": "https://registry.npmjs.org/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-13.1.2.tgz",
487 | "integrity": "sha512-DmXFaRTgt2KrV9dmRLifDJE+cYiutHVFIw5/C9BtnwXH39uf3YbPxeD98vNrtqqqZVVLXY/1ySaSIwzYnqeY9g==",
488 | "optional": true
489 | },
490 | "@next/swc-win32-ia32-msvc": {
491 | "version": "13.1.2",
492 | "resolved": "https://registry.npmjs.org/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-13.1.2.tgz",
493 | "integrity": "sha512-3+nBkuFs/wT+lmRVQNH5SyDT7I4vUlNPntosEaEP63FuYQdPLaxz0GvcR66MdFSFh2fsvazpe4wciOwVS4FItQ==",
494 | "optional": true
495 | },
496 | "@next/swc-win32-x64-msvc": {
497 | "version": "13.1.2",
498 | "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.1.2.tgz",
499 | "integrity": "sha512-avsyveEvcvH42PvKjR4Pb8JlLttuGURr2H3ZhS2b85pHOiZ7yjH3rMUoGnNzuLMApyxYaCvd4MedPrLhnNhkog==",
500 | "optional": true
501 | },
502 | "@swc/helpers": {
503 | "version": "0.4.14",
504 | "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.4.14.tgz",
505 | "integrity": "sha512-4C7nX/dvpzB7za4Ql9K81xK3HPxCpHMgwTZVyf+9JQ6VUbn9jjZVN7/Nkdz/Ugzs2CSjqnL/UPXroiVBVHUWUw==",
506 | "requires": {
507 | "tslib": "^2.4.0"
508 | }
509 | },
510 | "caniuse-lite": {
511 | "version": "1.0.30001445",
512 | "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001445.tgz",
513 | "integrity": "sha512-8sdQIdMztYmzfTMO6KfLny878Ln9c2M0fc7EH60IjlP4Dc4PiCy7K2Vl3ITmWgOyPgVQKa5x+UP/KqFsxj4mBg=="
514 | },
515 | "client-only": {
516 | "version": "0.0.1",
517 | "resolved": "https://registry.npmjs.org/client-only/-/client-only-0.0.1.tgz",
518 | "integrity": "sha512-IV3Ou0jSMzZrd3pZ48nLkT9DA7Ag1pnPzaiQhpW7c3RbcqqzvzzVu+L8gfqMp/8IM2MQtSiqaCxrrcfu8I8rMA=="
519 | },
520 | "js-tokens": {
521 | "version": "4.0.0",
522 | "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
523 | "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ=="
524 | },
525 | "loose-envify": {
526 | "version": "1.4.0",
527 | "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
528 | "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
529 | "requires": {
530 | "js-tokens": "^3.0.0 || ^4.0.0"
531 | }
532 | },
533 | "nanoid": {
534 | "version": "3.3.4",
535 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
536 | "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw=="
537 | },
538 | "next": {
539 | "version": "13.1.2",
540 | "resolved": "https://registry.npmjs.org/next/-/next-13.1.2.tgz",
541 | "integrity": "sha512-Rdnnb2YH///w78FEOR/IQ6TXga+qpth4OqFSem48ng1PYYKr6XBsIk1XVaRcIGM3o6iiHnun0nJvkJHDf+ICyQ==",
542 | "requires": {
543 | "@next/env": "13.1.2",
544 | "@next/swc-android-arm-eabi": "13.1.2",
545 | "@next/swc-android-arm64": "13.1.2",
546 | "@next/swc-darwin-arm64": "13.1.2",
547 | "@next/swc-darwin-x64": "13.1.2",
548 | "@next/swc-freebsd-x64": "13.1.2",
549 | "@next/swc-linux-arm-gnueabihf": "13.1.2",
550 | "@next/swc-linux-arm64-gnu": "13.1.2",
551 | "@next/swc-linux-arm64-musl": "13.1.2",
552 | "@next/swc-linux-x64-gnu": "13.1.2",
553 | "@next/swc-linux-x64-musl": "13.1.2",
554 | "@next/swc-win32-arm64-msvc": "13.1.2",
555 | "@next/swc-win32-ia32-msvc": "13.1.2",
556 | "@next/swc-win32-x64-msvc": "13.1.2",
557 | "@swc/helpers": "0.4.14",
558 | "caniuse-lite": "^1.0.30001406",
559 | "postcss": "8.4.14",
560 | "styled-jsx": "5.1.1"
561 | }
562 | },
563 | "picocolors": {
564 | "version": "1.0.0",
565 | "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
566 | "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
567 | },
568 | "postcss": {
569 | "version": "8.4.14",
570 | "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.14.tgz",
571 | "integrity": "sha512-E398TUmfAYFPBSdzgeieK2Y1+1cpdxJx8yXbK/m57nRhKSmk1GB2tO4lbLBtlkfPQTDKfe4Xqv1ASWPpayPEig==",
572 | "requires": {
573 | "nanoid": "^3.3.4",
574 | "picocolors": "^1.0.0",
575 | "source-map-js": "^1.0.2"
576 | }
577 | },
578 | "react": {
579 | "version": "18.2.0",
580 | "resolved": "https://registry.npmjs.org/react/-/react-18.2.0.tgz",
581 | "integrity": "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==",
582 | "requires": {
583 | "loose-envify": "^1.1.0"
584 | }
585 | },
586 | "react-dom": {
587 | "version": "18.2.0",
588 | "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz",
589 | "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==",
590 | "requires": {
591 | "loose-envify": "^1.1.0",
592 | "scheduler": "^0.23.0"
593 | }
594 | },
595 | "scheduler": {
596 | "version": "0.23.0",
597 | "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz",
598 | "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==",
599 | "requires": {
600 | "loose-envify": "^1.1.0"
601 | }
602 | },
603 | "source-map-js": {
604 | "version": "1.0.2",
605 | "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
606 | "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw=="
607 | },
608 | "styled-jsx": {
609 | "version": "5.1.1",
610 | "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-5.1.1.tgz",
611 | "integrity": "sha512-pW7uC1l4mBZ8ugbiZrcIsiIvVx1UmTfw7UkC3Um2tmfUq9Bhk8IiyEIPl6F8agHgjzku6j0xQEZbfA5uSgSaCw==",
612 | "requires": {
613 | "client-only": "0.0.1"
614 | }
615 | },
616 | "tslib": {
617 | "version": "2.4.1",
618 | "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.1.tgz",
619 | "integrity": "sha512-tGyy4dAjRIEwI7BzsB0lynWgOpfqjUdq91XXAlIWD2OwKBH7oCl/GZG/HT4BOHrTlPMOASlMQ7veyTqpmRcrNA=="
620 | }
621 | }
622 | }
623 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "new-clean-minimal",
3 | "version": "1.0.0",
4 | "description": "",
5 | "main": "index.js",
6 | "scripts": {
7 | "dev": "next dev",
8 | "build": "next build",
9 | "start": "next start",
10 | "lint": "next lint"
11 | },
12 | "keywords": [],
13 | "author": "",
14 | "license": "ISC",
15 | "dependencies": {
16 | "next": "^13.1.2",
17 | "react": "^18.2.0",
18 | "react-dom": "^18.2.0"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/pages/_app.js:
--------------------------------------------------------------------------------
1 | import "../styles/global.css"
2 | import Layout from "../components/layout.js"
3 | import Head from "next/head"
4 |
5 | export default function AppWrapper({ Component, pageProps }) {
6 | return (
7 | <>
8 |
9 | {pageProps.title ? pageProps.title : "Our Basic Title"}
10 |
11 |
12 |
13 |
14 | >
15 | )
16 | }
17 |
--------------------------------------------------------------------------------
/pages/about.js:
--------------------------------------------------------------------------------
1 | export default function About(props) {
2 | return (
3 | <>
4 | About Us
5 | Welcome to this amazing about page. Lorem ipsum dolor, sit amet consectetur adipisicing elit. Porro dolore officiis atque voluptas, quas, repellendus cum, magnam a alias unde reiciendis voluptates aliquam maxime laborum? Quae omnis eius impedit et?
6 | I have {props.repoCount} public repos on GitHub.
7 | >
8 | )
9 | }
10 |
11 | export async function getStaticProps() {
12 | const response = await fetch("https://api.github.com/users/learnwebcode")
13 | const data = await response.json()
14 |
15 | return {
16 | props: {
17 | repoCount: data.public_repos
18 | },
19 | revalidate: 10
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/pages/blog.js:
--------------------------------------------------------------------------------
1 | import Link from "next/link"
2 |
3 | export default function Blog(props) {
4 | return (
5 | <>
6 | The Blog
7 | {props.posts.map((post, index) => {
8 | return (
9 |
10 |
11 | {post.title}
12 |
13 |
{post.content}
14 |
15 |
16 | )
17 | })}
18 | >
19 | )
20 | }
21 |
22 | export async function getStaticProps() {
23 | const response = await fetch("https://learnwebcode.github.io/json-example/posts.json")
24 | const data = await response.json()
25 |
26 | return {
27 | props: {
28 | posts: data.posts
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/pages/blog/[slug].js:
--------------------------------------------------------------------------------
1 | import Link from "next/link"
2 | import { useRouter } from "next/router"
3 | import styles from "../../styles/post.module.css"
4 |
5 | export default function Post(props) {
6 | const router = useRouter()
7 | return (
8 | <>
9 |
10 |
11 | « back to all blog posts
12 |
13 |
14 | {props.post.title}
15 | {props.post.content}
16 | router.push("/blog")}>
17 | Click me to programmatically navigate or redirect
18 |
19 | >
20 | )
21 | }
22 |
23 | export async function getStaticPaths() {
24 | const response = await fetch("https://learnwebcode.github.io/json-example/posts.json")
25 | const data = await response.json()
26 |
27 | const thePaths = data.posts.map(pet => {
28 | return { params: { slug: pet.slug } }
29 | })
30 |
31 | return {
32 | paths: thePaths,
33 | fallback: false
34 | }
35 | }
36 |
37 | export async function getStaticProps(context) {
38 | const response = await fetch("https://learnwebcode.github.io/json-example/posts.json")
39 | const data = await response.json()
40 | const thePost = data.posts.filter(post => post.slug === context.params.slug)[0]
41 |
42 | return {
43 | props: {
44 | post: thePost,
45 | title: thePost.title
46 | }
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/pages/index.js:
--------------------------------------------------------------------------------
1 | export default function Home(props) {
2 | return (
3 |
4 |
Welcome to our homepage.
5 |
This is the best home page in the world. Lorem ipsum dolor sit amet, consectetur adipisicing elit. Earum aspernatur illum architecto cumque recusandae fuga sequi necessitatibus deleniti repellat harum nobis, dolor veniam vero deserunt. Voluptatibus, ducimus deserunt. Recusandae, dolore.
6 |
The weather: {props.forecast}
7 |
8 | )
9 | }
10 |
11 | export async function getServerSideProps() {
12 | const response = await fetch("https://api.weather.gov/gridpoints/MFL/109,49/forecast")
13 | const data = await response.json()
14 |
15 | return {
16 | props: {
17 | forecast: data.properties.periods[0].detailedForecast
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/styles/global.css:
--------------------------------------------------------------------------------
1 | body,
2 | html {
3 | margin: 0;
4 | padding: 0;
5 | }
6 |
7 | body {
8 | font-family: sans-serif;
9 | padding: 10px 20px;
10 | line-height: 1.6;
11 | }
12 |
13 | .header-nav ul {
14 | margin: 0;
15 | padding: 0;
16 | display: flex;
17 | list-style: none;
18 | }
19 |
20 | .header-nav a {
21 | color: #a7a7a7;
22 | margin-right: 10px;
23 | font-size: 0.9rem;
24 | }
25 |
26 | .header-nav a.active {
27 | color: #222;
28 | }
29 |
30 | .site-footer {
31 | margin-top: 1rem;
32 | border-top: 1px dotted #adadad;
33 | text-align: center;
34 | color: #999;
35 | font-size: 0.75rem;
36 | }
37 |
--------------------------------------------------------------------------------
/styles/post.module.css:
--------------------------------------------------------------------------------
1 | .button {
2 | background-color: blue;
3 | padding: 10px;
4 | border-radius: 5px;
5 | border: none;
6 | box-shadow: 3px 3px 3px rgba(0, 0, 0, 0.2);
7 | color: white;
8 | font-weight: bold;
9 | }
10 |
11 | .title {
12 | font-weight: normal;
13 | font-size: 3rem;
14 | margin: 32px 0;
15 | line-height: 1;
16 | }
17 |
--------------------------------------------------------------------------------