-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(web): implement new main website
Create new website using T3 template. It's simple and contains only text. fix #10
- Loading branch information
Showing
18 changed files
with
621 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Since the ".env" file is gitignored, you can use the ".env.example" file to | ||
# build a new ".env" file when you clone the repo. Keep this file up-to-date | ||
# when you add new variables to `.env`. | ||
|
||
# This file will be committed to version control, so make sure not to have any | ||
# secrets in it. If you are cloning this repo, create a copy of this file named | ||
# ".env" and populate it with your secrets. | ||
|
||
# When adding additional environment variables, the schema in "/src/env.js" | ||
# should be updated accordingly. | ||
|
||
# Example: | ||
# SERVERVAR="foo" | ||
# NEXT_PUBLIC_CLIENTVAR="bar" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** @type {import("eslint").Linter.Config} */ | ||
const config = { | ||
"parser": "@typescript-eslint/parser", | ||
"parserOptions": { | ||
"project": true | ||
}, | ||
"plugins": [ | ||
"@typescript-eslint" | ||
], | ||
"extends": [ | ||
"next/core-web-vitals", | ||
"plugin:@typescript-eslint/recommended-type-checked", | ||
"plugin:@typescript-eslint/stylistic-type-checked" | ||
], | ||
"rules": { | ||
"@typescript-eslint/array-type": "off", | ||
"@typescript-eslint/consistent-type-definitions": "off", | ||
"@typescript-eslint/consistent-type-imports": [ | ||
"warn", | ||
{ | ||
"prefer": "type-imports", | ||
"fixStyle": "inline-type-imports" | ||
} | ||
], | ||
"@typescript-eslint/no-unused-vars": [ | ||
"warn", | ||
{ | ||
"argsIgnorePattern": "^_" | ||
} | ||
], | ||
"@typescript-eslint/require-await": "off", | ||
"@typescript-eslint/no-misused-promises": [ | ||
"error", | ||
{ | ||
"checksVoidReturn": { | ||
"attributes": false | ||
} | ||
} | ||
] | ||
} | ||
} | ||
module.exports = config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# database | ||
/prisma/db.sqlite | ||
/prisma/db.sqlite-journal | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
next-env.d.ts | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
|
||
# local env files | ||
# do not commit any .env files to git, except for the .env.example file. https://create.t3.gg/en/usage/env-variables#using-environment-variables | ||
.env | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"rules": { | ||
"import/extensions": "off" | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** | ||
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful | ||
* for Docker builds. | ||
*/ | ||
await import('./src/env.js'); | ||
|
||
/** @type {import("next").NextConfig} */ | ||
const config = {}; | ||
|
||
export default config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"name": "website", | ||
"version": "0.1.0", | ||
"description": "A simple website", | ||
"private": true, | ||
"type": "module", | ||
"packageManager": "[email protected]", | ||
"scripts": { | ||
"build": "next build", | ||
"dev": "next dev", | ||
"lint": "xo", | ||
"lint:fix": "xo --fix", | ||
"test": "echo No tests defined" | ||
}, | ||
"dependencies": { | ||
"@0n0/ui": "workspace:*", | ||
"@t3-oss/env-nextjs": "^0.10.1", | ||
"lucide-react": "^0.316.0", | ||
"next": "^14.2.1", | ||
"next-themes": "^0.2.1", | ||
"react": "18.2.0", | ||
"react-dom": "18.2.0", | ||
"zod": "^3.23.3" | ||
}, | ||
"devDependencies": { | ||
"@0n0/tailwind-config": "workspace:*", | ||
"@types/eslint": "^8.56.2", | ||
"@types/node": "^20.11.20", | ||
"@types/react": "^18.2.57", | ||
"@types/react-dom": "^18.2.19", | ||
"@typescript-eslint/eslint-plugin": "^7.1.1", | ||
"@typescript-eslint/parser": "^7.1.1", | ||
"eslint": "^8.57.0", | ||
"eslint-config-next": "^14.1.3", | ||
"postcss": "^8.4.34", | ||
"prettier": "^3.2.5", | ||
"prettier-plugin-tailwindcss": "^0.5.11", | ||
"tailwindcss": "^3.4.1", | ||
"typescript": "^5.4.2" | ||
}, | ||
"ct3aMetadata": { | ||
"initVersion": "7.32.0" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = require('@0n0/tailwind-config/postcss.config.cjs'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
/** @type {import('prettier').Config & import('prettier-plugin-tailwindcss').PluginOptions} */ | ||
const config = { | ||
plugins: ['prettier-plugin-tailwindcss'], | ||
}; | ||
|
||
export default config; |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
import {Poppins} from 'next/font/google'; | ||
import {ModeToggle} from '@0n0/ui/mode-toggle'; | ||
import '@0n0/ui/globals.css'; | ||
import {themes} from '@0n0/ui/lib/themes'; | ||
import {ThemeProvider} from '@/theme-provider'; | ||
|
||
// eslint-disable-next-line new-cap | ||
const poppins = Poppins({ | ||
weight: '500', | ||
subsets: ['latin'], | ||
}); | ||
|
||
export const metadata = { | ||
title: 'Create T3 App', | ||
description: 'Generated by create-t3-app', | ||
icons: [{rel: 'icon', url: '/favicon.ico'}], | ||
}; | ||
|
||
export default function RootLayout({ | ||
children, | ||
}: { | ||
children: React.ReactNode; | ||
}) { | ||
return ( | ||
<html lang='en'> | ||
<body className={`${poppins.className} flex flex-col min-h-screen antialiased bg-background text-foreground`}> | ||
<ThemeProvider | ||
attribute='class' | ||
defaultTheme='orange-dark' | ||
themes={[...themes]} | ||
disableTransitionOnChange | ||
> | ||
<nav className='grow-0 flex flex-row-reverse p-2'> | ||
<ModeToggle /> | ||
</nav> | ||
<div className='h-full grow flex flex-col justify-center items-center'> | ||
{children} | ||
</div> | ||
</ThemeProvider> | ||
</body> | ||
</html> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import Link from 'next/link'; | ||
import {Button} from '@0n0/ui/button'; | ||
import {ClapperboardIcon, GithubIcon} from 'lucide-react'; | ||
|
||
export default function HomePage() { | ||
return ( | ||
<main className='flex flex-col items-center justify-center'> | ||
<p className='text-center'> | ||
Hello, world!<br /> | ||
This website and all of its future subdomains are a <i>work in progress</i>.<br /> | ||
In the meantime, check out my <Link href='https://mov.0n0.sh/'> | ||
<Button>self-hosted movie-web instance</Button> | ||
</Link> or my <Link href='https://github.com/AirOne01'> | ||
<Button>Github</Button> | ||
</Link>. | ||
</p> | ||
</main> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
'use client'; | ||
|
||
import * as React from 'react'; | ||
import {ThemeProvider as NextThemesProvider} from 'next-themes'; | ||
import {type ThemeProviderProps} from 'next-themes/dist/types'; | ||
|
||
export function ThemeProvider({children, ...properties}: ThemeProviderProps) { | ||
return <NextThemesProvider {...properties}>{children}</NextThemesProvider>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import process from 'node:process'; | ||
import {createEnv} from '@t3-oss/env-nextjs'; | ||
import {z} from 'zod'; | ||
|
||
export const env = createEnv({ | ||
/** | ||
* Specify your server-side environment variables schema here. This way you can ensure the app | ||
* isn't built with invalid env vars. | ||
*/ | ||
server: { | ||
NODE_ENV: z.enum(['development', 'test', 'production']), | ||
}, | ||
|
||
/** | ||
* Specify your client-side environment variables schema here. This way you can ensure the app | ||
* isn't built with invalid env vars. To expose them to the client, prefix them with | ||
* `NEXT_PUBLIC_`. | ||
*/ | ||
client: { | ||
// NEXT_PUBLIC_CLIENTVAR: z.string(), | ||
}, | ||
|
||
/** | ||
* You can't destruct `process.env` as a regular object in the Next.js edge runtimes (e.g. | ||
* middlewares) or client-side so we need to destruct manually. | ||
*/ | ||
runtimeEnv: { | ||
NODE_ENV: process.env.NODE_ENV, | ||
// NEXT_PUBLIC_CLIENTVAR: process.env.NEXT_PUBLIC_CLIENTVAR, | ||
}, | ||
/** | ||
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially | ||
* useful for Docker builds. | ||
*/ | ||
skipValidation: Boolean(process.env.SKIP_ENV_VALIDATION), | ||
/** | ||
* Makes it so that empty strings are treated as undefined. `SOME_VAR: z.string()` and | ||
* `SOME_VAR=''` will throw an error. | ||
*/ | ||
emptyStringAsUndefined: true, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/** @type {import('tailwindcss').Config} */ | ||
// @ts-ignore | ||
module.exports = require('./node_modules/@0n0/tailwind-config/tailwind.config.cjs'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"compilerOptions": { | ||
/* Base Options: */ | ||
"esModuleInterop": true, | ||
"skipLibCheck": true, | ||
"target": "es2022", | ||
"allowJs": true, | ||
"resolveJsonModule": true, | ||
"moduleDetection": "force", | ||
"isolatedModules": true, | ||
/* Strictness */ | ||
"strict": true, | ||
"noUncheckedIndexedAccess": true, | ||
"checkJs": true, | ||
/* Bundled projects */ | ||
"lib": [ | ||
"dom", | ||
"dom.iterable", | ||
"ES2022" | ||
], | ||
"noEmit": true, | ||
"module": "ESNext", | ||
"moduleResolution": "Bundler", | ||
"jsx": "preserve", | ||
"plugins": [ | ||
{ | ||
"name": "next" | ||
} | ||
], | ||
"incremental": true, | ||
/* Path Aliases */ | ||
"baseUrl": ".", | ||
"paths": { | ||
"~/*": [ | ||
"./src/*" | ||
], | ||
"@/*": [ | ||
"./src/components/*" | ||
], | ||
"@globals": [ | ||
"./src/styles/globals.css" | ||
] | ||
} | ||
}, | ||
"include": [ | ||
"next-env.d.ts", | ||
"**/*.ts", | ||
"**/*.tsx", | ||
"**/*.cjs", | ||
"**/*.js", | ||
".next/types/**/*.ts", | ||
], | ||
"exclude": [ | ||
"node_modules" | ||
] | ||
} |
Oops, something went wrong.