-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 988e23a
Showing
68 changed files
with
9,502 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
[*.{js,json,yml}] | ||
charset = utf-8 | ||
indent_style = space | ||
indent_size = 2 |
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 @@ | ||
{ | ||
"extends": "next/core-web-vitals" | ||
} |
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,21 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
# Build job | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install Dependencies | ||
run: npm install | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
- name: Build | ||
run: npm run build |
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,49 @@ | ||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | ||
|
||
# dependencies | ||
/node_modules | ||
/.pnp | ||
.pnp.js | ||
|
||
# testing | ||
/coverage | ||
|
||
# next.js | ||
/.next/ | ||
/out/ | ||
|
||
# production | ||
/build | ||
|
||
# misc | ||
.DS_Store | ||
*.pem | ||
|
||
# debug | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.pnpm-debug.log* | ||
|
||
# local env files | ||
.env*.local | ||
|
||
# vercel | ||
.vercel | ||
|
||
# typescript | ||
*.tsbuildinfo | ||
next-env.d.ts | ||
|
||
# yarn v2 | ||
.yarn/* | ||
!.yarn/cache | ||
!.yarn/patches | ||
!.yarn/plugins | ||
!.yarn/releases | ||
!.yarn/sdks | ||
!.yarn/versions | ||
|
||
# Velite | ||
.velite | ||
public/static |
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 @@ | ||
# Ignore artifacts: | ||
dist | ||
build | ||
coverage | ||
|
||
# Yarn generations: | ||
.pnp.cjs | ||
.pnp.loader.mjs | ||
.yarn |
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 @@ | ||
{ | ||
"recommendations": [ | ||
"dbaeumer.vscode-eslint", | ||
"esbenp.prettier-vscode" | ||
] | ||
} |
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,7 @@ | ||
{ | ||
"typescript.enablePromptUseWorkspaceTsdk": true, | ||
"cSpell.words": ["Flippable", "Kosto", "lofyee", "NOOC", "tailwindcss"], | ||
"editor.formatOnSave": true, | ||
"editor.formatOnPaste": true, | ||
"editor.tabSize": 2 | ||
} |
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 @@ | ||
### Hi there 👋 | ||
|
||
[![Website Status](https://img.shields.io/website?label=https://www.nooc.me&down_color=lightgrey&down_message=offline&up_color=green&up_message=online&url=https%3A%2F%2Fwww.nooc.me)](https://www.nooc.me) | ||
![](https://komarev.com/ghpvc/?username=noobnooc&color=brightgreen) | ||
|
||
- 🔭 I’m currently working on emo | ||
- 🌱 I’m currently learning to live | ||
- 👯 I’m looking to collaborate on love | ||
- 🤔 I’m looking for help with getting rich | ||
- 💬 Ask me about nothing | ||
- 📫 How to reach me: call out | ||
- 😄 Pronouns: that man | ||
- ⚡ Fun fact: I am not fun | ||
|
||
### My Stacks | ||
|
||
![](https://img.shields.io/badge/JavaScript-★★★-F7DF1E?logo=JavaScript) | ||
![](https://img.shields.io/badge/TypeScript-★★★-3178C6?logo=TypeScript) | ||
![](https://img.shields.io/badge/React-★★★-61DAFB?logo=React) | ||
![](https://img.shields.io/badge/CSS-★★★-1572B6?logo=CSS3) | ||
![](https://img.shields.io/badge/NodeJS-★★★-339933?logo=Node.js) | ||
![](https://img.shields.io/badge/Swift-★★-F05138?logo=Swift) | ||
![](https://img.shields.io/badge/Linux-★★-FCC624?logo=Linux) | ||
![](https://img.shields.io/badge/Git-★★-F05032?logo=Git) | ||
![](https://img.shields.io/badge/Docker-★★-2496ED?logo=Docker) | ||
![](https://img.shields.io/badge/Electron-★★-47848F?logo=Electron) | ||
![](https://img.shields.io/badge/MongoDB-★★-47A248?logo=MongoDB) | ||
|
||
> - ★★★: Frequently used | ||
> - ★★: Mostly used | ||
> - ★: Rarely used | ||
### Where To Find Me | ||
|
||
[![Twitter](https://img.shields.io/badge/Twitter-noobnooc-1DA1F2?logo=Twitter&style=for-the-badge)](https://twitter.com/noobnooc)\ | ||
[![GitHub](https://img.shields.io/badge/GitHub-noobnooc-181717?logo=GitHub&style=for-the-badge)](https://github.com/noobnooc)\ | ||
[![Instagram](https://img.shields.io/badge/Instagram-noobnooc-E4405F?logo=Instagram&style=for-the-badge)](https://www.instagram.com/noobnooc/) | ||
|
||
<!-- [![YouTube](https://img.shields.io/badge/YouTube-心月在路上Nooc-FF0000?logo=YouTube&logoColor=FF0000&style=for-the-badge)](https://www.youtube.com/channel/UCKCBrQjYOqyJ0SjRD1xTAog) | ||
[![BiliBili](https://img.shields.io/badge/BiliBili-心月在路上-00A1D6?logo=Bilibili&style=for-the-badge)](https://space.bilibili.com/11005963) | ||
[![Weibo](https://img.shields.io/badge/Weibo-心月在路上Nooc-E6162D?logo=Sina%2dWeibo&style=for-the-badge)](https://weibo.com/noobnooc) --> |
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,147 @@ | ||
import "../../styles/globals.css"; | ||
|
||
import { Metadata } from "next"; | ||
import Image from "next/image"; | ||
import avatar from "../../public/avatar.png"; | ||
import Link from "next/link"; | ||
import { dictionaryKeys, getDictionary } from "../../dictionaries"; | ||
|
||
export const runtime = "edge"; | ||
|
||
export async function generateMetadata({ | ||
params, | ||
}: { | ||
params: { lang: string }; | ||
}): Promise<Metadata> { | ||
const dictionary = await getDictionary(params.lang); | ||
|
||
const langEntries = await Promise.all( | ||
dictionaryKeys.map(async (lang) => { | ||
const dictionary = await getDictionary(lang); | ||
|
||
return [lang, dictionary.urls.home]; | ||
}), | ||
); | ||
|
||
return { | ||
metadataBase: new URL(dictionary.meta.baseUrl), | ||
title: dictionary.meta.websiteName, | ||
description: dictionary.meta.motto, | ||
keywords: dictionary.meta.fillKeywords([]), | ||
openGraph: { | ||
title: dictionary.meta.websiteName, | ||
description: dictionary.meta.motto, | ||
siteName: dictionary.meta.websiteName, | ||
}, | ||
twitter: { | ||
title: dictionary.meta.websiteName, | ||
description: dictionary.meta.motto, | ||
site: "@noobnooc", | ||
card: "summary_large_image", | ||
}, | ||
alternates: { | ||
languages: Object.fromEntries(langEntries), | ||
}, | ||
}; | ||
} | ||
|
||
const bottomNavItems = [ | ||
{ | ||
name: "主观世界", | ||
link: "https://subnooc.com", | ||
}, | ||
{ | ||
name: "趣物", | ||
link: "https://quwu.io", | ||
}, | ||
{ | ||
name: "AssisChat", | ||
link: "https://assischat.com", | ||
}, | ||
{ | ||
name: "Lofyee", | ||
link: "https://lofyee.com", | ||
}, | ||
]; | ||
|
||
export default async function RootLayout({ | ||
// Layouts must accept a children prop. | ||
// This will be populated with nested layouts or pages | ||
children, | ||
params, | ||
}: { | ||
children: React.ReactNode; | ||
params: { | ||
lang: string; | ||
}; | ||
}) { | ||
const dictionary = await getDictionary(params.lang); | ||
|
||
return ( | ||
<html lang={params.lang} className=""> | ||
<body className="bg-slate-50 text-black dark:bg-neutral-900 dark:text-slate-50"> | ||
<header className="sticky top-0 z-10 text-md h-20"> | ||
<div className="w-full bg-white/50 dark:bg-neutral-900"> | ||
<div className="w-full bg-white/50 dark:bg-slate-100/5"> | ||
<hr /> | ||
<div className="mx-auto flex h-20 w-full max-w-screen-lg items-center justify-between gap-4 px-4 py-6"> | ||
<Link | ||
className="flex items-center gap-4" | ||
href={dictionary.urls.home} | ||
> | ||
<Image | ||
className="h-8 w-8 rounded-lg" | ||
src={avatar} | ||
alt="Nooc Avatar" | ||
/> | ||
<h1 className="font-bold opacity-80 sm:inline"> | ||
{dictionary.meta.websiteName} | ||
</h1> | ||
</Link> | ||
<nav className="font-light"> | ||
<ul className="flex gap-4"> | ||
<li> | ||
<Link href={dictionary.urls.home}> | ||
{dictionary.labels.home} | ||
</Link> | ||
</li> | ||
<li> | ||
<Link href={dictionary.urls.posts}> | ||
{dictionary.labels.posts} | ||
</Link> | ||
</li> | ||
<li> | ||
<Link href={dictionary.urls.works}> | ||
{dictionary.labels.works} | ||
</Link> | ||
</li> | ||
</ul> | ||
</nav> | ||
</div> | ||
<hr /> | ||
</div> | ||
</div> | ||
</header> | ||
|
||
{children} | ||
|
||
<footer className="text-md bg-white/50 text-sm dark:bg-slate-100/5"> | ||
<hr /> | ||
<div className="mx-auto flex w-full max-w-screen-lg flex-col justify-between gap-4 px-4 py-10 sm:flex-row"> | ||
<nav className="opacity-80"> | ||
<ul className="flex gap-4"> | ||
{bottomNavItems.map((item) => ( | ||
<li key={item.name}> | ||
<a href={item.link}>{item.name}</a> | ||
</li> | ||
))} | ||
</ul> | ||
</nav> | ||
<p className="opacity-60">© 2023 Nooc</p> | ||
</div> | ||
<hr /> | ||
</footer> | ||
</body> | ||
</html> | ||
); | ||
} |
Oops, something went wrong.