Skip to content

Commit 87b8ce8

Browse files
committed
nextjs 16
1 parent 48ec71e commit 87b8ce8

File tree

8 files changed

+897
-535
lines changed

8 files changed

+897
-535
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Deploy Next.js to GitHub Pages with GitHub Actions. [View the deployed app](https://gregrickaby.github.io/nextjs-github-pages/) 🚀
44

5-
> ⚠️ Heads up! GitHub Pages _does not_ support serverless or edge functions. This means dynamic functionality will be disabled. See all the [unsupported features](https://nextjs.org/docs/app/building-your-application/deploying/static-exports#unsupported-features).
5+
> ⚠️ Heads up! GitHub Pages _is not_ a Node.js server. So dynamic logic that cannot be computed during the build process, are not supported! See all the [unsupported features](https://nextjs.org/docs/app/building-your-application/deploying/static-exports#unsupported-features).
66
77
---
88

@@ -120,6 +120,6 @@ You should see your site deployed to GitHub Pages in a few minutes. 🚀
120120

121121
## Wrap up
122122

123-
Thanks for reading and I hope this helps. If you noticed someting wrong, please [open an issue](https://github.com/gregrickaby/nextjs-github-pages/issues). Cheers! 🍻
123+
Thanks for reading and I hope this helps. If you noticed something wrong, please [open an issue](https://github.com/gregrickaby/nextjs-github-pages/issues). Cheers! 🍻
124124

125125
---

app/globals.css

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
--foreground: #171717;
66
}
77

8+
@theme inline {
9+
--color-background: var(--background);
10+
--color-foreground: var(--foreground);
11+
--font-sans: var(--font-geist-sans);
12+
--font-mono: var(--font-geist-mono);
13+
}
14+
815
@media (prefers-color-scheme: dark) {
916
:root {
1017
--background: #0a0a0a;
@@ -13,7 +20,7 @@
1320
}
1421

1522
body {
16-
color: var(--foreground);
1723
background: var(--background);
24+
color: var(--foreground);
1825
font-family: Arial, Helvetica, sans-serif;
1926
}

app/page.tsx

Lines changed: 33 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,41 @@ import Image from "next/image";
22

33
export default function Home() {
44
return (
5-
<div className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]">
6-
<main className="flex flex-col gap-8 row-start-2 items-center sm:items-start">
5+
<div className="flex min-h-screen items-center justify-center bg-zinc-50 font-sans dark:bg-black">
6+
<main className="flex min-h-screen w-full max-w-3xl flex-col items-center justify-between py-32 px-16 bg-white dark:bg-black sm:items-start">
77
<Image
88
className="dark:invert"
99
src="/nextjs-github-pages/next.svg"
1010
alt="Next.js logo"
11-
width={180}
12-
height={38}
11+
width={100}
12+
height={20}
1313
priority
1414
/>
15-
<ol className="list-inside list-decimal text-sm text-center sm:text-left font-[family-name:var(--font-geist-mono)]">
16-
<li className="mb-2">
17-
Get started by editing{" "}
18-
<code className="bg-black/[.05] dark:bg-white/[.06] px-1 py-0.5 rounded font-semibold">
19-
app/page.tsx
20-
</code>
21-
.
22-
</li>
23-
<li>Save and see your changes instantly.</li>
24-
</ol>
25-
26-
<div className="flex gap-4 items-center flex-col sm:flex-row">
15+
<div className="flex flex-col items-center gap-6 text-center sm:items-start sm:text-left">
16+
<h1 className="max-w-xs text-3xl font-semibold leading-10 tracking-tight text-black dark:text-zinc-50">
17+
To get started, edit the page.tsx file.
18+
</h1>
19+
<p className="max-w-md text-lg leading-8 text-zinc-600 dark:text-zinc-400">
20+
Looking for a starting point or more instructions? Head over to{" "}
21+
<a
22+
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
23+
className="font-medium text-zinc-950 dark:text-zinc-50"
24+
>
25+
Templates
26+
</a>{" "}
27+
or the{" "}
28+
<a
29+
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
30+
className="font-medium text-zinc-950 dark:text-zinc-50"
31+
>
32+
Learning
33+
</a>{" "}
34+
center.
35+
</p>
36+
</div>
37+
<div className="flex flex-col gap-4 text-base font-medium sm:flex-row">
2738
<a
28-
className="rounded-full border border-solid border-transparent transition-colors flex items-center justify-center bg-foreground text-background gap-2 hover:bg-[#383838] dark:hover:bg-[#ccc] text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5"
39+
className="flex h-12 w-full items-center justify-center gap-2 rounded-full bg-foreground px-5 text-background transition-colors hover:bg-[#383838] dark:hover:bg-[#ccc] md:w-[158px]"
2940
href="https://vercel.com/new?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
3041
target="_blank"
3142
rel="noopener noreferrer"
@@ -34,68 +45,21 @@ export default function Home() {
3445
className="dark:invert"
3546
src="/nextjs-github-pages/vercel.svg"
3647
alt="Vercel logomark"
37-
width={20}
38-
height={20}
48+
width={16}
49+
height={16}
3950
/>
40-
Deploy now
51+
Deploy Now
4152
</a>
4253
<a
43-
className="rounded-full border border-solid border-black/[.08] dark:border-white/[.145] transition-colors flex items-center justify-center hover:bg-[#f2f2f2] dark:hover:bg-[#1a1a1a] hover:border-transparent text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5 sm:min-w-44"
54+
className="flex h-12 w-full items-center justify-center rounded-full border border-solid border-black/[.08] px-5 transition-colors hover:border-transparent hover:bg-black/[.04] dark:border-white/[.145] dark:hover:bg-[#1a1a1a] md:w-[158px]"
4455
href="https://nextjs.org/docs?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
4556
target="_blank"
4657
rel="noopener noreferrer"
4758
>
48-
Read our docs
59+
Documentation
4960
</a>
5061
</div>
5162
</main>
52-
<footer className="row-start-3 flex gap-6 flex-wrap items-center justify-center">
53-
<a
54-
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
55-
href="https://nextjs.org/learn?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
56-
target="_blank"
57-
rel="noopener noreferrer"
58-
>
59-
<Image
60-
aria-hidden
61-
src="/nextjs-github-pages/file.svg"
62-
alt="File icon"
63-
width={16}
64-
height={16}
65-
/>
66-
Learn
67-
</a>
68-
<a
69-
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
70-
href="https://vercel.com/templates?framework=next.js&utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
71-
target="_blank"
72-
rel="noopener noreferrer"
73-
>
74-
<Image
75-
aria-hidden
76-
src="/nextjs-github-pages/window.svg"
77-
alt="Window icon"
78-
width={16}
79-
height={16}
80-
/>
81-
Examples
82-
</a>
83-
<a
84-
className="flex items-center gap-2 hover:underline hover:underline-offset-4"
85-
href="https://nextjs.org?utm_source=create-next-app&utm_medium=appdir-template-tw&utm_campaign=create-next-app"
86-
target="_blank"
87-
rel="noopener noreferrer"
88-
>
89-
<Image
90-
aria-hidden
91-
src="/nextjs-github-pages/globe.svg"
92-
alt="Globe icon"
93-
width={16}
94-
height={16}
95-
/>
96-
Go to nextjs.org →
97-
</a>
98-
</footer>
9963
</div>
10064
);
10165
}

eslint.config.mjs

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
1-
import { dirname } from "path";
2-
import { fileURLToPath } from "url";
3-
import { FlatCompat } from "@eslint/eslintrc";
1+
import { defineConfig, globalIgnores } from "eslint/config";
2+
import nextVitals from "eslint-config-next/core-web-vitals";
3+
import nextTs from "eslint-config-next/typescript";
44

5-
const __filename = fileURLToPath(import.meta.url);
6-
const __dirname = dirname(__filename);
7-
8-
const compat = new FlatCompat({
9-
baseDirectory: __dirname,
10-
});
11-
12-
const eslintConfig = [
13-
...compat.extends("next/core-web-vitals", "next/typescript"),
14-
];
5+
const eslintConfig = defineConfig([
6+
...nextVitals,
7+
...nextTs,
8+
// Override default ignores of eslint-config-next.
9+
globalIgnores([
10+
// Default ignores of eslint-config-next:
11+
".next/**",
12+
"out/**",
13+
"build/**",
14+
"next-env.d.ts",
15+
]),
16+
]);
1517

1618
export default eslintConfig;

0 commit comments

Comments
 (0)