Skip to content

Commit 19acb10

Browse files
committed
First
1 parent 03a6a03 commit 19acb10

35 files changed

+6272
-121
lines changed

.eslintrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

.gitignore

+25-120
Original file line numberDiff line numberDiff line change
@@ -1,130 +1,35 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
lerna-debug.log*
8-
.pnpm-debug.log*
9-
10-
# Diagnostic reports (https://nodejs.org/api/report.html)
11-
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
122

13-
# Runtime data
14-
pids
15-
*.pid
16-
*.seed
17-
*.pid.lock
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
187

19-
# Directory for instrumented libs generated by jscoverage/JSCover
20-
lib-cov
8+
# testing
9+
/coverage
2110

22-
# Coverage directory used by tools like istanbul
23-
coverage
24-
*.lcov
11+
# next.js
12+
/.next/
13+
/out/
2514

26-
# nyc test coverage
27-
.nyc_output
15+
# production
16+
/build
2817

29-
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
30-
.grunt
18+
# misc
19+
.DS_Store
20+
*.pem
3121

32-
# Bower dependency directory (https://bower.io/)
33-
bower_components
34-
35-
# node-waf configuration
36-
.lock-wscript
37-
38-
# Compiled binary addons (https://nodejs.org/api/addons.html)
39-
build/Release
22+
# debug
23+
npm-debug.log*
24+
yarn-debug.log*
25+
yarn-error.log*
4026

41-
# Dependency directories
42-
node_modules/
43-
jspm_packages/
27+
# local env files
28+
.env*.local
4429

45-
# Snowpack dependency directory (https://snowpack.dev/)
46-
web_modules/
30+
# vercel
31+
.vercel
4732

