Skip to content

Commit 9fa3600

Browse files
committed
Init
0 parents  commit 9fa3600

21 files changed

+9505
-0
lines changed

.eslintrc.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"extends": [
3+
"next/core-web-vitals",
4+
"next/typescript"
5+
],
6+
"rules": {
7+
"semi": [
8+
2,
9+
"never"
10+
],
11+
"quotes": [
12+
2,
13+
"single",
14+
{
15+
"avoidEscape": true
16+
}
17+
],
18+
"@typescript-eslint/no-explicit-any": "off"
19+
}
20+
}

.github/workflows/node.js.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
2+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
3+
4+
name: Node.js CI
5+
6+
on:
7+
push:
8+
branches: [ "master" ]
9+
pull_request:
10+
branches: [ "master" ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
strategy:
18+
matrix:
19+
node-version: [22.x]
20+
21+
steps:
22+
- uses: actions/checkout@v4
23+
- name: Use Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@v4
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
cache: 'npm'
28+
- run: npm install
29+
- run: npm run lint
30+
- run: npm run build

.gitignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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+
.yarn/install-state.gz
8+
9+
# testing
10+
/coverage
11+
12+
# next.js
13+
/.next/
14+
/out/
15+
16+
# production
17+
/build
18+
19+
# misc
20+
.DS_Store
21+
*.pem
22+
23+
# debug
24+
npm-debug.log*
25+
yarn-debug.log*
26+
yarn-error.log*
27+
28+
# local env files
29+
.env*.local
30+
31+
# vercel
32+
.vercel
33+
34+
# typescript
35+
*.tsbuildinfo
36+
next-env.d.ts
37+
38+
39+
# WS
40+
.idea

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) 2024 Ilya Kirillov
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.

Procfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
web: npm start

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# 🈷️ WaniKani Kanji Cards
2+
3+
[🔗 wanikani-kanji-cards.darthorimar.me](https://wanikani-kanji-cards.darthorimar.me/)
4+
5+
I created this app to rapidly review the [WaniKani](https://wanikani.com) kanji at a level where I have unlocked (almost) all of them. It helps me retain kanji better in my memory and stop confusing them with each other :)
6+
7+
# 🏗️ Building
8+
9+
The app is hosted at [wanikani-kanji-cards.darthorimar.me](https://wanikani-kanji-cards.darthorimar.me), but it can also be built and run locally.
10+
11+
The app is written with Next.js and React.
12+
13+
- Use `npm run dev` to run a development version of the app.
14+
- Use `npm run start` to run a production version of the site.
15+
- Use `npm run build` to create a production build of the site.

app/componets/center.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { ReactNode } from 'react'
2+
3+
export function Center(
4+
{ children }: { children: ReactNode }
5+
) {
6+
return <div className='flex items-center justify-center mt-12' style={{ minHeight: '85dvh' }}>
7+
<div>
8+
{children}
9+
</div>
10+
</div>
11+
}

app/componets/footer.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { FaGithub, FaGlobe, FaLinkedin } from 'react-icons/fa'
2+
3+
export function Footer() {
4+
return <footer className='mx-auto p-4 text-default-400'>
5+
<p className='text-center'>Created by <a href='https://darthorimar.github.io' target='_blank'>Darthorimar</a></p>
6+
<div className='flex gap-2 items-center justify-center mt-2'>
7+
<a href='https://darthorimar.github.io' target='_blank'>
8+
<FaGlobe color='hsl(var(--nextui-default-400))' />
9+
</a>
10+
<a href='https://github.com/darthorimar' target='_blank' >
11+
<FaGithub color='hsl(var(--nextui-default-400))' />
12+
</a>
13+
<a href='https://www.linkedin.com/in/ilia-kirillov/' target='_blank' >
14+
<FaLinkedin color='hsl(var(--nextui-default-400))' />
15+
</a>
16+
</div>
17+
</footer>
18+
}

app/componets/github_ribbon.tsx

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
export function GitHubRibbon() {
2+
return <a
3+
href='https://github.com/darthorimar/wanikani-kanji-cards'
4+
className='github-corner'
5+
aria-label='View source on GitHub'
6+
target='_blank'
7+
>
8+
<svg
9+
width={80}
10+
height={80}
11+
viewBox='0 0 250 250'
12+
style={{
13+
fill: 'hsl(var(--nextui-default-50))',
14+
color: 'hsl(var(--nextui-default-400))',
15+
position: 'absolute',
16+
top: 0,
17+
border: 0,
18+
right: 0
19+
}}
20+
aria-hidden='true'
21+
>
22+
<path d='M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z' />
23+
<path
24+
d='M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2'
25+
fill='currentColor'
26+
style={{ transformOrigin: '130px 106px' }}
27+
className='octo-arm'
28+
/>
29+
<path
30+
d='M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z'
31+
fill='currentColor'
32+
className='octo-body'
33+
/>
34+
</svg>
35+
</a>
36+
37+
38+
}

app/globals.css

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
@tailwind base;
2+
@tailwind components;
3+
@tailwind utilities;
4+
5+
:root {
6+
--background: #ffffff;
7+
--foreground: #171717;
8+
}
9+
10+
@media (prefers-color-scheme: dark) {
11+
:root {
12+
--background: #0a0a0a;
13+
--foreground: #ededed;
14+
}
15+
}
16+
17+
body {
18+
color: var(--foreground);
19+
background: var(--background);
20+
font-family: Arial, Helvetica, sans-serif;
21+
}
22+
23+
@layer utilities {
24+
.text-balance {
25+
text-wrap: balance;
26+
}
27+
}
28+
29+
30+
/* <github ribbon> */
31+
.github-corner:hover .octo-arm {
32+
animation: octocat-wave 560ms ease-in-out
33+
}
34+
35+
@keyframes octocat-wave {
36+
37+
0%,
38+
100% {
39+
transform: rotate(0)
40+
}
41+
42+
20%,
43+
60% {
44+
transform: rotate(-25deg)
45+
}
46+
47+
40%,
48+
80% {
49+
transform: rotate(10deg)
50+
}
51+
}
52+
53+
@media (max-width:500px) {
54+
.github-corner:hover .octo-arm {
55+
animation: none
56+
}
57+
58+
.github-corner .octo-arm {
59+
animation: octocat-wave 560ms ease-in-out
60+
}
61+
}
62+
/* </github ribbon> */

0 commit comments

Comments
 (0)