Skip to content

Commit 74bc83d

Browse files
committed
first commit
0 parents  commit 74bc83d

36 files changed

+1189
-0
lines changed

.eslintignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.now/*
2+
*.css
3+
.changeset
4+
dist
5+
esm/*
6+
public/*
7+
tests/*
8+
scripts/*
9+
*.config.js
10+
.DS_Store
11+
node_modules
12+
coverage
13+
.next
14+
build
15+
!.commitlintrc.cjs
16+
!.lintstagedrc.cjs
17+
!jest.config.js
18+
!plopfile.js
19+
!react-shim.js
20+
!tsup.config.ts

.eslintrc.json

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
{
2+
"$schema": "https://json.schemastore.org/eslintrc.json",
3+
"env": {
4+
"browser": false,
5+
"es2021": true,
6+
"node": true
7+
},
8+
"extends": [
9+
"plugin:react/recommended",
10+
"plugin:prettier/recommended",
11+
"plugin:react-hooks/recommended",
12+
"plugin:jsx-a11y/recommended"
13+
],
14+
"plugins": ["react", "unused-imports", "import", "@typescript-eslint", "jsx-a11y", "prettier"],
15+
"parser": "@typescript-eslint/parser",
16+
"parserOptions": {
17+
"ecmaFeatures": {
18+
"jsx": true
19+
},
20+
"ecmaVersion": 12,
21+
"sourceType": "module"
22+
},
23+
"settings": {
24+
"react": {
25+
"version": "detect"
26+
}
27+
},
28+
"rules": {
29+
"no-console": "warn",
30+
"react/prop-types": "off",
31+
"react/jsx-uses-react": "off",
32+
"react/react-in-jsx-scope": "off",
33+
"react-hooks/exhaustive-deps": "off",
34+
"jsx-a11y/click-events-have-key-events": "warn",
35+
"jsx-a11y/interactive-supports-focus": "warn",
36+
"prettier/prettier": "warn",
37+
"no-unused-vars": "off",
38+
"unused-imports/no-unused-vars": "off",
39+
"unused-imports/no-unused-imports": "warn",
40+
"@typescript-eslint/no-unused-vars": [
41+
"warn",
42+
{
43+
"args": "after-used",
44+
"ignoreRestSiblings": false,
45+
"argsIgnorePattern": "^_.*?$"
46+
}
47+
],
48+
"import/order": [
49+
"warn",
50+
{
51+
"groups": [
52+
"type",
53+
"builtin",
54+
"object",
55+
"external",
56+
"internal",
57+
"parent",
58+
"sibling",
59+
"index"
60+
],
61+
"pathGroups": [
62+
{
63+
"pattern": "~/**",
64+
"group": "external",
65+
"position": "after"
66+
}
67+
],
68+
"newlines-between": "always"
69+
}
70+
],
71+
"react/self-closing-comp": "warn",
72+
"react/jsx-sort-props": [
73+
"warn",
74+
{
75+
"callbacksLast": true,
76+
"shorthandFirst": true,
77+
"noSortAlphabetically": false,
78+
"reservedFirst": true
79+
}
80+
],
81+
"padding-line-between-statements": [
82+
"warn",
83+
{"blankLine": "always", "prev": "*", "next": "return"},
84+
{"blankLine": "always", "prev": ["const", "let", "var"], "next": "*"},
85+
{
86+
"blankLine": "any",
87+
"prev": ["const", "let", "var"],
88+
"next": ["const", "let", "var"]
89+
}
90+
]
91+
}
92+
}

.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
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+
27+
# local env files
28+
.env*.local
29+
30+
# vercel
31+
.vercel
32+
33+
# typescript
34+
*.tsbuildinfo
35+
next-env.d.ts

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package-lock=false

.vscode/settings.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"typescript.tsdk": "node_modules/typescript/lib",
3+
"workbench.colorCustomizations": {
4+
"activityBar.background": "#023524",
5+
"titleBar.activeBackground": "#034A33",
6+
"titleBar.activeForeground": "#EDFEF8"
7+
}
8+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Next UI
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Next.js & NextUI Template
2+
3+
This is a template for creating applications using Next.js 14 (app directory) and NextUI (v2).
4+
5+
[Try it on CodeSandbox](https://githubbox.com/nextui-org/next-app-template)
6+
7+
## Technologies Used
8+
9+
- [Next.js 14](https://nextjs.org/docs/getting-started)
10+
- [NextUI v2](https://nextui.org/)
11+
- [Tailwind CSS](https://tailwindcss.com/)
12+
- [Tailwind Variants](https://tailwind-variants.org)
13+
- [TypeScript](https://www.typescriptlang.org/)
14+
- [Framer Motion](https://www.framer.com/motion/)
15+
- [next-themes](https://github.com/pacocoursey/next-themes)
16+
17+
## How to Use
18+
19+
### Use the template with create-next-app
20+
21+
To create a new project based on this template using `create-next-app`, run the following command:
22+
23+
```bash
24+
npx create-next-app -e https://github.com/nextui-org/next-app-template
25+
```
26+
27+
### Install dependencies
28+
29+
You can use one of them `npm`, `yarn`, `pnpm`, `bun`, Example using `npm`:
30+
31+
```bash
32+
npm install
33+
```
34+
35+
### Run the development server
36+
37+
```bash
38+
npm run dev
39+
```
40+
41+
### Setup pnpm (optional)
42+
43+
If you are using `pnpm`, you need to add the following code to your `.npmrc` file:
44+
45+
```bash
46+
public-hoist-pattern[]=*@nextui-org/*
47+
```
48+
49+
After modifying the `.npmrc` file, you need to run `pnpm install` again to ensure that the dependencies are installed correctly.
50+
51+
## License
52+
53+
Licensed under the [MIT license](https://github.com/nextui-org/next-app-template/blob/main/LICENSE).

app/error.tsx

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
/* eslint-disable no-console */
15+
console.error(error);
16+
}, [error]);
17+
18+
return (
19+
<div>
20+
<h2>Something went wrong!</h2>
21+
<button
22+
onClick={
23+
// Attempt to recover by trying to re-render the segment
24+
() => reset()
25+
}
26+
>
27+
Try again
28+
</button>
29+
</div>
30+
);
31+
}

app/layout.tsx

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

app/page.tsx

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import { Link } from "@nextui-org/link";
2+
import { Snippet } from "@nextui-org/snippet";
3+
import { Code } from "@nextui-org/code";
4+
import { button as buttonStyles } from "@nextui-org/theme";
5+
import {Card, CardHeader } from "@nextui-org/card";
6+
import { Image } from "@nextui-org/image";
7+
8+
9+
10+
import { siteConfig } from "@/config/site";
11+
import { title, subtitle } from "@/components/primitives";
12+
import { GithubIcon } from "@/components/icons";
13+
import { Placeholder } from "@/components/placeholder";
14+
15+
export default function Home() {
16+
return (
17+
<div className="max-w-full gap-2 grid grid-cols-4 grid-rows-2 px-8">
18+
{/* <div className={`border-4 col-span-4 flex justify-center items-center h-[600px]`}>
19+
Homepage
20+
</div> */}
21+
<Placeholder text="Homepage" col_span={4} height={600} />
22+
<Placeholder text="Research Direction 1" col_span={1} />
23+
<Placeholder text="Research Direction 2" col_span={1} />
24+
<Placeholder text="Research Direction 3" col_span={1} />
25+
<Placeholder text="Research Direction 4" col_span={1} />
26+
</div>
27+
);
28+
}

0 commit comments

Comments
 (0)