48-
# TypeScript cache
33+
# typescript
4934
*.tsbuildinfo
50-
51-
# Optional npm cache directory
52-
.npm
53-
54-
# Optional eslint cache
55-
.eslintcache
56-
57-
# Optional stylelint cache
58-
.stylelintcache
59-
60-
# Microbundle cache
61-
.rpt2_cache/
62-
.rts2_cache_cjs/
63-
.rts2_cache_es/
64-
.rts2_cache_umd/
65-
66-
# Optional REPL history
67-
.node_repl_history
68-
69-
# Output of 'npm pack'
70-
*.tgz
71-
72-
# Yarn Integrity file
73-
.yarn-integrity
74-
75-
# dotenv environment variable files
76-
.env
77-
.env.development.local
78-
.env.test.local
79-
.env.production.local
80-
.env.local
81-
82-
# parcel-bundler cache (https://parceljs.org/)
83-
.cache
84-
.parcel-cache
85-
86-
# Next.js build output
87-
.next
88-
out
89-
90-
# Nuxt.js build / generate output
91-
.nuxt
92-
dist
93-
94-
# Gatsby files
95-
.cache/
96-
# Comment in the public line in if your project uses Gatsby and not Next.js
97-
# https://nextjs.org/blog/next-9-1#public-directory-support
98-
# public
99-
100-
# vuepress build output
101-
.vuepress/dist
102-
103-
# vuepress v2.x temp and cache directory
104-
.temp
105-
.cache
106-
107-
# Docusaurus cache and generated files
108-
.docusaurus
109-
110-
# Serverless directories
111-
.serverless/
112-
113-
# FuseBox cache
114-
.fusebox/
115-
116-
# DynamoDB Local files
117-
.dynamodb/
118-
119-
# TernJS port file
120-
.tern-port
121-
122-
# Stores VSCode versions used for testing VSCode extensions
123-
.vscode-test
124-
125-
# yarn v2
126-
.yarn/cache
127-
.yarn/unplugged
128-
.yarn/build-state.yml
129-
.yarn/install-state.gz
130-
.pnp.*
35+
next-env.d.ts

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"typescript.tsdk": "node_modules/typescript/lib"
3+
}

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Santiago de la cruz Martinez Lara
3+
Copyright (c) 2023 Next UI
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Next.js & NextUI Template
2+
3+
This is a template for creating applications using Next.js 13 (app directory) and NextUI (v2).
4+
5+
## Technologies Used
6+
7+
- [Next.js 13](https://nextjs.org/docs/getting-started)
8+
- [NextUI v2](https://nextui.org/)
9+
- [Tailwind CSS](https://tailwindcss.com/)
10+
- [Tailwind Variants](https://tailwind-variants.org)
11+
- [TypeScript](https://www.typescriptlang.org/)
12+
- [Framer Motion](https://www.framer.com/motion/)
13+
- [next-themes](https://github.com/pacocoursey/next-themes)
14+
15+
## How to Use
16+
17+
18+
### Use the template with create-next-app
19+
20+
To create a new project based on this template using `create-next-app`, run the following command:
21+
22+
```bash
23+
npx create-next-app -e https://github.com/nextui-org/next-app-template
24+
```
25+
26+
### Install dependencies
27+
28+
```bash
29+
npm install
30+
```
31+
32+
### Run the development server
33+
34+
```bash
35+
npm run dev
36+
```
37+
38+
## License
39+
40+
Licensed under the [MIT license](https://github.com/nextui-org/next-app-template/blob/main/LICENSE).

app/about/layout.tsx

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
export default function AboutLayout({
2+
children,
3+
}: {
4+
children: React.ReactNode;
5+
}) {
6+
return (
7+
<section className="flex flex-col items-center justify-center gap-4 py-8 md:py-10">
8+
<div className="inline-block max-w-lg text-center justify-center">
9+
{children}
10+
</div>
11+
</section>
12+
);
13+
}

app/about/page.tsx

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { title } from "@/components/primitives";
2+
3+
export default function AboutPage() {
4+
return (
5+
<div>
6+
<h1 className={title()}>About</h1>
7+
</div>
8+
);
9+
}

app/blog/layout.tsx

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
export default function BlogLayout({
2+
children,
3+
}: {
4+
children: React.ReactNode;
5+
}) {
6+
return (
7+
<section className="flex flex-col items-center justify-center gap-4 py-8 md:py-10">
8+
<div className="inline-block max-w-lg text-center justify-center">
9+
{children}
10+
</div>
11+
</section>
12+
);
13+
}

app/blog/page.tsx

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { title } from "@/components/primitives";
2+
3+
export default function BlogPage() {
4+
return (
5+
<div>
6+
<h1 className={title()}>Blog</h1>
7+
</div>
8+
);
9+
}

app/docs/layout.tsx

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
export default function DocsLayout({
2+
children,
3+
}: {
4+
children: React.ReactNode;
5+
}) {
6+
return (
7+
<section className="flex flex-col items-center justify-center gap-4 py-8 md:py-10">
8+
<div className="inline-block max-w-lg text-center justify-center">
9+
{children}
10+
</div>
11+
</section>
12+
);
13+
}

app/docs/page.tsx

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { title } from "@/components/primitives";
2+
3+
export default function DocsPage() {
4+
return (
5+
<div>
6+
<h1 className={title()}>Docs</h1>
7+
</div>
8+
);
9+
}

app/error.tsx

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
'use client'
2+
3+
import { useEffect } from 'react'
4+
5+
export default function Error({
6+
error,
7+
reset,
8+
}: {
9+
error: Error
10+
reset: () => void
11+
}) {
12+
useEffect(() => {
13+
// Log the error to an error reporting service
14+
console.error(error)
15+
}, [error])
16+
17+
return (
18+
<div>
19+
<h2>Something went wrong!</h2>
20+
<button
21+
onClick={
22+
// Attempt to recover by trying to re-render the segment
23+
() => reset()
24+
}
25+
>
26+
Try again
27+
</button>
28+
</div>
29+
)
30+
}

app/layout.tsx

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import "@/styles/globals.css";
2+
import { Metadata } from "next";
3+
import { siteConfig } from "@/config/site";
4+
import { fontSans } from "@/config/fonts";
5+
import { Providers } from "./providers";
6+
import { Navbar } from "@/components/navbar";
7+
import { Link } from "@nextui-org/link";
8+
import clsx from "clsx";
9+
10+
export const metadata: Metadata = {
11+
title: {
12+
default: siteConfig.name,
13+
template: `%s - ${siteConfig.name}`,
14+
},
15+
description: siteConfig.description,
16+
themeColor: [
17+
{ media: "(prefers-color-scheme: light)", color: "white" },
18+
{ media: "(prefers-color-scheme: dark)", color: "black" },
19+
],
20+
icons: {
21+
icon: "/favicon.ico",
22+
shortcut: "/favicon-16x16.png",
23+
apple: "/apple-touch-icon.png",
24+
},
25+
};
26+
27+
export default function RootLayout({
28+
children,
29+
}: {
30+
children: React.ReactNode;
31+
}) {
32+
return (
33+
<html lang="en" suppressHydrationWarning>
34+
<head />
35+
<body
36+
className={clsx(
37+
"min-h-screen bg-background font-sans antialiased",
38+
fontSans.variable
39+
)}
40+
>
41+
<Providers themeProps={{ attribute: "class", defaultTheme: "dark" }}>
42+
<div className="relative flex flex-col h-screen">
43+
<Navbar />
44+
<main className="container mx-auto max-w-7xl pt-16 px-6 flex-grow">
45+
{children}
46+
</main>
47+
<footer className="w-full flex items-center justify-center py-3">
48+
<Link
49+
isExternal
50+
className="flex items-center gap-1 text-current"
51+
href="https://nextui-docs-v2.vercel.app?utm_source=next-app-template"
52+
title="nextui.org homepage"
53+
>
54+
<span className="text-default-600">Powered by</span>
55+
<p className="text-primary">NextUI</p>
56+
</Link>
57+
</footer>
58+
</div>
59+
</Providers>
60+
</body>
61+
</html>
62+
);
63+
}

0 commit comments

Comments
 (0)