mirror of
https://github.com/theoludwig/theoludwig.git
synced 2025-05-29 22:37:44 +02:00
Compare commits
15 Commits
Author | SHA1 | Date | |
---|---|---|---|
b16699f5aa
|
|||
e044b4caea
|
|||
d795025860
|
|||
a43bfb4a0d
|
|||
69af1bccc3
|
|||
cec70161f7
|
|||
f70a66e251
|
|||
38eb296088
|
|||
43d91bfc28
|
|||
b63cc3a66e
|
|||
270920111a
|
|||
d91feb8de4
|
|||
e68cb08a6f
|
|||
09d677bd37
|
|||
db1159f20c
|
@ -9,3 +9,6 @@ end_of_line = lf
|
|||||||
charset = utf-8
|
charset = utf-8
|
||||||
trim_trailing_whitespace = true
|
trim_trailing_whitespace = true
|
||||||
insert_final_newline = true
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
indent_size = 4
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
TZ=UTC
|
TZ=Europe/Paris
|
||||||
WEBSITE_PORT=3000
|
WEBSITE_PORT=3000
|
||||||
|
4
.github/ISSUE_TEMPLATE/BUG.md
vendored
4
.github/ISSUE_TEMPLATE/BUG.md
vendored
@ -6,8 +6,8 @@ labels: "bug"
|
|||||||
---
|
---
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
Please provide a clear and concise description of what the bug is. Include
|
Please provide a clear and concise description of what the bug is. Include
|
||||||
screenshots if needed. Please make sure your issue has not already been fixed.
|
screenshots if needed. Please make sure your issue has not already been fixed.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
## Steps To Reproduce
|
## Steps To Reproduce
|
||||||
|
10
.github/workflows/chromatic.yml
vendored
10
.github/workflows/chromatic.yml
vendored
@ -10,17 +10,21 @@ jobs:
|
|||||||
chromatic:
|
chromatic:
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
|
env:
|
||||||
|
DO_NOT_TRACK: "1"
|
||||||
|
TURBO_TELEMETRY_DISABLED: "1"
|
||||||
|
NEXT_TELEMETRY_DISABLED: "1"
|
||||||
steps:
|
steps:
|
||||||
- uses: "actions/checkout@v4.2.2"
|
- uses: "actions/checkout@v4.2.2"
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- uses: "pnpm/action-setup@v4.0.0"
|
- uses: "pnpm/action-setup@v4.1.0"
|
||||||
|
|
||||||
- name: "Setup Node.js"
|
- name: "Setup Node.js"
|
||||||
uses: "actions/setup-node@v4.1.0"
|
uses: "actions/setup-node@v4.4.0"
|
||||||
with:
|
with:
|
||||||
node-version: "22.x"
|
node-version: "24.x"
|
||||||
cache: "pnpm"
|
cache: "pnpm"
|
||||||
|
|
||||||
- name: "Install dependencies"
|
- name: "Install dependencies"
|
||||||
|
12
.github/workflows/ci.yml
vendored
12
.github/workflows/ci.yml
vendored
@ -10,15 +10,21 @@ jobs:
|
|||||||
ci:
|
ci:
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
|
env:
|
||||||
|
CI: "1"
|
||||||
|
TZ: "Europe/Paris"
|
||||||
|
DO_NOT_TRACK: "1"
|
||||||
|
TURBO_TELEMETRY_DISABLED: "1"
|
||||||
|
NEXT_TELEMETRY_DISABLED: "1"
|
||||||
steps:
|
steps:
|
||||||
- uses: "actions/checkout@v4.2.2"
|
- uses: "actions/checkout@v4.2.2"
|
||||||
|
|
||||||
- uses: "pnpm/action-setup@v4.0.0"
|
- uses: "pnpm/action-setup@v4.1.0"
|
||||||
|
|
||||||
- name: "Setup Node.js"
|
- name: "Setup Node.js"
|
||||||
uses: "actions/setup-node@v4.1.0"
|
uses: "actions/setup-node@v4.4.0"
|
||||||
with:
|
with:
|
||||||
node-version: "22.x"
|
node-version: "24.x"
|
||||||
cache: "pnpm"
|
cache: "pnpm"
|
||||||
|
|
||||||
- name: "Install dependencies"
|
- name: "Install dependencies"
|
||||||
|
45
.github/workflows/release.yml
vendored
45
.github/workflows/release.yml
vendored
@ -1,45 +0,0 @@
|
|||||||
name: "Release"
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main, staging]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release:
|
|
||||||
timeout-minutes: 30
|
|
||||||
runs-on: "ubuntu-latest"
|
|
||||||
permissions:
|
|
||||||
contents: "write"
|
|
||||||
issues: "write"
|
|
||||||
pull-requests: "write"
|
|
||||||
id-token: "write"
|
|
||||||
steps:
|
|
||||||
- uses: "actions/checkout@v4.2.2"
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
persist-credentials: false
|
|
||||||
|
|
||||||
- name: "Import GPG key"
|
|
||||||
uses: "crazy-max/ghaction-import-gpg@v6.1.0"
|
|
||||||
with:
|
|
||||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
|
||||||
git_user_signingkey: true
|
|
||||||
git_commit_gpgsign: true
|
|
||||||
|
|
||||||
- uses: "pnpm/action-setup@v4.0.0"
|
|
||||||
|
|
||||||
- name: "Setup Node.js"
|
|
||||||
uses: "actions/setup-node@v4.1.0"
|
|
||||||
with:
|
|
||||||
node-version: "22.x"
|
|
||||||
cache: "pnpm"
|
|
||||||
|
|
||||||
- name: "Install dependencies"
|
|
||||||
run: "pnpm install --frozen-lockfile"
|
|
||||||
|
|
||||||
- name: "Release"
|
|
||||||
run: "node --run release"
|
|
||||||
env:
|
|
||||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
|
||||||
GIT_COMMITTER_NAME: ${{ secrets.GIT_NAME }}
|
|
||||||
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_EMAIL }}
|
|
@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"config": {
|
|
||||||
"extends": "markdownlint/style/prettier",
|
|
||||||
"default": true,
|
|
||||||
"relative-links": true,
|
|
||||||
"no-duplicate-heading": false,
|
|
||||||
"no-inline-html": false,
|
|
||||||
},
|
|
||||||
"globs": ["**/*.md"],
|
|
||||||
"ignores": ["**/node_modules"],
|
|
||||||
"customRules": ["markdownlint-rule-relative-links"],
|
|
||||||
}
|
|
16
.markdownlint-cli2.mjs
Normal file
16
.markdownlint-cli2.mjs
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
import relativeLinksRule from "markdownlint-rule-relative-links"
|
||||||
|
|
||||||
|
const config = {
|
||||||
|
config: {
|
||||||
|
extends: "markdownlint/style/prettier",
|
||||||
|
default: true,
|
||||||
|
"relative-links": true,
|
||||||
|
"no-duplicate-heading": false,
|
||||||
|
"no-inline-html": false,
|
||||||
|
},
|
||||||
|
globs: ["**/*.md"],
|
||||||
|
ignores: ["**/node_modules"],
|
||||||
|
customRules: [relativeLinksRule],
|
||||||
|
}
|
||||||
|
|
||||||
|
export default config
|
@ -1,34 +0,0 @@
|
|||||||
{
|
|
||||||
"branches": ["main", { "name": "staging", "prerelease": true }],
|
|
||||||
"plugins": [
|
|
||||||
"@semantic-release/commit-analyzer",
|
|
||||||
"@semantic-release/release-notes-generator",
|
|
||||||
[
|
|
||||||
"@semantic-release/exec",
|
|
||||||
{
|
|
||||||
"prepareCmd": "replace-in-files --regex='version\": *\"[^\"]*' --replacement='\"version\": \"${nextRelease.version}\"' '**/package.json' '!**/node_modules/**'"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
[
|
|
||||||
"@semantic-release/git",
|
|
||||||
{
|
|
||||||
"assets": [
|
|
||||||
"package.json",
|
|
||||||
"apps/*/package.json",
|
|
||||||
"packages/*/package.json"
|
|
||||||
],
|
|
||||||
"message": "chore(release): ${nextRelease.version} [skip ci]"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"@semantic-release/github",
|
|
||||||
[
|
|
||||||
"@saithodev/semantic-release-backmerge",
|
|
||||||
{
|
|
||||||
"branches": [
|
|
||||||
{ "from": "main", "to": "develop" },
|
|
||||||
{ "from": "staging", "to": "develop" }
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
]
|
|
||||||
}
|
|
1
.vscode/extensions.json
vendored
1
.vscode/extensions.json
vendored
@ -6,7 +6,6 @@
|
|||||||
"davidanson.vscode-markdownlint",
|
"davidanson.vscode-markdownlint",
|
||||||
"bradlc.vscode-tailwindcss",
|
"bradlc.vscode-tailwindcss",
|
||||||
"mikestead.dotenv",
|
"mikestead.dotenv",
|
||||||
"ms-azuretools.vscode-docker",
|
|
||||||
"antfu.pnpm-catalog-lens",
|
"antfu.pnpm-catalog-lens",
|
||||||
"Lokalise.i18n-ally"
|
"Lokalise.i18n-ally"
|
||||||
]
|
]
|
||||||
|
2
.vscode/react.code-snippets
vendored
2
.vscode/react.code-snippets
vendored
@ -20,7 +20,7 @@
|
|||||||
"scope": "typescriptreact",
|
"scope": "typescriptreact",
|
||||||
"prefix": "rfcs",
|
"prefix": "rfcs",
|
||||||
"body": [
|
"body": [
|
||||||
"import type { Meta, StoryObj } from \"@storybook/react\"",
|
"import type { Meta, StoryObj } from \"@storybook/nextjs\"",
|
||||||
"",
|
"",
|
||||||
"import { ${1:ComponentName} as ${1:ComponentName}Component } from \"./${1:ComponentName}.tsx\"",
|
"import { ${1:ComponentName} as ${1:ComponentName}Component } from \"./${1:ComponentName}.tsx\"",
|
||||||
"",
|
"",
|
||||||
|
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@ -9,13 +9,14 @@
|
|||||||
"source.fixAll": "explicit",
|
"source.fixAll": "explicit",
|
||||||
"source.organizeImports": "never"
|
"source.organizeImports": "never"
|
||||||
},
|
},
|
||||||
|
"tailwindCSS.experimental.configFile": "./configs/config-tailwind/styles.css",
|
||||||
"tailwindCSS.experimental.classRegex": [
|
"tailwindCSS.experimental.classRegex": [
|
||||||
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
|
["cva\\(([^)]*)\\)", "[\"'`]([^\"'`]*).*?[\"'`]"],
|
||||||
["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
|
["cx\\(([^)]*)\\)", "(?:'|\"|`)([^']*)(?:'|\"|`)"]
|
||||||
],
|
],
|
||||||
"i18n-ally.localesPaths": ["./packages/i18n/src/translations/"],
|
"i18n-ally.localesPaths": ["./packages/i18n/src/translations/"],
|
||||||
"i18n-ally.keystyle": "nested",
|
"i18n-ally.keystyle": "nested",
|
||||||
"i18n-ally.sortKeys": true,
|
"i18n-ally.sortKeys": false,
|
||||||
"i18n-ally.sourceLanguage": "en-US",
|
"i18n-ally.sourceLanguage": "en-US",
|
||||||
"i18n-ally.displayLanguage": "en-US",
|
"i18n-ally.displayLanguage": "en-US",
|
||||||
"i18n-ally.enabledFrameworks": ["next-intl", "general"],
|
"i18n-ally.enabledFrameworks": ["next-intl", "general"],
|
||||||
|
@ -20,21 +20,16 @@ community include:
|
|||||||
- Demonstrating empathy and kindness toward other people
|
- Demonstrating empathy and kindness toward other people
|
||||||
- Being respectful of differing opinions, viewpoints, and experiences
|
- Being respectful of differing opinions, viewpoints, and experiences
|
||||||
- Giving and gracefully accepting constructive feedback
|
- Giving and gracefully accepting constructive feedback
|
||||||
- Accepting responsibility and apologizing to those affected by our mistakes,
|
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
||||||
and learning from the experience
|
- Focusing on what is best not just for us as individuals, but for the overall community
|
||||||
- Focusing on what is best not just for us as individuals, but for the
|
|
||||||
overall community
|
|
||||||
|
|
||||||
Examples of unacceptable behavior include:
|
Examples of unacceptable behavior include:
|
||||||
|
|
||||||
- The use of sexualized language or imagery, and sexual attention or
|
- The use of sexualized language or imagery, and sexual attention or advances of any kind
|
||||||
advances of any kind
|
|
||||||
- Trolling, insulting or derogatory comments, and personal or political attacks
|
- Trolling, insulting or derogatory comments, and personal or political attacks
|
||||||
- Public or private harassment
|
- Public or private harassment
|
||||||
- Publishing others' private information, such as a physical or email
|
- Publishing others' private information, such as a physical or email address, without their explicit permission
|
||||||
address, without their explicit permission
|
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||||
- Other conduct which could reasonably be considered inappropriate in a
|
|
||||||
professional setting
|
|
||||||
|
|
||||||
## Enforcement Responsibilities
|
## Enforcement Responsibilities
|
||||||
|
|
||||||
|
@ -31,8 +31,8 @@ The commit message guidelines adheres to [Conventional Commits](https://www.conv
|
|||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
- [Node.js](https://nodejs.org/) >= 22.0.0
|
- [Node.js](https://nodejs.org/) >= v24.0.0 [(`nvm install 24`)](https://nvm.sh)
|
||||||
- [pnpm](https://pnpm.io/) >= 9.14.4 [(`corepack enable`)](https://nodejs.org/docs/latest-v22.x/api/corepack.html)
|
- [pnpm](https://pnpm.io/) v10.11.0 [(`npm install --global corepack@0.32.0 && corepack enable`)](https://github.com/nodejs/corepack)
|
||||||
- [Docker](https://www.docker.com/)
|
- [Docker](https://www.docker.com/)
|
||||||
|
|
||||||
### Installation
|
### Installation
|
||||||
@ -83,9 +83,9 @@ node --run test
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Setup and run all the services for you
|
# Setup and run all the services for you
|
||||||
docker compose up --build
|
VERSION=$(git describe --tags) docker compose up --build --detach
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Services started
|
#### Services started
|
||||||
|
|
||||||
`theoludwig`: <http://127.0.0.1:3000>
|
`theoludwig`: <http://localhost:3000>
|
||||||
|
55
README.md
55
README.md
@ -1,18 +1,18 @@
|
|||||||
<h1 align="center"><a href="https://theoludwig.fr/">Théo LUDWIG</a></h1>
|
<h1 align="center"><a href="https://theoludwig.fr/">Théo LUDWIG</a></h1>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<strong>Developer Full Stack • Open-Source Enthusiast</strong>
|
<strong>Developer Full Stack • Open-Source Enthusiast</strong>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://github.com/theoludwig"><img alt="GitHub" src="https://img.shields.io/badge/-GitHub-5A5A5A?style=flat&labelColor=5A5A5A&logo=github&logoColor=white"/></a>
|
<a href="https://github.com/theoludwig"><img alt="GitHub" src="https://img.shields.io/badge/-GitHub-5A5A5A?style=flat&labelColor=5A5A5A&logo=github&logoColor=white"/></a>
|
||||||
<a href="https://gitlab.com/theoludwig"><img alt="GitLab" src="https://img.shields.io/badge/-GitLab-303030?style=flat&labelColor=303030&logo=gitlab&logoColor=white"/></a>
|
<a href="https://gitlab.com/theoludwig"><img alt="GitLab" src="https://img.shields.io/badge/-GitLab-303030?style=flat&labelColor=303030&logo=gitlab&logoColor=white"/></a>
|
||||||
<a href="https://www.npmjs.com/~theoludwig"><img alt="npm" src="https://img.shields.io/badge/-npm-c4302b?style=flat&labelColor=c4302b&logo=npm&logoColor=white"/></a>
|
<a href="https://www.npmjs.com/~theoludwig"><img alt="npm" src="https://img.shields.io/badge/-npm-c4302b?style=flat&labelColor=c4302b&logo=npm&logoColor=white"/></a>
|
||||||
<a href="https://twitter.com/theoludwig_"><img alt="Twitter" src="https://img.shields.io/badge/-Twitter-1ca0f1?style=flat&labelColor=1ca0f1&logo=x&logoColor=white"/></a>
|
<a href="https://twitter.com/theoludwig_"><img alt="Twitter" src="https://img.shields.io/badge/-Twitter-1ca0f1?style=flat&labelColor=1ca0f1&logo=x&logoColor=white"/></a>
|
||||||
<a href="https://www.youtube.com/@theo_ludwig"><img alt="YouTube" src="https://img.shields.io/badge/-YouTube-c4302b?style=flat&labelColor=c4302b&logo=youtube&logoColor=white"/></a>
|
<a href="https://www.youtube.com/@theo_ludwig"><img alt="YouTube" src="https://img.shields.io/badge/-YouTube-c4302b?style=flat&labelColor=c4302b&logo=youtube&logoColor=white"/></a>
|
||||||
<a href="https://www.twitch.tv/theoludwig"><img alt="Twitch" src="https://img.shields.io/badge/-Twitch-9147FF?style=flat&labelColor=9147FF&logo=twitch&logoColor=white"/></a>
|
<a href="https://www.twitch.tv/theoludwig"><img alt="Twitch" src="https://img.shields.io/badge/-Twitch-9147FF?style=flat&labelColor=9147FF&logo=twitch&logoColor=white"/></a>
|
||||||
<a href="https://theoludwig.fr/"><img alt="Website" src="https://img.shields.io/badge/-Website-181818?style=flat&labelColor=181818&logo=Google-Chrome&logoColor=white"/></a>
|
<a href="https://theoludwig.fr/"><img alt="Website" src="https://img.shields.io/badge/-Website-181818?style=flat&labelColor=181818&logo=Google-Chrome&logoColor=white"/></a>
|
||||||
<a href="mailto:contact@theoludwig.fr"><img alt="Email" src="https://img.shields.io/badge/-contact@theoludwig.fr-2F7EBE?style=flat&labelColor=2F7EBE&logo=minutemailer&logoColor=white"/></a>
|
<a href="mailto:contact@theoludwig.fr"><img alt="Email" src="https://img.shields.io/badge/-contact@theoludwig.fr-2F7EBE?style=flat&labelColor=2F7EBE&logo=minutemailer&logoColor=white"/></a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<hr />
|
<hr />
|
||||||
@ -21,17 +21,28 @@
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"name": "Théo LUDWIG",
|
"name": "Théo LUDWIG",
|
||||||
"pronouns": "He/Him",
|
"pronouns": "He/Him",
|
||||||
"birthDate": "2003-03-31",
|
"birthDate": "2003-03-31",
|
||||||
"nationality": "Alsace, France",
|
"nationality": "Alsace, France",
|
||||||
"interests": ["Developer Full Stack", "Open-Source Enthusiast"],
|
"interests": ["Developer Full Stack", "Open-Source Enthusiast"],
|
||||||
"skills": {
|
"skills": {
|
||||||
"programmingLanguages": ["JavaScript/TypeScript", "Python", "C/C++", "PHP"],
|
"programmingLanguages": [
|
||||||
"frontend": ["HTML/CSS", "Tailwind CSS", "React.js/Next.js"],
|
"JavaScript/TypeScript",
|
||||||
"backend": ["Laravel", "Node.js", "Fastify", "PostgreSQL"],
|
"Python",
|
||||||
"tools": ["GNU/Linux", "Arch Linux", "Visual Studio Code", "Git", "Docker"]
|
"C/C++",
|
||||||
}
|
"PHP"
|
||||||
|
],
|
||||||
|
"frontend": ["HTML/CSS", "Tailwind CSS", "React.js/Next.js"],
|
||||||
|
"backend": ["Laravel", "Node.js", "Fastify", "PostgreSQL"],
|
||||||
|
"tools": [
|
||||||
|
"GNU/Linux",
|
||||||
|
"Arch Linux",
|
||||||
|
"Visual Studio Code",
|
||||||
|
"Git",
|
||||||
|
"Docker"
|
||||||
|
]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -40,6 +51,6 @@
|
|||||||
## 📈 Statistics
|
## 📈 Statistics
|
||||||
|
|
||||||
<p align=center>
|
<p align=center>
|
||||||
<img height=175 align="center" src="https://github-readme-stats.vercel.app/api?username=theoludwig&show_icons=true&theme=dark" alt="Théo LUDWIG's GitHub Stats" />
|
<img height=175 align="center" src="https://github-readme-stats.vercel.app/api?username=theoludwig&show_icons=true&theme=dark" alt="Théo LUDWIG's GitHub Stats" />
|
||||||
<img height=175 align="center" src="https://github-readme-stats.vercel.app/api/top-langs/?username=theoludwig&hide=html,css,javascript&langs_count=8&layout=compact&theme=dark" alt="Théo LUDWIG's Programming Languages" />
|
<img height=175 align="center" src="https://github-readme-stats.vercel.app/api/top-langs/?username=theoludwig&hide=html,css,javascript&langs_count=8&layout=compact&theme=dark" alt="Théo LUDWIG's Programming Languages" />
|
||||||
</p>
|
</p>
|
||||||
|
5
apps/storybook/.postcssrc.json
Normal file
5
apps/storybook/.postcssrc.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"plugins": {
|
||||||
|
"@tailwindcss/postcss": {}
|
||||||
|
}
|
||||||
|
}
|
@ -14,11 +14,8 @@ const config: StorybookConfig = {
|
|||||||
],
|
],
|
||||||
addons: [
|
addons: [
|
||||||
"@chromatic-com/storybook",
|
"@chromatic-com/storybook",
|
||||||
"@storybook/addon-essentials",
|
"@storybook/addon-docs",
|
||||||
"@storybook/addon-storysource",
|
|
||||||
"@storybook/addon-a11y",
|
"@storybook/addon-a11y",
|
||||||
"@storybook/addon-interactions",
|
|
||||||
"storybook-dark-mode",
|
|
||||||
],
|
],
|
||||||
framework: {
|
framework: {
|
||||||
name: "@storybook/nextjs",
|
name: "@storybook/nextjs",
|
||||||
|
@ -1,13 +1,22 @@
|
|||||||
import "@repo/config-tailwind/styles.css"
|
import "@repo/config-tailwind/styles.css"
|
||||||
|
import "./storybook-css-overrides.css"
|
||||||
import i18nMessages from "@repo/i18n/translations/en-US.json"
|
import i18nMessages from "@repo/i18n/translations/en-US.json"
|
||||||
import { LOCALE_DEFAULT, TIMEZONE } from "@repo/utils/constants"
|
import { LOCALE_DEFAULT, TIMEZONE } from "@repo/utils/constants"
|
||||||
import type { Preview } from "@storybook/react"
|
import type { Preview } from "@storybook/nextjs"
|
||||||
import { NextIntlClientProvider } from "next-intl"
|
import { NextIntlClientProvider } from "next-intl"
|
||||||
import { ThemeProvider as NextThemeProvider } from "next-themes"
|
import { ThemeProvider as NextThemeProvider } from "next-themes"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
|
|
||||||
const preview: Preview = {
|
const preview: Preview = {
|
||||||
|
initialGlobals: {
|
||||||
|
a11y: {
|
||||||
|
manual: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
parameters: {
|
parameters: {
|
||||||
|
docs: {
|
||||||
|
codePanel: true,
|
||||||
|
},
|
||||||
nextjs: {
|
nextjs: {
|
||||||
appDirectory: true,
|
appDirectory: true,
|
||||||
},
|
},
|
||||||
|
3
apps/storybook/.storybook/storybook-css-overrides.css
Normal file
3
apps/storybook/.storybook/storybook-css-overrides.css
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
body {
|
||||||
|
overflow: auto !important;
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
import typescriptESLint from "typescript-eslint"
|
import typescriptESLint from "typescript-eslint"
|
||||||
import config from "@repo/eslint-config"
|
import config from "@repo/config-eslint"
|
||||||
|
|
||||||
export default typescriptESLint.config(...config, {
|
export default typescriptESLint.config(...config, {
|
||||||
files: ["**/*.ts", "**/*.tsx"],
|
files: ["**/*.ts", "**/*.tsx"],
|
||||||
|
84
apps/storybook/http-server.ts
Normal file
84
apps/storybook/http-server.ts
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
import http from "node:http"
|
||||||
|
import fs from "node:fs"
|
||||||
|
import path from "node:path"
|
||||||
|
import util from "node:util"
|
||||||
|
import mime from "mime"
|
||||||
|
|
||||||
|
const MIMETYPE_DEFAULT = "application/octet-stream"
|
||||||
|
|
||||||
|
const args = util.parseArgs({
|
||||||
|
options: {
|
||||||
|
path: { type: "string", default: "public", required: true },
|
||||||
|
port: { type: "string", default: "3000", required: true },
|
||||||
|
host: { type: "string", default: "0.0.0.0" },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const host = args.values.host
|
||||||
|
const basePath = args.values.path
|
||||||
|
|
||||||
|
const port = Number.parseInt(args.values.port, 10)
|
||||||
|
if (Number.isNaN(port)) {
|
||||||
|
console.error("Error: Invalid port number.")
|
||||||
|
process.exit(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
const serverURL = `http://${host}:${port}`
|
||||||
|
|
||||||
|
const server = http.createServer(async (request, response) => {
|
||||||
|
if (request.url == null) {
|
||||||
|
response.writeHead(400, { "Content-Type": "text/plain" })
|
||||||
|
response.end("Bad Request")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
const url = new URL(request.url, serverURL)
|
||||||
|
const urlPath = url.pathname
|
||||||
|
const filePath = path.join(process.cwd(), basePath, urlPath)
|
||||||
|
try {
|
||||||
|
const stat = await fs.promises.stat(filePath)
|
||||||
|
if (stat.isDirectory()) {
|
||||||
|
const indexFile = path.join(filePath, "index.html")
|
||||||
|
try {
|
||||||
|
const fileContent = await fs.promises.readFile(indexFile)
|
||||||
|
response.writeHead(200, { "Content-Type": "text/html" })
|
||||||
|
response.end(fileContent)
|
||||||
|
} catch {
|
||||||
|
response.writeHead(403, { "Content-Type": "text/plain" })
|
||||||
|
response.end("Error: Directory listing not allowed.")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
const mimeType = mime.getType(filePath) ?? MIMETYPE_DEFAULT
|
||||||
|
const fileContent = await fs.promises.readFile(filePath)
|
||||||
|
response.writeHead(200, { "Content-Type": mimeType })
|
||||||
|
response.end(fileContent)
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
if (error instanceof Error && "code" in error && error.code === "ENOENT") {
|
||||||
|
response.writeHead(404, { "Content-Type": "text/plain" })
|
||||||
|
response.end("Error: File not found.")
|
||||||
|
} else {
|
||||||
|
response.writeHead(500, { "Content-Type": "text/plain" })
|
||||||
|
response.end("Error: Internal Server Error.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const gracefulShutdown = (): void => {
|
||||||
|
server.close()
|
||||||
|
process.exit(0)
|
||||||
|
}
|
||||||
|
process.on("SIGTERM", gracefulShutdown)
|
||||||
|
process.on("SIGINT", gracefulShutdown)
|
||||||
|
|
||||||
|
server.listen(
|
||||||
|
{
|
||||||
|
host,
|
||||||
|
port,
|
||||||
|
},
|
||||||
|
() => {
|
||||||
|
console.log(
|
||||||
|
`HTTP Server is listening at ${util.styleText("cyan", serverURL)}`,
|
||||||
|
)
|
||||||
|
console.log(`Serving files from: \`${basePath}\``)
|
||||||
|
},
|
||||||
|
)
|
@ -1,14 +1,14 @@
|
|||||||
{
|
{
|
||||||
"name": "@repo/storybook",
|
"name": "@repo/storybook",
|
||||||
"version": "4.1.1",
|
"version": "0.0.0-develop",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "storybook build",
|
"build": "storybook build",
|
||||||
"dev": "storybook dev --port 6006 --no-open",
|
"dev": "storybook dev --port 6006 --no-open",
|
||||||
"start": "http-server \"storybook-static\" --port 6006 --silent",
|
"start": "node http-server.ts --path=storybook-static --port=6006",
|
||||||
"test": "start-server-and-test \"start\" http://127.0.0.1:6006 \"test:storybook\"",
|
"test": "start-server-and-test \"start\" http://localhost:6006 \"test:storybook\"",
|
||||||
"test:dev": "start-server-and-test \"dev\" http://127.0.0.1:6006 \"test:storybook\"",
|
"test:dev": "start-server-and-test \"dev\" http://localhost:6006 \"test:storybook\"",
|
||||||
"test:storybook": "test-storybook --testTimeout=60000 --maxWorkers=2",
|
"test:storybook": "test-storybook --testTimeout=60000 --maxWorkers=2",
|
||||||
"chromatic": "chromatic"
|
"chromatic": "chromatic"
|
||||||
},
|
},
|
||||||
@ -22,22 +22,18 @@
|
|||||||
"next-intl": "catalog:",
|
"next-intl": "catalog:",
|
||||||
"next-themes": "catalog:",
|
"next-themes": "catalog:",
|
||||||
"react": "catalog:",
|
"react": "catalog:",
|
||||||
"react-dom": "catalog:"
|
"react-dom": "catalog:",
|
||||||
|
"mime": "catalog:"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@repo/eslint-config": "workspace:*",
|
"@repo/config-eslint": "workspace:*",
|
||||||
"@repo/config-typescript": "workspace:*",
|
"@repo/config-typescript": "workspace:*",
|
||||||
"@chromatic-com/storybook": "catalog:",
|
"@chromatic-com/storybook": "catalog:",
|
||||||
"@playwright/test": "catalog:",
|
"@playwright/test": "catalog:",
|
||||||
"@storybook/addon-essentials": "catalog:",
|
"@storybook/addon-docs": "catalog:",
|
||||||
"@storybook/addon-storysource": "catalog:",
|
|
||||||
"@storybook/addon-a11y": "catalog:",
|
"@storybook/addon-a11y": "catalog:",
|
||||||
"@storybook/addon-interactions": "catalog:",
|
|
||||||
"@storybook/addon-themes": "catalog:",
|
"@storybook/addon-themes": "catalog:",
|
||||||
"@storybook/blocks": "catalog:",
|
|
||||||
"@storybook/nextjs": "catalog:",
|
"@storybook/nextjs": "catalog:",
|
||||||
"@storybook/react": "catalog:",
|
|
||||||
"@storybook/test": "catalog:",
|
|
||||||
"@storybook/test-runner": "catalog:",
|
"@storybook/test-runner": "catalog:",
|
||||||
"@types/node": "catalog:",
|
"@types/node": "catalog:",
|
||||||
"@types/react": "catalog:",
|
"@types/react": "catalog:",
|
||||||
@ -45,12 +41,11 @@
|
|||||||
"axe-playwright": "catalog:",
|
"axe-playwright": "catalog:",
|
||||||
"chromatic": "catalog:",
|
"chromatic": "catalog:",
|
||||||
"eslint": "catalog:",
|
"eslint": "catalog:",
|
||||||
"http-server": "catalog:",
|
|
||||||
"start-server-and-test": "catalog:",
|
"start-server-and-test": "catalog:",
|
||||||
"storybook": "catalog:",
|
"storybook": "catalog:",
|
||||||
"storybook-dark-mode": "catalog:",
|
|
||||||
"postcss": "catalog:",
|
"postcss": "catalog:",
|
||||||
"tailwindcss": "catalog:",
|
"tailwindcss": "catalog:",
|
||||||
|
"@tailwindcss/postcss": "catalog:",
|
||||||
"typescript-eslint": "catalog:",
|
"typescript-eslint": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:"
|
||||||
}
|
}
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
const config = {
|
|
||||||
plugins: {
|
|
||||||
tailwindcss: {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
export default config
|
|
@ -1,4 +1,9 @@
|
|||||||
import { Meta, Title, ColorPalette, ColorItem } from "@storybook/blocks"
|
import {
|
||||||
|
Meta,
|
||||||
|
Title,
|
||||||
|
ColorPalette,
|
||||||
|
ColorItem,
|
||||||
|
} from "@storybook/addon-docs/blocks"
|
||||||
import tailwindConfig from "@repo/config-tailwind"
|
import tailwindConfig from "@repo/config-tailwind"
|
||||||
|
|
||||||
<Meta title="Design System/Colors" />
|
<Meta title="Design System/Colors" />
|
||||||
|
@ -2,11 +2,6 @@ import sharedConfig from "@repo/config-tailwind"
|
|||||||
|
|
||||||
/** @type {Pick<import('tailwindcss').Config, "presets" | "content">} */
|
/** @type {Pick<import('tailwindcss').Config, "presets" | "content">} */
|
||||||
const config = {
|
const config = {
|
||||||
content: [
|
|
||||||
".storybook/preview.tsx",
|
|
||||||
"../../packages/ui/src/**/*.tsx",
|
|
||||||
"../../packages/blog/src/**/*.tsx",
|
|
||||||
],
|
|
||||||
presets: [sharedConfig],
|
presets: [sharedConfig],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,5 +3,5 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"lib": ["DOM", "DOM.Iterable", "ESNext"]
|
"lib": ["DOM", "DOM.Iterable", "ESNext"]
|
||||||
},
|
},
|
||||||
"include": ["./.storybook/**/*.ts", "./.storybook/**/*.tsx"]
|
"include": ["http-server.ts", "./.storybook/**/*.ts", "./.storybook/**/*.tsx"]
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://turbo.build/schema.json",
|
"$schema": "../../node_modules/turbo/schema.json",
|
||||||
"extends": ["//"],
|
"extends": ["//"],
|
||||||
"tasks": {
|
"tasks": {
|
||||||
"test": {
|
"test": {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
TZ=UTC
|
TZ=Europe/Paris
|
||||||
HOSTNAME=0.0.0.0
|
HOSTNAME=0.0.0.0
|
||||||
PORT=3000
|
PORT=3000
|
||||||
NEXT_TELEMETRY_DISABLED=1
|
NEXT_TELEMETRY_DISABLED=1
|
||||||
|
5
apps/website/.postcssrc.json
Normal file
5
apps/website/.postcssrc.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"plugins": {
|
||||||
|
"@tailwindcss/postcss": {}
|
||||||
|
}
|
||||||
|
}
|
@ -1,14 +1,15 @@
|
|||||||
FROM node:22.12.0-slim AS node-pnpm
|
FROM node:24.1.0-slim AS node-pnpm
|
||||||
ENV PNPM_HOME="/pnpm"
|
ENV PNPM_HOME="/pnpm"
|
||||||
ENV PATH="$PNPM_HOME:$PATH"
|
ENV PATH="$PNPM_HOME:$PATH"
|
||||||
RUN corepack enable
|
RUN npm install --global corepack@0.32.0 && corepack enable
|
||||||
ENV TURBO_TELEMETRY_DISABLED=1
|
ENV TURBO_TELEMETRY_DISABLED=1
|
||||||
|
ENV NEXT_TELEMETRY_DISABLED=1
|
||||||
ENV DO_NOT_TRACK=1
|
ENV DO_NOT_TRACK=1
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
FROM node-pnpm AS builder
|
FROM node-pnpm AS builder
|
||||||
COPY ./ ./
|
COPY ./ ./
|
||||||
RUN pnpm install --global turbo@2.3.3
|
RUN pnpm install --global turbo@2.5.3
|
||||||
RUN turbo prune @repo/website --docker
|
RUN turbo prune @repo/website --docker
|
||||||
|
|
||||||
FROM node-pnpm AS installer
|
FROM node-pnpm AS installer
|
||||||
@ -20,12 +21,15 @@ COPY --from=builder /usr/src/app/out/pnpm-lock.yaml ./pnpm-lock.yaml
|
|||||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile
|
||||||
COPY --from=builder /usr/src/app/out/full/ ./
|
COPY --from=builder /usr/src/app/out/full/ ./
|
||||||
COPY turbo.json turbo.json
|
COPY turbo.json turbo.json
|
||||||
|
|
||||||
|
ARG VERSION="0.0.0-develop"
|
||||||
|
RUN pnpm install --global replace-in-files-cli@3.0.0
|
||||||
|
RUN VERSION_STRIPPED=${VERSION#v} && replace-in-files --regex='version": *"[^"]*' --replacement='"version": "'"$VERSION_STRIPPED"'"' '**/package.json' '!**/node_modules/**'
|
||||||
RUN pnpm --filter=@repo/website... exec turbo run build
|
RUN pnpm --filter=@repo/website... exec turbo run build
|
||||||
|
|
||||||
FROM node-pnpm AS runner
|
FROM node-pnpm AS runner
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
ENV HOSTNAME=0.0.0.0
|
ENV HOSTNAME=0.0.0.0
|
||||||
ENV NEXT_TELEMETRY_DISABLED=1
|
|
||||||
ENV IS_STANDALONE=true
|
ENV IS_STANDALONE=true
|
||||||
|
|
||||||
RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 applicationrunner
|
RUN addgroup --system --gid 1001 nodejs && adduser --system --uid 1001 applicationrunner
|
||||||
|
@ -2,13 +2,20 @@ import "@repo/config-tailwind/styles.css"
|
|||||||
import type { LocaleProps } from "@repo/i18n/routing"
|
import type { LocaleProps } from "@repo/i18n/routing"
|
||||||
import type { Locale } from "@repo/utils/constants"
|
import type { Locale } from "@repo/utils/constants"
|
||||||
import { LOCALES } from "@repo/utils/constants"
|
import { LOCALES } from "@repo/utils/constants"
|
||||||
import type { Metadata } from "next"
|
import type { Metadata, Viewport } from "next"
|
||||||
import { NextIntlClientProvider } from "next-intl"
|
import { NextIntlClientProvider } from "next-intl"
|
||||||
import {
|
import {
|
||||||
getMessages,
|
getMessages,
|
||||||
getTranslations,
|
getTranslations,
|
||||||
setRequestLocale,
|
setRequestLocale,
|
||||||
} from "next-intl/server"
|
} from "next-intl/server"
|
||||||
|
import Script from "next/script"
|
||||||
|
|
||||||
|
const DOMAIN = "theoludwig.fr"
|
||||||
|
|
||||||
|
export const viewport: Viewport = {
|
||||||
|
themeColor: "#00aeff",
|
||||||
|
}
|
||||||
|
|
||||||
export const generateMetadata = async ({
|
export const generateMetadata = async ({
|
||||||
params,
|
params,
|
||||||
@ -18,7 +25,7 @@ export const generateMetadata = async ({
|
|||||||
const title = t("meta.title")
|
const title = t("meta.title")
|
||||||
const description = `${title} - ${t("meta.description")}`
|
const description = `${title} - ${t("meta.description")}`
|
||||||
const image = "/images/logo.webp"
|
const image = "/images/logo.webp"
|
||||||
const url = new URL("https://theoludwig.fr")
|
const url = new URL(`https://${DOMAIN}`)
|
||||||
const locales = LOCALES.join(", ")
|
const locales = LOCALES.join(", ")
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@ -74,6 +81,12 @@ const LocaleLayout: React.FC<LocaleLayoutProps> = async (props) => {
|
|||||||
<NextIntlClientProvider messages={messages}>
|
<NextIntlClientProvider messages={messages}>
|
||||||
{children}
|
{children}
|
||||||
</NextIntlClientProvider>
|
</NextIntlClientProvider>
|
||||||
|
|
||||||
|
<Script
|
||||||
|
defer
|
||||||
|
data-domain={DOMAIN}
|
||||||
|
src="https://plausible.theoludwig.fr/js/script.js"
|
||||||
|
/>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
)
|
)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import typescriptESLint from "typescript-eslint"
|
import typescriptESLint from "typescript-eslint"
|
||||||
import configNextjs from "@repo/eslint-config/nextjs"
|
import configNextjs from "@repo/config-eslint/nextjs"
|
||||||
|
|
||||||
export default typescriptESLint.config(...configNextjs, {
|
export default typescriptESLint.config(...configNextjs, {
|
||||||
files: ["**/*.ts", "**/*.tsx"],
|
files: ["**/*.ts", "**/*.tsx"],
|
||||||
|
@ -21,6 +21,6 @@ export const config = {
|
|||||||
* - _next/image (image optimization files)
|
* - _next/image (image optimization files)
|
||||||
* - favicon.ico (favicon file)
|
* - favicon.ico (favicon file)
|
||||||
*/
|
*/
|
||||||
"/((?!api|_next/static|_next/image|images|favicon.ico).*)",
|
"/((?!api|_next/static|_next/image|images|favicon.ico|robots.txt).*)",
|
||||||
],
|
],
|
||||||
}
|
}
|
||||||
|
2
apps/website/next-env.d.ts
vendored
2
apps/website/next-env.d.ts
vendored
@ -2,4 +2,4 @@
|
|||||||
/// <reference types="next/image-types/global" />
|
/// <reference types="next/image-types/global" />
|
||||||
|
|
||||||
// NOTE: This file should not be edited
|
// NOTE: This file should not be edited
|
||||||
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
|
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||||
|
@ -8,7 +8,6 @@ const nextConfig = {
|
|||||||
images: {
|
images: {
|
||||||
unoptimized: true,
|
unoptimized: true,
|
||||||
},
|
},
|
||||||
compress: false,
|
|
||||||
eslint: {
|
eslint: {
|
||||||
ignoreDuringBuilds: true,
|
ignoreDuringBuilds: true,
|
||||||
},
|
},
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@repo/website",
|
"name": "@repo/website",
|
||||||
"version": "4.1.1",
|
"version": "0.0.0-develop",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"imports": {
|
"imports": {
|
||||||
@ -28,7 +28,7 @@
|
|||||||
"react-dom": "catalog:"
|
"react-dom": "catalog:"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@repo/eslint-config": "workspace:*",
|
"@repo/config-eslint": "workspace:*",
|
||||||
"@repo/config-typescript": "workspace:*",
|
"@repo/config-typescript": "workspace:*",
|
||||||
"@types/node": "catalog:",
|
"@types/node": "catalog:",
|
||||||
"@types/react": "catalog:",
|
"@types/react": "catalog:",
|
||||||
@ -37,6 +37,7 @@
|
|||||||
"eslint": "catalog:",
|
"eslint": "catalog:",
|
||||||
"postcss": "catalog:",
|
"postcss": "catalog:",
|
||||||
"tailwindcss": "catalog:",
|
"tailwindcss": "catalog:",
|
||||||
|
"@tailwindcss/postcss": "catalog:",
|
||||||
"typescript-eslint": "catalog:",
|
"typescript-eslint": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:"
|
||||||
}
|
}
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
const config = {
|
|
||||||
plugins: {
|
|
||||||
tailwindcss: {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
export default config
|
|
BIN
apps/website/public/images/portfolio/Fusey.webp
Normal file
BIN
apps/website/public/images/portfolio/Fusey.webp
Normal file
Binary file not shown.
After Width: | Height: | Size: 945 KiB |
@ -2,11 +2,6 @@ import sharedConfig from "@repo/config-tailwind"
|
|||||||
|
|
||||||
/** @type {Pick<import('tailwindcss').Config, "presets" | "content">} */
|
/** @type {Pick<import('tailwindcss').Config, "presets" | "content">} */
|
||||||
const config = {
|
const config = {
|
||||||
content: [
|
|
||||||
"./app/**/*.tsx",
|
|
||||||
"../../packages/ui/src/**/*.tsx",
|
|
||||||
"../../packages/blog/src/**/*.tsx",
|
|
||||||
],
|
|
||||||
presets: [sharedConfig],
|
presets: [sharedConfig],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,6 +6,8 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: "./"
|
context: "./"
|
||||||
dockerfile: "./apps/website/Dockerfile"
|
dockerfile: "./apps/website/Dockerfile"
|
||||||
|
args:
|
||||||
|
VERSION: ${VERSION-0.0.0-develop}
|
||||||
ports:
|
ports:
|
||||||
- "${WEBSITE_PORT-3000}:${WEBSITE_PORT-3000}"
|
- "${WEBSITE_PORT-3000}:${WEBSITE_PORT-3000}"
|
||||||
environment:
|
environment:
|
||||||
|
@ -10,7 +10,6 @@ export default typescriptESLint.config(
|
|||||||
"**/eslint.config.js",
|
"**/eslint.config.js",
|
||||||
"**/tailwind.config.js",
|
"**/tailwind.config.js",
|
||||||
"**/postcss.config.js",
|
"**/postcss.config.js",
|
||||||
"**/vitest.config.ts",
|
|
||||||
"**/kysely.config.ts",
|
"**/kysely.config.ts",
|
||||||
],
|
],
|
||||||
},
|
},
|
@ -1,29 +1,22 @@
|
|||||||
import { FlatCompat } from "@eslint/eslintrc"
|
import { FlatCompat } from "@eslint/eslintrc"
|
||||||
import storybook from "eslint-plugin-storybook"
|
|
||||||
import tailwind from "eslint-plugin-tailwindcss"
|
|
||||||
import typescriptESLint from "typescript-eslint"
|
import typescriptESLint from "typescript-eslint"
|
||||||
import config from "../eslint.config.js"
|
import config from "../eslint.config.js"
|
||||||
|
|
||||||
const flatCompat = new FlatCompat()
|
const flatCompat = new FlatCompat({
|
||||||
|
baseDirectory: import.meta.dirname,
|
||||||
|
})
|
||||||
|
|
||||||
export default typescriptESLint.config(
|
export default typescriptESLint.config(
|
||||||
...config,
|
...config,
|
||||||
...flatCompat.extends("next/core-web-vitals"),
|
...flatCompat.extends("next/core-web-vitals"),
|
||||||
...tailwind.configs["flat/recommended"],
|
|
||||||
...storybook.configs["flat/recommended"],
|
|
||||||
{
|
{
|
||||||
name: "config-eslint/nextjs",
|
name: "config-eslint/nextjs",
|
||||||
settings: {
|
settings: {
|
||||||
tailwindcss: {
|
|
||||||
callees: ["classNames", "cva"],
|
|
||||||
},
|
|
||||||
react: {
|
react: {
|
||||||
version: "detect",
|
version: "detect",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
"tailwindcss/classnames-order": "off",
|
|
||||||
"tailwindcss/no-custom-classname": "off",
|
|
||||||
"@next/next/no-html-link-for-pages": "off",
|
"@next/next/no-html-link-for-pages": "off",
|
||||||
"@next/next/no-img-element": "off",
|
"@next/next/no-img-element": "off",
|
||||||
"react/self-closing-comp": [
|
"react/self-closing-comp": [
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@repo/eslint-config",
|
"name": "@repo/config-eslint",
|
||||||
"version": "4.1.1",
|
"version": "0.0.0-develop",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
@ -25,8 +25,6 @@
|
|||||||
"eslint-plugin-promise": "catalog:",
|
"eslint-plugin-promise": "catalog:",
|
||||||
"eslint-plugin-unicorn": "catalog:",
|
"eslint-plugin-unicorn": "catalog:",
|
||||||
"eslint-config-next": "catalog:",
|
"eslint-config-next": "catalog:",
|
||||||
"eslint-plugin-storybook": "catalog:",
|
|
||||||
"eslint-plugin-tailwindcss": "catalog:",
|
|
||||||
"eslint-plugin-import-x": "catalog:",
|
"eslint-plugin-import-x": "catalog:",
|
||||||
"typescript": "catalog:",
|
"typescript": "catalog:",
|
||||||
"globals": "catalog:"
|
"globals": "catalog:"
|
5
configs/config-tailwind/.postcssrc.json
Normal file
5
configs/config-tailwind/.postcssrc.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"plugins": {
|
||||||
|
"@tailwindcss/postcss": {}
|
||||||
|
}
|
||||||
|
}
|
@ -1,4 +1,5 @@
|
|||||||
import { type ClassValue, clsx } from "clsx"
|
import type { ClassValue } from "clsx"
|
||||||
|
import { clsx } from "clsx"
|
||||||
import { twMerge } from "tailwind-merge"
|
import { twMerge } from "tailwind-merge"
|
||||||
|
|
||||||
export const classNames = (...inputs: ClassValue[]): string => {
|
export const classNames = (...inputs: ClassValue[]): string => {
|
@ -1,5 +1,5 @@
|
|||||||
import typescriptESLint from "typescript-eslint"
|
import typescriptESLint from "typescript-eslint"
|
||||||
import config from "@repo/eslint-config"
|
import config from "@repo/config-eslint"
|
||||||
|
|
||||||
export default typescriptESLint.config(...config, {
|
export default typescriptESLint.config(...config, {
|
||||||
files: ["**/*.ts", "**/*.tsx"],
|
files: ["**/*.ts", "**/*.tsx"],
|
5
configs/config-tailwind/index.d.ts
vendored
Normal file
5
configs/config-tailwind/index.d.ts
vendored
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import type { Config } from "tailwindcss"
|
||||||
|
|
||||||
|
declare const config: Config
|
||||||
|
|
||||||
|
export default config
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@repo/config-tailwind",
|
"name": "@repo/config-tailwind",
|
||||||
"version": "4.1.1",
|
"version": "0.0.0-develop",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./tailwind.config.js",
|
"main": "./tailwind.config.js",
|
||||||
@ -21,12 +21,13 @@
|
|||||||
"tailwind-merge": "catalog:"
|
"tailwind-merge": "catalog:"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@repo/eslint-config": "workspace:*",
|
"@repo/config-eslint": "workspace:*",
|
||||||
"@repo/config-typescript": "workspace:*",
|
"@repo/config-typescript": "workspace:*",
|
||||||
"@tailwindcss/typography": "catalog:",
|
"@tailwindcss/typography": "catalog:",
|
||||||
"typescript-eslint": "catalog:",
|
"typescript-eslint": "catalog:",
|
||||||
"eslint": "catalog:",
|
"eslint": "catalog:",
|
||||||
"postcss": "catalog:",
|
"postcss": "catalog:",
|
||||||
"tailwindcss": "catalog:"
|
"tailwindcss": "catalog:",
|
||||||
|
"@tailwindcss/postcss": "catalog:"
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,16 +1,27 @@
|
|||||||
@import "@fontsource/montserrat/400.css";
|
@import "tailwindcss";
|
||||||
@import "@fontsource/montserrat/500.css";
|
@config "./tailwind.config.js";
|
||||||
@import "@fontsource/montserrat/600.css";
|
|
||||||
@import "@fontsource/montserrat/700.css";
|
|
||||||
@import "@fontsource/montserrat/800.css";
|
|
||||||
|
|
||||||
@tailwind base;
|
@source "../../apps/website/app";
|
||||||
@tailwind components;
|
@source "../../apps/website/components";
|
||||||
@tailwind utilities;
|
@source "../../apps/storybook/.storybook";
|
||||||
|
@source "../../packages/ui/src";
|
||||||
|
@source "../../packages/blog/src";
|
||||||
|
|
||||||
|
@import "@fontsource/montserrat/400.css" layer(base);
|
||||||
|
@import "@fontsource/montserrat/500.css" layer(base);
|
||||||
|
@import "@fontsource/montserrat/600.css" layer(base);
|
||||||
|
@import "@fontsource/montserrat/700.css" layer(base);
|
||||||
|
@import "@fontsource/montserrat/800.css" layer(base);
|
||||||
|
|
||||||
@layer base {
|
@layer base {
|
||||||
* {
|
[type="search"]::-webkit-search-decoration,
|
||||||
min-width: 0;
|
[type="search"]::-webkit-search-cancel-button {
|
||||||
|
appearance: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:not(:disabled),
|
||||||
|
[role="button"]:not(:disabled) {
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
b,
|
b,
|
@ -1,5 +1,4 @@
|
|||||||
import typographyPlugin from "@tailwindcss/typography"
|
import typographyPlugin from "@tailwindcss/typography"
|
||||||
import { fontFamily } from "tailwindcss/defaultTheme"
|
|
||||||
|
|
||||||
/** @type {Omit<import('tailwindcss').Config, "content">} */
|
/** @type {Omit<import('tailwindcss').Config, "content">} */
|
||||||
const config = {
|
const config = {
|
||||||
@ -29,7 +28,7 @@ const config = {
|
|||||||
lightFlag: "0px 1px 10px rgba(0, 0, 0, 0.25)",
|
lightFlag: "0px 1px 10px rgba(0, 0, 0, 0.25)",
|
||||||
},
|
},
|
||||||
fontFamily: {
|
fontFamily: {
|
||||||
sans: ["'Montserrat'", ...fontFamily.sans],
|
sans: ["Montserrat", "sans-serif"],
|
||||||
},
|
},
|
||||||
typography: {
|
typography: {
|
||||||
DEFAULT: {
|
DEFAULT: {
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@repo/config-typescript",
|
"name": "@repo/config-typescript",
|
||||||
"version": "4.1.1",
|
"version": "0.0.0-develop",
|
||||||
"private": true,
|
"private": true,
|
||||||
"files": [
|
"files": [
|
||||||
"tsconfig.json"
|
"tsconfig.json"
|
@ -11,6 +11,7 @@
|
|||||||
"noUncheckedIndexedAccess": true,
|
"noUncheckedIndexedAccess": true,
|
||||||
"noUnusedLocals": true,
|
"noUnusedLocals": true,
|
||||||
"noUnusedParameters": true,
|
"noUnusedParameters": true,
|
||||||
|
"erasableSyntaxOnly": true,
|
||||||
|
|
||||||
"verbatimModuleSyntax": true,
|
"verbatimModuleSyntax": true,
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
17
package.json
17
package.json
@ -1,29 +1,24 @@
|
|||||||
{
|
{
|
||||||
"name": "repo",
|
"name": "repo",
|
||||||
"version": "4.1.1",
|
"version": "0.0.0-develop",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"packageManager": "pnpm@9.14.4+sha512.c8180b3fbe4e4bca02c94234717896b5529740a6cbadf19fa78254270403ea2f27d4e1d46a08a0f56c89b63dc8ebfd3ee53326da720273794e6200fcf0d184ab",
|
"packageManager": "pnpm@10.11.0+sha512.6540583f41cc5f628eb3d9773ecee802f4f9ef9923cc45b69890fb47991d4b092964694ec3a4f738a420c918a333062c8b925d312f42e4f0c263eb603551f977",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=22.0.0",
|
"node": ">=24.0.0"
|
||||||
"pnpm": ">=9.14.4"
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "turbo run build",
|
|
||||||
"dev": "turbo run dev --parallel",
|
"dev": "turbo run dev --parallel",
|
||||||
"start": "turbo run start --parallel",
|
"start": "turbo run start --parallel",
|
||||||
|
"build": "turbo run build",
|
||||||
"test": "turbo run test",
|
"test": "turbo run test",
|
||||||
"lint:editorconfig": "editorconfig-checker",
|
"lint:editorconfig": "editorconfig-checker",
|
||||||
"lint:markdown": "markdownlint-cli2",
|
"lint:markdown": "markdownlint-cli2",
|
||||||
"lint:typescript": "turbo run lint:typescript",
|
"lint:typescript": "turbo run lint:typescript",
|
||||||
"lint:eslint": "turbo run lint:eslint",
|
"lint:eslint": "turbo run lint:eslint",
|
||||||
"lint:prettier": "prettier . --check",
|
"lint:prettier": "prettier . --check"
|
||||||
"release": "semantic-release"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@saithodev/semantic-release-backmerge": "catalog:",
|
|
||||||
"@semantic-release/exec": "catalog:",
|
|
||||||
"@semantic-release/git": "catalog:",
|
|
||||||
"editorconfig-checker": "catalog:",
|
"editorconfig-checker": "catalog:",
|
||||||
"playwright": "catalog:",
|
"playwright": "catalog:",
|
||||||
"prettier": "catalog:",
|
"prettier": "catalog:",
|
||||||
@ -31,8 +26,6 @@
|
|||||||
"markdownlint-cli2": "catalog:",
|
"markdownlint-cli2": "catalog:",
|
||||||
"markdownlint": "catalog:",
|
"markdownlint": "catalog:",
|
||||||
"markdownlint-rule-relative-links": "catalog:",
|
"markdownlint-rule-relative-links": "catalog:",
|
||||||
"replace-in-files-cli": "catalog:",
|
|
||||||
"semantic-release": "catalog:",
|
|
||||||
"turbo": "catalog:",
|
"turbo": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:"
|
||||||
}
|
}
|
||||||
|
5
packages/blog/.postcssrc.json
Normal file
5
packages/blog/.postcssrc.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"plugins": {
|
||||||
|
"@tailwindcss/postcss": {}
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
import typescriptESLint from "typescript-eslint"
|
import typescriptESLint from "typescript-eslint"
|
||||||
import configNextjs from "@repo/eslint-config/nextjs"
|
import configNextjs from "@repo/config-eslint/nextjs"
|
||||||
|
|
||||||
export default typescriptESLint.config(...configNextjs, {
|
export default typescriptESLint.config(...configNextjs, {
|
||||||
files: ["**/*.ts", "**/*.tsx"],
|
files: ["**/*.ts", "**/*.tsx"],
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@repo/blog",
|
"name": "@repo/blog",
|
||||||
"version": "4.1.1",
|
"version": "0.0.0-develop",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
@ -37,18 +37,18 @@
|
|||||||
"react-icons": "catalog:"
|
"react-icons": "catalog:"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@repo/eslint-config": "workspace:*",
|
"@repo/config-eslint": "workspace:*",
|
||||||
"@repo/config-typescript": "workspace:*",
|
"@repo/config-typescript": "workspace:*",
|
||||||
"@types/node": "catalog:",
|
"@types/node": "catalog:",
|
||||||
"@types/react": "catalog:",
|
"@types/react": "catalog:",
|
||||||
"@types/react-dom": "catalog:",
|
"@types/react-dom": "catalog:",
|
||||||
"@total-typescript/ts-reset": "catalog:",
|
"@total-typescript/ts-reset": "catalog:",
|
||||||
"@storybook/blocks": "catalog:",
|
"storybook": "catalog:",
|
||||||
"@storybook/react": "catalog:",
|
"@storybook/nextjs": "catalog:",
|
||||||
"@storybook/test": "catalog:",
|
|
||||||
"eslint": "catalog:",
|
"eslint": "catalog:",
|
||||||
"postcss": "catalog:",
|
"postcss": "catalog:",
|
||||||
"tailwindcss": "catalog:",
|
"tailwindcss": "catalog:",
|
||||||
|
"@tailwindcss/postcss": "catalog:",
|
||||||
"typescript-eslint": "catalog:",
|
"typescript-eslint": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:"
|
||||||
}
|
}
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
const config = {
|
|
||||||
plugins: {
|
|
||||||
tailwindcss: {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
export default config
|
|
@ -109,11 +109,11 @@ const transaction = charge(user, subscription)
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
interface Car {
|
interface Car {
|
||||||
carModel: string
|
carModel: string
|
||||||
carColor: "red" | "blue" | "yellow"
|
carColor: "red" | "blue" | "yellow"
|
||||||
}
|
}
|
||||||
const printCar = (car: Car): void => {
|
const printCar = (car: Car): void => {
|
||||||
console.log(`${car.carModel} (${car.carColor})`)
|
console.log(`${car.carModel} (${car.carColor})`)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -121,11 +121,11 @@ const printCar = (car: Car): void => {
|
|||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
interface Car {
|
interface Car {
|
||||||
model: string
|
model: string
|
||||||
color: "red" | "blue" | "yellow"
|
color: "red" | "blue" | "yellow"
|
||||||
}
|
}
|
||||||
const printCar = (car: Car): void => {
|
const printCar = (car: Car): void => {
|
||||||
console.log(`${car.model} (${car.color})`)
|
console.log(`${car.model} (${car.color})`)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -174,13 +174,13 @@ import fs from "node:fs"
|
|||||||
import path from "node:path"
|
import path from "node:path"
|
||||||
|
|
||||||
const createFile = async (
|
const createFile = async (
|
||||||
name: string,
|
name: string,
|
||||||
isTemporary: boolean = false,
|
isTemporary: boolean = false,
|
||||||
): Promise<void> => {
|
): Promise<void> => {
|
||||||
if (isTemporary) {
|
if (isTemporary) {
|
||||||
return await fs.promises.writeFile(path.join("temporary", name), "")
|
return await fs.promises.writeFile(path.join("temporary", name), "")
|
||||||
}
|
}
|
||||||
return await fs.promises.writeFile(name, "")
|
return await fs.promises.writeFile(name, "")
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -193,11 +193,11 @@ import fs from "node:fs"
|
|||||||
import path from "node:path"
|
import path from "node:path"
|
||||||
|
|
||||||
const createFile = async (name: string): Promise<void> => {
|
const createFile = async (name: string): Promise<void> => {
|
||||||
await fs.promises.writeFile(name, "")
|
await fs.promises.writeFile(name, "")
|
||||||
}
|
}
|
||||||
|
|
||||||
const createTemporaryFile = async (name: string): Promise<void> => {
|
const createTemporaryFile = async (name: string): Promise<void> => {
|
||||||
await createFile(path.join("temporary", name))
|
await createFile(path.join("temporary", name))
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -40,8 +40,8 @@ These configurations are stored in the `.gitconfig` file in your home directory
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
[user]
|
[user]
|
||||||
name = Username
|
name = Username
|
||||||
email = email@example.com
|
email = email@example.com
|
||||||
```
|
```
|
||||||
|
|
||||||
You can find more information and useful `git` configurations in the [official documentation](https://git-scm.com/docs/git-config).
|
You can find more information and useful `git` configurations in the [official documentation](https://git-scm.com/docs/git-config).
|
||||||
@ -88,6 +88,8 @@ git commit -m "Commit message"
|
|||||||
|
|
||||||
# Commit changes in the past
|
# Commit changes in the past
|
||||||
git commit --date "10 day ago" -m "Commit message"
|
git commit --date "10 day ago" -m "Commit message"
|
||||||
|
# Also update the committer date for the last commit
|
||||||
|
git filter-branch --env-filter 'export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"' HEAD^..HEAD
|
||||||
|
|
||||||
# Add remote repository
|
# Add remote repository
|
||||||
git remote add <remote> <url>
|
git remote add <remote> <url>
|
||||||
@ -266,7 +268,7 @@ Sometimes, you want to compare what commits have been made between two branches,
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
[alias]
|
[alias]
|
||||||
diff-commits = !sh -c 'echo -n "Commits in $2 not in $1 \\(" && printf "%d" $(git cherry -v $1 $2 | wc -l) && echo "\\)" && git cherry -v $1 $2 && echo "" && echo -n "Commits in $1 not in $2 \\(" && printf "%d" $(git cherry -v $2 $1 | wc -l) && echo "\\)" && git cherry -v $2 $1' -
|
diff-commits = !sh -c 'echo -n "Commits in $2 not in $1 \\(" && printf "%d" $(git cherry -v $1 $2 | wc -l) && echo "\\)" && git cherry -v $1 $2 && echo "" && echo -n "Commits in $1 not in $2 \\(" && printf "%d" $(git cherry -v $2 $1 | wc -l) && echo "\\)" && git cherry -v $2 $1' -
|
||||||
```
|
```
|
||||||
|
|
||||||
With this alias, we can compare the commits between `main` and `develop` branches for example:
|
With this alias, we can compare the commits between `main` and `develop` branches for example:
|
||||||
|
@ -39,23 +39,23 @@ The code of this website is open source on [GitHub](https://github.com/theoludwi
|
|||||||
|
|
||||||
- [Next.js](https://nextjs.org/)
|
- [Next.js](https://nextjs.org/)
|
||||||
|
|
||||||
It allows to have a server-side rendered website, that means that it is faster and easier to have a good <abbr title="Search Engine Optimization">SEO</abbr> than a <abbr title="Single Page Application">SPA</abbr>.
|
It allows to have a server-side rendered website, that means that it is faster and easier to have a good <abbr title="Search Engine Optimization">SEO</abbr> than a <abbr title="Single Page Application">SPA</abbr>.
|
||||||
|
|
||||||
- [MDX](https://mdxjs.com/)
|
- [MDX](https://mdxjs.com/)
|
||||||
|
|
||||||
MDX is an extension of Markdown that allows you to use custom React components.
|
MDX is an extension of Markdown that allows you to use custom React components.
|
||||||
|
|
||||||
Here's what Markdown looks like:
|
Here's what Markdown looks like:
|
||||||
|
|
||||||
```md
|
```md
|
||||||
A simple paragraph, with some **bold** text and some `inline code`.
|
A simple paragraph, with some **bold** text and some `inline code`.
|
||||||
```
|
```
|
||||||
|
|
||||||
When using Markdown in a web application, there's a "compile" step; the Markdown needs to be transformed into HTML, so that it can be understood by the browser. Those asterisks get turned into a `<strong>` tag, and each paragraph gets a `<p>` tag etc.
|
When using Markdown in a web application, there's a "compile" step; the Markdown needs to be transformed into HTML, so that it can be understood by the browser. Those asterisks get turned into a `<strong>` tag, and each paragraph gets a `<p>` tag etc.
|
||||||
|
|
||||||
- [Tailwind CSS](https://tailwindcss.com/)
|
- [Tailwind CSS](https://tailwindcss.com/)
|
||||||
|
|
||||||
Tailwind is a CSS framework to rapidly build modern websites without ever leaving HTML.
|
Tailwind is a CSS framework to rapidly build modern websites without ever leaving HTML.
|
||||||
|
|
||||||
## Conclusion
|
## Conclusion
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { Meta, StoryObj } from "@storybook/react"
|
import type { Meta, StoryObj } from "@storybook/nextjs"
|
||||||
|
|
||||||
import { BLOG_POST_MOCK } from "../BlogPost.ts"
|
import { BLOG_POST_MOCK } from "../BlogPost.ts"
|
||||||
import { BlogPostUI as BlogPostUIComponent } from "../BlogPostUI.tsx"
|
import { BlogPostUI as BlogPostUIComponent } from "../BlogPostUI.tsx"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { Meta, StoryObj } from "@storybook/react"
|
import type { Meta, StoryObj } from "@storybook/nextjs"
|
||||||
|
|
||||||
import { BLOG_POST_MOCK } from "../BlogPost.ts"
|
import { BLOG_POST_MOCK } from "../BlogPost.ts"
|
||||||
import { BlogPosts as BlogPostsComponent } from "../BlogPosts.tsx"
|
import { BlogPosts as BlogPostsComponent } from "../BlogPosts.tsx"
|
||||||
|
@ -2,7 +2,6 @@ import sharedConfig from "@repo/config-tailwind"
|
|||||||
|
|
||||||
/** @type {Pick<import('tailwindcss').Config, "presets" | "content">} */
|
/** @type {Pick<import('tailwindcss').Config, "presets" | "content">} */
|
||||||
const config = {
|
const config = {
|
||||||
content: ["./src/**/*.tsx"],
|
|
||||||
presets: [sharedConfig],
|
presets: [sharedConfig],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
3
packages/config-tailwind/index.d.ts
vendored
3
packages/config-tailwind/index.d.ts
vendored
@ -1,3 +0,0 @@
|
|||||||
import type { Config } from "tailwindcss"
|
|
||||||
|
|
||||||
export default Config
|
|
@ -1,7 +0,0 @@
|
|||||||
const config = {
|
|
||||||
plugins: {
|
|
||||||
tailwindcss: {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
export default config
|
|
@ -1,5 +1,5 @@
|
|||||||
import typescriptESLint from "typescript-eslint"
|
import typescriptESLint from "typescript-eslint"
|
||||||
import config from "@repo/eslint-config"
|
import config from "@repo/config-eslint"
|
||||||
|
|
||||||
export default typescriptESLint.config(...config, {
|
export default typescriptESLint.config(...config, {
|
||||||
files: ["**/*.ts", "**/*.tsx"],
|
files: ["**/*.ts", "**/*.tsx"],
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@repo/i18n",
|
"name": "@repo/i18n",
|
||||||
"version": "4.1.1",
|
"version": "0.0.0-develop",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
@ -11,26 +11,23 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint:eslint": "eslint src --max-warnings 0",
|
"lint:eslint": "eslint src --max-warnings 0",
|
||||||
"lint:typescript": "tsc --noEmit",
|
"lint:typescript": "tsc --noEmit"
|
||||||
"test": "vitest run"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@repo/utils": "workspace:*",
|
"@repo/utils": "workspace:*",
|
||||||
"deepmerge": "catalog:",
|
|
||||||
"next": "catalog:",
|
"next": "catalog:",
|
||||||
"next-intl": "catalog:",
|
"next-intl": "catalog:",
|
||||||
"react": "catalog:",
|
"react": "catalog:",
|
||||||
"react-dom": "catalog:"
|
"react-dom": "catalog:"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@repo/eslint-config": "workspace:*",
|
"@repo/config-eslint": "workspace:*",
|
||||||
"@repo/config-typescript": "workspace:*",
|
"@repo/config-typescript": "workspace:*",
|
||||||
"@types/react": "catalog:",
|
"@types/react": "catalog:",
|
||||||
"@types/react-dom": "catalog:",
|
"@types/react-dom": "catalog:",
|
||||||
"@total-typescript/ts-reset": "catalog:",
|
"@total-typescript/ts-reset": "catalog:",
|
||||||
"eslint": "catalog:",
|
"eslint": "catalog:",
|
||||||
"typescript-eslint": "catalog:",
|
"typescript-eslint": "catalog:",
|
||||||
"typescript": "catalog:",
|
"typescript": "catalog:"
|
||||||
"vitest": "catalog:"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
15
packages/i18n/src/messages.d.ts
vendored
15
packages/i18n/src/messages.d.ts
vendored
@ -1,10 +1,9 @@
|
|||||||
import type en from "./translations/en-US.json"
|
import type { routing } from "./routing.ts"
|
||||||
|
import type messages from "./translations/en-US.json"
|
||||||
|
|
||||||
type Messages = typeof en
|
declare module "next-intl" {
|
||||||
|
interface AppConfig {
|
||||||
declare global {
|
Locale: (typeof routing.locales)[number]
|
||||||
/**
|
Messages: typeof messages
|
||||||
* Use type safe message keys with `next-intl`.
|
}
|
||||||
*/
|
|
||||||
interface IntlMessages extends Messages {}
|
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,22 @@
|
|||||||
import deepmerge from "deepmerge"
|
|
||||||
import type { AbstractIntlMessages } from "next-intl"
|
import type { AbstractIntlMessages } from "next-intl"
|
||||||
|
import { hasLocale } from "next-intl"
|
||||||
import { getRequestConfig } from "next-intl/server"
|
import { getRequestConfig } from "next-intl/server"
|
||||||
|
import { routing } from "./routing.ts"
|
||||||
|
|
||||||
import type { Locale } from "@repo/utils/constants"
|
import { LOCALE_DEFAULT } from "@repo/utils/constants"
|
||||||
import { LOCALE_DEFAULT, LOCALES } from "@repo/utils/constants"
|
import { deepMerge } from "@repo/utils/objects"
|
||||||
|
|
||||||
export default getRequestConfig(async ({ requestLocale }) => {
|
export default getRequestConfig(async ({ requestLocale }) => {
|
||||||
let locale = await requestLocale
|
const requested = await requestLocale
|
||||||
if (!LOCALES.includes(locale as Locale)) {
|
const locale = hasLocale(routing.locales, requested)
|
||||||
locale = LOCALE_DEFAULT
|
? requested
|
||||||
}
|
: routing.defaultLocale
|
||||||
|
|
||||||
const userMessages = (await import(`./translations/${locale}.json`)).default
|
const userMessages = (await import(`./translations/${locale}.json`)).default
|
||||||
const defaultMessages = (
|
const defaultMessages = (
|
||||||
await import(`./translations/${LOCALE_DEFAULT}.json`)
|
await import(`./translations/${LOCALE_DEFAULT}.json`)
|
||||||
).default
|
).default
|
||||||
const messages = deepmerge<AbstractIntlMessages>(
|
const messages = deepMerge<AbstractIntlMessages>(
|
||||||
defaultMessages,
|
defaultMessages,
|
||||||
userMessages,
|
userMessages,
|
||||||
)
|
)
|
||||||
|
@ -4,6 +4,13 @@ import { LOCALES, LOCALE_DEFAULT, LOCALE_PREFIX } from "@repo/utils/constants"
|
|||||||
import { defineRouting } from "next-intl/routing"
|
import { defineRouting } from "next-intl/routing"
|
||||||
import type { Locale } from "@repo/utils/constants"
|
import type { Locale } from "@repo/utils/constants"
|
||||||
|
|
||||||
|
// Countries: https://github.com/umpirsky/country-list/blob/master/data/en/country.json
|
||||||
|
// Country flag picture: https://purecatamphetamine.github.io/country-flag-icons/3x2/US.svg
|
||||||
|
|
||||||
|
// Locale codes: https://simplelocalize.io/data/locales/
|
||||||
|
// Locale code is a combination of ISO 639-1 language code and ISO 3166-1 country code.
|
||||||
|
// For example, `fr-FR` is a locale code for French language in France.
|
||||||
|
|
||||||
export interface LocaleProps {
|
export interface LocaleProps {
|
||||||
params: Promise<{
|
params: Promise<{
|
||||||
locale: Locale
|
locale: Locale
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
import { expectTypeOf, test } from "vitest"
|
|
||||||
import en from "../translations/en-US.json"
|
|
||||||
import fr from "../translations/fr-FR.json"
|
|
||||||
|
|
||||||
test("translations types should match", () => {
|
|
||||||
expectTypeOf(en).toEqualTypeOf(fr)
|
|
||||||
})
|
|
@ -1,4 +1,24 @@
|
|||||||
{
|
{
|
||||||
|
"meta": {
|
||||||
|
"description": "Developer Full Stack • Open-Source Enthusiast",
|
||||||
|
"title": "Théo LUDWIG"
|
||||||
|
},
|
||||||
|
"locales": {
|
||||||
|
"en-US": "English",
|
||||||
|
"fr-FR": "French"
|
||||||
|
},
|
||||||
|
"loading": "Loading...",
|
||||||
|
"errors": {
|
||||||
|
"error": "Error",
|
||||||
|
"not-found": "Not Found",
|
||||||
|
"page-doesnt-exist": "This page doesn't exist!",
|
||||||
|
"return-to-home-page": "Return to the home page?",
|
||||||
|
"server-error": "Internal Server Error!",
|
||||||
|
"try-again": "Try again?"
|
||||||
|
},
|
||||||
|
"footer": {
|
||||||
|
"all-rights-reserved": "All rights reserved"
|
||||||
|
},
|
||||||
"curriculum-vitae": {
|
"curriculum-vitae": {
|
||||||
"about": {
|
"about": {
|
||||||
"description": "I constantly wonder how to improve our present, to make our future better, particularly thanks to the advancements in computer science. <br></br> My priority is to craft intuitive user experiences (UX), that meet the needs of the users in the most efficient way possible.",
|
"description": "I constantly wonder how to improve our present, to make our future better, particularly thanks to the advancements in computer science. <br></br> My priority is to craft intuitive user experiences (UX), that meet the needs of the users in the most efficient way possible.",
|
||||||
@ -84,17 +104,6 @@
|
|||||||
"title": "Work experiences"
|
"title": "Work experiences"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"errors": {
|
|
||||||
"error": "Error",
|
|
||||||
"not-found": "Not Found",
|
|
||||||
"page-doesnt-exist": "This page doesn't exist!",
|
|
||||||
"return-to-home-page": "Return to the home page?",
|
|
||||||
"server-error": "Internal Server Error!",
|
|
||||||
"try-again": "Try again?"
|
|
||||||
},
|
|
||||||
"footer": {
|
|
||||||
"all-rights-reserved": "All rights reserved"
|
|
||||||
},
|
|
||||||
"home": {
|
"home": {
|
||||||
"about": {
|
"about": {
|
||||||
"birth-date": {
|
"birth-date": {
|
||||||
@ -131,6 +140,10 @@
|
|||||||
"title": "Open-Source"
|
"title": "Open-Source"
|
||||||
},
|
},
|
||||||
"portfolio": {
|
"portfolio": {
|
||||||
|
"fusey": {
|
||||||
|
"description": "ARK: Survival Ascended Wiki and Player stats tracker.",
|
||||||
|
"title": "Fusey"
|
||||||
|
},
|
||||||
"carolo": {
|
"carolo": {
|
||||||
"description": "Strategy board game similar to chess which allows grandiose moves (only available in French).",
|
"description": "Strategy board game similar to chess which allows grandiose moves (only available in French).",
|
||||||
"title": "Carolo"
|
"title": "Carolo"
|
||||||
@ -150,13 +163,5 @@
|
|||||||
"software-tools": "Software and tools",
|
"software-tools": "Software and tools",
|
||||||
"title": "Skills"
|
"title": "Skills"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"locales": {
|
|
||||||
"en-US": "English",
|
|
||||||
"fr-FR": "French"
|
|
||||||
},
|
|
||||||
"meta": {
|
|
||||||
"description": "Developer Full Stack • Open-Source Enthusiast",
|
|
||||||
"title": "Théo LUDWIG"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,24 @@
|
|||||||
{
|
{
|
||||||
|
"meta": {
|
||||||
|
"description": "Développeur Full Stack • Enthousiaste de l'Open-Source",
|
||||||
|
"title": "Théo LUDWIG"
|
||||||
|
},
|
||||||
|
"locales": {
|
||||||
|
"en-US": "Anglais",
|
||||||
|
"fr-FR": "Français"
|
||||||
|
},
|
||||||
|
"loading": "Chargement...",
|
||||||
|
"errors": {
|
||||||
|
"error": "Erreur",
|
||||||
|
"not-found": "Introuvable",
|
||||||
|
"page-doesnt-exist": "Cette page n'existe pas !",
|
||||||
|
"return-to-home-page": "Retour à la page d'accueil ?",
|
||||||
|
"server-error": "Erreur interne du serveur !",
|
||||||
|
"try-again": "Réessayer ?"
|
||||||
|
},
|
||||||
|
"footer": {
|
||||||
|
"all-rights-reserved": "Tous droits réservés"
|
||||||
|
},
|
||||||
"curriculum-vitae": {
|
"curriculum-vitae": {
|
||||||
"about": {
|
"about": {
|
||||||
"description": "Je me demande constamment comment améliorer notre présent, afin de rendre notre futur meilleur, particulièrement grâce aux progrès de l'informatique. <br></br> Ma priorité réside dans la création d'expériences utilisateurs (UX) intuitives, répondant aux besoins des utilisateurs de la manière la plus efficace que possible.",
|
"description": "Je me demande constamment comment améliorer notre présent, afin de rendre notre futur meilleur, particulièrement grâce aux progrès de l'informatique. <br></br> Ma priorité réside dans la création d'expériences utilisateurs (UX) intuitives, répondant aux besoins des utilisateurs de la manière la plus efficace que possible.",
|
||||||
@ -84,17 +104,6 @@
|
|||||||
"title": "Expériences professionnelles"
|
"title": "Expériences professionnelles"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"errors": {
|
|
||||||
"error": "Erreur",
|
|
||||||
"not-found": "Introuvable",
|
|
||||||
"page-doesnt-exist": "Cette page n'existe pas !",
|
|
||||||
"return-to-home-page": "Retour à la page d'accueil ?",
|
|
||||||
"server-error": "Erreur interne du serveur !",
|
|
||||||
"try-again": "Réessayer ?"
|
|
||||||
},
|
|
||||||
"footer": {
|
|
||||||
"all-rights-reserved": "Tous droits réservés"
|
|
||||||
},
|
|
||||||
"home": {
|
"home": {
|
||||||
"about": {
|
"about": {
|
||||||
"birth-date": {
|
"birth-date": {
|
||||||
@ -131,6 +140,10 @@
|
|||||||
"title": "Open-Source"
|
"title": "Open-Source"
|
||||||
},
|
},
|
||||||
"portfolio": {
|
"portfolio": {
|
||||||
|
"fusey": {
|
||||||
|
"description": "ARK: Survival Ascended Wiki et suivi des statistiques des joueurs.",
|
||||||
|
"title": "Fusey"
|
||||||
|
},
|
||||||
"carolo": {
|
"carolo": {
|
||||||
"description": "Jeu de plateau stratégique similaire aux échecs qui permet des coups grandioses, reposant sur des enchaînements remarquables.",
|
"description": "Jeu de plateau stratégique similaire aux échecs qui permet des coups grandioses, reposant sur des enchaînements remarquables.",
|
||||||
"title": "Carolo"
|
"title": "Carolo"
|
||||||
@ -150,13 +163,5 @@
|
|||||||
"software-tools": "Logiciels et outils",
|
"software-tools": "Logiciels et outils",
|
||||||
"title": "Compétences"
|
"title": "Compétences"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"locales": {
|
|
||||||
"en-US": "Anglais",
|
|
||||||
"fr-FR": "Français"
|
|
||||||
},
|
|
||||||
"meta": {
|
|
||||||
"description": "Développeur Full Stack • Enthousiaste de l'Open-Source",
|
|
||||||
"title": "Théo LUDWIG"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
import { defineConfig } from "vitest/config"
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
test: {
|
|
||||||
typecheck: {
|
|
||||||
enabled: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
@ -1,5 +1,5 @@
|
|||||||
import typescriptESLint from "typescript-eslint"
|
import typescriptESLint from "typescript-eslint"
|
||||||
import configNextjs from "@repo/eslint-config/nextjs"
|
import configNextjs from "@repo/config-eslint/nextjs"
|
||||||
|
|
||||||
export default typescriptESLint.config(...configNextjs, {
|
export default typescriptESLint.config(...configNextjs, {
|
||||||
files: ["**/*.ts", "**/*.tsx"],
|
files: ["**/*.ts", "**/*.tsx"],
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@repo/react-hooks",
|
"name": "@repo/react-hooks",
|
||||||
"version": "4.1.1",
|
"version": "0.0.0-develop",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
@ -9,28 +9,21 @@
|
|||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"lint:eslint": "eslint src --max-warnings 0",
|
"lint:eslint": "eslint src --max-warnings 0",
|
||||||
"lint:typescript": "tsc --noEmit",
|
"lint:typescript": "tsc --noEmit"
|
||||||
"test": "vitest run --browser.headless",
|
|
||||||
"test:ui": "vitest --ui --no-open"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"react": "catalog:",
|
"react": "catalog:",
|
||||||
"react-dom": "catalog:"
|
"react-dom": "catalog:"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@repo/eslint-config": "workspace:*",
|
"@repo/config-eslint": "workspace:*",
|
||||||
"@repo/config-typescript": "workspace:*",
|
"@repo/config-typescript": "workspace:*",
|
||||||
"@testing-library/react": "catalog:",
|
|
||||||
"@types/react": "catalog:",
|
"@types/react": "catalog:",
|
||||||
"@types/react-dom": "catalog:",
|
"@types/react-dom": "catalog:",
|
||||||
"@total-typescript/ts-reset": "catalog:",
|
"@total-typescript/ts-reset": "catalog:",
|
||||||
"@vitest/browser": "catalog:",
|
|
||||||
"@vitest/coverage-v8": "catalog:",
|
|
||||||
"@vitest/ui": "catalog:",
|
|
||||||
"eslint": "catalog:",
|
"eslint": "catalog:",
|
||||||
"playwright": "catalog:",
|
"playwright": "catalog:",
|
||||||
"typescript-eslint": "catalog:",
|
|
||||||
"typescript": "catalog:",
|
"typescript": "catalog:",
|
||||||
"vitest": "catalog:"
|
"typescript-eslint": "catalog:"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,83 +0,0 @@
|
|||||||
import { act, renderHook } from "@testing-library/react"
|
|
||||||
|
|
||||||
import { describe, expect, it } from "vitest"
|
|
||||||
import { useBoolean } from "../useBoolean.ts"
|
|
||||||
|
|
||||||
describe("useBoolean", () => {
|
|
||||||
const initialValues = [true, false]
|
|
||||||
|
|
||||||
for (const initialValue of initialValues) {
|
|
||||||
it(`should set the initial value to ${initialValue}`, () => {
|
|
||||||
// Arrange - Given
|
|
||||||
const { result } = renderHook(() => {
|
|
||||||
return useBoolean({ initialValue })
|
|
||||||
})
|
|
||||||
|
|
||||||
// Assert - Then
|
|
||||||
expect(result.current.value).toBe(initialValue)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
it("should by default set the initial value to false", () => {
|
|
||||||
// Arrange - Given
|
|
||||||
const { result } = renderHook(() => {
|
|
||||||
return useBoolean()
|
|
||||||
})
|
|
||||||
|
|
||||||
// Assert - Then
|
|
||||||
expect(result.current.value).toBe(false)
|
|
||||||
})
|
|
||||||
|
|
||||||
it("should toggle the value", () => {
|
|
||||||
// Arrange - Given
|
|
||||||
const { result } = renderHook(() => {
|
|
||||||
return useBoolean({ initialValue: false })
|
|
||||||
})
|
|
||||||
|
|
||||||
// Act - When
|
|
||||||
act(() => {
|
|
||||||
return result.current.toggle()
|
|
||||||
})
|
|
||||||
|
|
||||||
// Assert - Then
|
|
||||||
expect(result.current.value).toBe(true)
|
|
||||||
|
|
||||||
// Act - When
|
|
||||||
act(() => {
|
|
||||||
return result.current.toggle()
|
|
||||||
})
|
|
||||||
|
|
||||||
// Assert - Then
|
|
||||||
expect(result.current.value).toBe(false)
|
|
||||||
})
|
|
||||||
|
|
||||||
it("should set the value to true", () => {
|
|
||||||
// Arrange - Given
|
|
||||||
const { result } = renderHook(() => {
|
|
||||||
return useBoolean({ initialValue: false })
|
|
||||||
})
|
|
||||||
|
|
||||||
// Act - When
|
|
||||||
act(() => {
|
|
||||||
return result.current.setTrue()
|
|
||||||
})
|
|
||||||
|
|
||||||
// Assert - Then
|
|
||||||
expect(result.current.value).toBe(true)
|
|
||||||
})
|
|
||||||
|
|
||||||
it("should set the value to false", () => {
|
|
||||||
// Arrange - Given
|
|
||||||
const { result } = renderHook(() => {
|
|
||||||
return useBoolean({ initialValue: true })
|
|
||||||
})
|
|
||||||
|
|
||||||
// Act - When
|
|
||||||
act(() => {
|
|
||||||
return result.current.setFalse()
|
|
||||||
})
|
|
||||||
|
|
||||||
// Assert - Then
|
|
||||||
expect(result.current.value).toBe(false)
|
|
||||||
})
|
|
||||||
})
|
|
@ -1,16 +0,0 @@
|
|||||||
import { renderHook } from "@testing-library/react"
|
|
||||||
|
|
||||||
import { describe, expect, it } from "vitest"
|
|
||||||
import { useIsMounted } from "../useIsMounted.ts"
|
|
||||||
|
|
||||||
describe("useIsMounted", () => {
|
|
||||||
it("should return true", () => {
|
|
||||||
// Arrange - Given
|
|
||||||
const { result } = renderHook(() => {
|
|
||||||
return useIsMounted()
|
|
||||||
})
|
|
||||||
|
|
||||||
// Assert - Then
|
|
||||||
expect(result.current.isMounted).toBe(true)
|
|
||||||
})
|
|
||||||
})
|
|
@ -18,11 +18,11 @@ export interface UseBooleanInput {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Hook to manage a boolean state.
|
* Hook to manage a boolean state.
|
||||||
* @param options
|
* @param input
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
export const useBoolean = (options: UseBooleanInput = {}): UseBooleanOutput => {
|
export const useBoolean = (input: UseBooleanInput = {}): UseBooleanOutput => {
|
||||||
const { initialValue = false } = options
|
const { initialValue = false } = input
|
||||||
|
|
||||||
const [value, setValue] = useState(initialValue)
|
const [value, setValue] = useState(initialValue)
|
||||||
|
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
import { defineConfig } from "vitest/config"
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
optimizeDeps: {
|
|
||||||
include: ["@vitest/coverage-v8/browser"],
|
|
||||||
},
|
|
||||||
test: {
|
|
||||||
browser: {
|
|
||||||
provider: "playwright",
|
|
||||||
enabled: true,
|
|
||||||
name: "chromium",
|
|
||||||
screenshotFailures: false,
|
|
||||||
},
|
|
||||||
coverage: {
|
|
||||||
enabled: true,
|
|
||||||
provider: "v8",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
5
packages/ui/.postcssrc.json
Normal file
5
packages/ui/.postcssrc.json
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"plugins": {
|
||||||
|
"@tailwindcss/postcss": {}
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,5 @@
|
|||||||
import typescriptESLint from "typescript-eslint"
|
import typescriptESLint from "typescript-eslint"
|
||||||
import configNextjs from "@repo/eslint-config/nextjs"
|
import configNextjs from "@repo/config-eslint/nextjs"
|
||||||
|
|
||||||
export default typescriptESLint.config(...configNextjs, {
|
export default typescriptESLint.config(...configNextjs, {
|
||||||
files: ["**/*.ts", "**/*.tsx"],
|
files: ["**/*.ts", "**/*.tsx"],
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@repo/ui",
|
"name": "@repo/ui",
|
||||||
"version": "4.1.1",
|
"version": "0.0.0-develop",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
@ -40,17 +40,17 @@
|
|||||||
"react-icons": "catalog:"
|
"react-icons": "catalog:"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@repo/eslint-config": "workspace:*",
|
"@repo/config-eslint": "workspace:*",
|
||||||
"@repo/config-typescript": "workspace:*",
|
"@repo/config-typescript": "workspace:*",
|
||||||
"@types/react": "catalog:",
|
"@types/react": "catalog:",
|
||||||
"@types/react-dom": "catalog:",
|
"@types/react-dom": "catalog:",
|
||||||
"@total-typescript/ts-reset": "catalog:",
|
"@total-typescript/ts-reset": "catalog:",
|
||||||
"@storybook/blocks": "catalog:",
|
"storybook": "catalog:",
|
||||||
"@storybook/react": "catalog:",
|
"@storybook/nextjs": "catalog:",
|
||||||
"@storybook/test": "catalog:",
|
|
||||||
"eslint": "catalog:",
|
"eslint": "catalog:",
|
||||||
"postcss": "catalog:",
|
"postcss": "catalog:",
|
||||||
"tailwindcss": "catalog:",
|
"tailwindcss": "catalog:",
|
||||||
|
"@tailwindcss/postcss": "catalog:",
|
||||||
"typescript-eslint": "catalog:",
|
"typescript-eslint": "catalog:",
|
||||||
"typescript": "catalog:"
|
"typescript": "catalog:"
|
||||||
}
|
}
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
const config = {
|
|
||||||
plugins: {
|
|
||||||
tailwindcss: {},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
export default config
|
|
@ -1,4 +1,4 @@
|
|||||||
import type { Meta, StoryObj } from "@storybook/react"
|
import type { Meta, StoryObj } from "@storybook/nextjs"
|
||||||
|
|
||||||
import { CurriculumVitae as CurriculumVitaeComponent } from "./CurriculumVitae.tsx"
|
import { CurriculumVitae as CurriculumVitaeComponent } from "./CurriculumVitae.tsx"
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import type { Meta, StoryObj } from "@storybook/react"
|
import type { Meta, StoryObj } from "@storybook/nextjs"
|
||||||
import { expect, fn, userEvent, within } from "@storybook/test"
|
import { expect, fn, userEvent, within } from "storybook/test"
|
||||||
import { FaCheck } from "react-icons/fa"
|
import { FaCheck } from "react-icons/fa"
|
||||||
|
|
||||||
import type { ButtonLinkProps } from "./Button.tsx"
|
import type { ButtonLinkProps } from "./Button.tsx"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { Meta, StoryObj } from "@storybook/react"
|
import type { Meta, StoryObj } from "@storybook/nextjs"
|
||||||
|
|
||||||
import { Link } from "./Link.tsx"
|
import { Link } from "./Link.tsx"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { Meta, StoryObj } from "@storybook/react"
|
import type { Meta, StoryObj } from "@storybook/nextjs"
|
||||||
|
|
||||||
import { Spinner } from "./Spinner.tsx"
|
import { Spinner } from "./Spinner.tsx"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { Meta, StoryObj } from "@storybook/react"
|
import type { Meta, StoryObj } from "@storybook/nextjs"
|
||||||
|
|
||||||
import type { TypographyProps } from "./Typography.tsx"
|
import type { TypographyProps } from "./Typography.tsx"
|
||||||
import { Typography } from "./Typography.tsx"
|
import { Typography } from "./Typography.tsx"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { Meta, StoryObj } from "@storybook/react"
|
import type { Meta, StoryObj } from "@storybook/nextjs"
|
||||||
|
|
||||||
import { ErrorNotFound as ErrorNotFoundComponent } from "./ErrorNotFound.tsx"
|
import { ErrorNotFound as ErrorNotFoundComponent } from "./ErrorNotFound.tsx"
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import type { Meta, StoryObj } from "@storybook/react"
|
import type { Meta, StoryObj } from "@storybook/nextjs"
|
||||||
import { expect, fn, userEvent, within } from "@storybook/test"
|
import { expect, fn, userEvent, within } from "storybook/test"
|
||||||
|
|
||||||
import { ErrorServer as ErrorServerComponent } from "./ErrorServer.tsx"
|
import { ErrorServer as ErrorServerComponent } from "./ErrorServer.tsx"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { Meta, StoryObj } from "@storybook/react"
|
import type { Meta, StoryObj } from "@storybook/nextjs"
|
||||||
|
|
||||||
import { About as AboutComponent } from "./About.tsx"
|
import { About as AboutComponent } from "./About.tsx"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { Meta, StoryObj } from "@storybook/react"
|
import type { Meta, StoryObj } from "@storybook/nextjs"
|
||||||
|
|
||||||
import { Interests as InterestsComponent } from "./Interests.tsx"
|
import { Interests as InterestsComponent } from "./Interests.tsx"
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { Meta, StoryObj } from "@storybook/react"
|
import type { Meta, StoryObj } from "@storybook/nextjs"
|
||||||
|
|
||||||
import { OpenSource as OpenSourceComponent } from "./OpenSource.tsx"
|
import { OpenSource as OpenSourceComponent } from "./OpenSource.tsx"
|
||||||
|
|
||||||
|
@ -26,9 +26,9 @@ export const OpenSource: React.FC<OpenSourceProps> = () => {
|
|||||||
href="https://github.com/nodejs/node/commits?author=theoludwig"
|
href="https://github.com/nodejs/node/commits?author=theoludwig"
|
||||||
/>
|
/>
|
||||||
<Repository
|
<Repository
|
||||||
name="standard/standard"
|
name="nodejs/nodejs.org"
|
||||||
description="🌟 JavaScript Style Guide, with linter & automatic code fixer"
|
description="The Node.js® Website"
|
||||||
href="https://github.com/standard/standard/commits?author=theoludwig"
|
href="https://github.com/nodejs/nodejs.org/commits/main/?author=theoludwig"
|
||||||
/>
|
/>
|
||||||
<Repository
|
<Repository
|
||||||
name="DefinitelyTyped/DefinitelyTyped"
|
name="DefinitelyTyped/DefinitelyTyped"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import type { Meta, StoryObj } from "@storybook/react"
|
import type { Meta, StoryObj } from "@storybook/nextjs"
|
||||||
|
|
||||||
import { Portfolio as PortfolioComponent } from "./Portfolio.tsx"
|
import { Portfolio as PortfolioComponent } from "./Portfolio.tsx"
|
||||||
|
|
||||||
|
@ -9,18 +9,25 @@ export const Portfolio: React.FC<PortfolioProps> = () => {
|
|||||||
const t = useTranslations()
|
const t = useTranslations()
|
||||||
|
|
||||||
const items: PortfolioProject[] = [
|
const items: PortfolioProject[] = [
|
||||||
|
{
|
||||||
|
id: "fusey",
|
||||||
|
title: t("home.portfolio.fusey.title"),
|
||||||
|
description: t("home.portfolio.fusey.description"),
|
||||||
|
link: "https://fusey.gg",
|
||||||
|
image: "/images/portfolio/Fusey.webp",
|
||||||
|
},
|
||||||
{
|
{
|
||||||
id: "carolo",
|
id: "carolo",
|
||||||
title: t("home.portfolio.carolo.title"),
|
title: t("home.portfolio.carolo.title"),
|
||||||
description: t("home.portfolio.carolo.description"),
|
description: t("home.portfolio.carolo.description"),
|
||||||
link: "https://carolo.theoludwig.fr/",
|
link: "https://carolo.theoludwig.fr",
|
||||||
image: "/images/portfolio/Carolo.webp",
|
image: "/images/portfolio/Carolo.webp",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "leon",
|
id: "leon",
|
||||||
title: t("home.portfolio.leon.title"),
|
title: t("home.portfolio.leon.title"),
|
||||||
description: t("home.portfolio.leon.description"),
|
description: t("home.portfolio.leon.description"),
|
||||||
link: "https://getleon.ai/",
|
link: "https://getleon.ai",
|
||||||
image: "/images/portfolio/Leon.webp",
|
image: "/images/portfolio/Leon.webp",
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
@ -33,7 +33,7 @@ export const PortfolioItem: React.FC<PortfolioItemProps> = (props) => {
|
|||||||
<div className="flex justify-center">
|
<div className="flex justify-center">
|
||||||
<Image
|
<Image
|
||||||
quality={100}
|
quality={100}
|
||||||
className="size-[300px] transition-opacity duration-500 group-hover:opacity-20 dark:group-hover:opacity-5"
|
className="size-[300px] rounded-xl transition-opacity duration-500 group-hover:opacity-20 dark:group-hover:opacity-5"
|
||||||
width={300}
|
width={300}
|
||||||
height={300}
|
height={300}
|
||||||
src={image}
|
src={image}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user