1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2025-05-29 22:37:44 +02:00

Compare commits

...

343 Commits

Author SHA1 Message Date
c7ad15a465 chore(release): 3.1.0 [skip ci] 2023-09-18 20:09:29 +00:00
f4a842efb5 build: downgrade semantic-release to v21.1.2
Ref: https://github.com/semantic-release/semantic-release/issues/2968
2023-09-18 22:08:04 +02:00
424c97019b fix: update dependencies to latest 2023-09-18 22:00:11 +02:00
c0508dc0b9 build: ignore ESLint errors for Production build
It improves performance when extra checking is not necessary.
2023-09-14 12:26:19 +02:00
f04d8a0c11 Revert "build: ignore ESLint and TypeScript errors for Production build"
This reverts commit fdab2a7ea8.
2023-09-14 12:19:26 +02:00
d29064745c feat: add IRCAD as work experience 2023-09-14 12:11:18 +02:00
95febe2a99 feat: add 3rd year of BUT Informatique as education 2023-09-14 12:01:20 +02:00
fdab2a7ea8 build: ignore ESLint and TypeScript errors for Production build
It improves performance when extra checking is not necessary.
2023-09-14 11:49:52 +02:00
35211fa279 fix: try/catch inside middleware when checking locale 2023-08-24 23:09:33 +02:00
137cceffa1 build(deps): update latest 2023-08-24 22:38:09 +02:00
f6bfc466de chore(release): 3.0.0 [skip ci] 2023-08-01 17:41:12 +00:00
e4cf714d95 test: fix styles import for unit tests 2023-08-01 19:39:09 +02:00
d3c86b2a26 chore: update Dockerfile 2023-08-01 19:34:58 +02:00
d2578abeec fix: loader improvements 2023-08-01 18:59:45 +02:00
e51e3bdc19 test: fix e2e tests + 500 error page 2023-08-01 18:18:16 +02:00
56520830e9 refactor: blog directory 2023-08-01 17:44:08 +02:00
2e0138194c refactor: avoid usage of React.FC to use JSX.Element (to stay consistent) 2023-08-01 17:22:09 +02:00
4b2e7bae90 feat: rewrite blog to Next.js v13 app directory
Improvement: Support light theme in code block
2023-08-01 17:07:19 +02:00
caa6a90418 refactor: implement light/dark themes using cookies 2023-08-01 14:11:46 +02:00
e82db952db docs: update interests 2023-08-01 13:15:03 +02:00
6b29ce9b15 feat: rewrite to Next.js v13 app directory
Improvements:
- Hide switch theme input (ugly little white square)
- i18n without subpath (e.g: /fr or /en), same url whatever the locale used
2023-07-31 19:06:46 +02:00
5640f1b434 build(deps): bump Node.js to 20.0.0 and npm to 9.0.0
BREAKING CHANGE: minimum supported Node.js >= 20.0.0 and npm >= 9.0.0
2023-07-30 19:03:36 +02:00
6d0dcb50a7 refactor: 'use client' when appropriate 2023-07-30 18:50:14 +02:00
70603f1444 chore: remove build error with Docker copy wrong node_modules 2023-07-30 18:27:15 +02:00
f42fdbfd0c chore: rename jsonresume-theme-custom to curriculum-vitae 2023-07-28 11:53:04 +02:00
6a3f335f9f fix(posts): update git blog post 2023-07-28 11:40:19 +02:00
f1509d0af1 chore: rename docker-compose.yml to compose.yaml
Ref: https://docs.docker.com/compose/compose-file/03-compose-file/
2023-07-28 11:38:34 +02:00
49599d25ed chore(release): 2.13.0 [skip ci] 2023-07-22 17:47:02 +00:00
65e0f4f8b6 fix: avoid scrolling when changing language 2023-07-22 19:40:28 +02:00
8d60c2d53a feat: add Carolo project in Portfolio 2023-07-22 19:39:57 +02:00
0bbebeab99 build(deps): update latest
Some checks failed
Analyze / analyze (javascript) (push) Failing after 1m24s
Build / build (push) Successful in 3m0s
Lint / lint (push) Successful in 2m6s
Test / test-unit (push) Successful in 1m56s
Test / test-e2e (push) Successful in 3m17s
2023-07-19 00:09:28 +02:00
643e0e5821 chore(release): 2.12.1 [skip ci] 2023-07-14 22:03:03 +00:00
872b018673 style: fix prettier 2023-07-14 23:58:50 +02:00
2644cb0fb5 fix: update /curriculum-vitae to /curriculum-vitae/index.html 2023-07-14 23:54:29 +02:00
bc719578d2 fix: remove vercel cli + update dependencies to latest 2023-07-14 23:50:20 +02:00
117c41b1c3 chore(release): 2.12.0 [skip ci] 2023-07-02 14:59:12 +00:00
b92704b77d feat: increase duration work experience Numerize 2023-07-02 16:50:32 +02:00
bab7581283 fix: update dependencies to latest 2023-07-02 16:42:39 +02:00
988fceb2aa chore(release): 2.11.0 [skip ci] 2023-06-18 10:23:59 +00:00
5211ba1489 feat(skills): add Arch Linux 2023-06-18 12:18:24 +02:00
6886480cef chore(release): 2.10.0 [skip ci] 2023-06-16 21:30:51 +00:00
d78e50638e test: fix with new anchor link behavior in blog posts 2023-06-16 23:26:09 +02:00
3b76195d71 feat(blog): add anchor links for titles/headers 2023-06-16 23:14:25 +02:00
2dc63ba933 chore: maintenance 2023-06-16 22:56:53 +02:00
336f067c52 fix(posts): add explanations for Git (cherry-pick + merge squash) 2023-06-16 22:36:20 +02:00
5fd7f77b6d fix: justify align text in blog posts 2023-06-16 21:48:47 +02:00
db0c708c04 chore(release): 2.9.0 [skip ci] 2023-05-31 18:39:59 +00:00
9d44671fed feat: continue migrating to full name instead of nickname 2023-05-31 20:09:08 +02:00
7bcc5f972c chore(release): 2.8.0 [skip ci] 2023-05-30 19:57:02 +00:00
61172d59e3 feat: migrate progressively to full name instead of nickname 2023-05-30 21:51:27 +02:00
7c0f11ab7d chore(release): 2.7.3 [skip ci] 2023-05-29 15:45:42 +00:00
670897fa78 fix: improve spelling consistency 2023-05-29 17:44:26 +02:00
b88246b668 chore: usage of next start 2023-05-29 17:33:45 +02:00
87fbfe4940 chore(release): 2.7.2 [skip ci] 2023-05-29 15:29:07 +00:00
271aa60247 test: update with new changes 2023-05-29 17:26:06 +02:00
ba34e314c9 fix: update name with full name and nickname 2023-05-29 17:10:14 +02:00
f41bc644b1 fix(deps): remove next-pwa dependency 2023-05-29 16:24:49 +02:00
a18cec4826 chore(release): 2.7.1 [skip ci] 2023-05-21 16:27:24 +00:00
61e589f0f4 fix: responsive on blog post with code blocks and katex 2023-05-21 18:21:46 +02:00
dc5c3cee41 chore(release): 2.7.0 [skip ci] 2023-05-21 12:49:17 +00:00
20cb0c21d5 feat(posts): add programming-challenges 2023-05-21 14:42:53 +02:00
e5232c1394 build(deps): update latest 2023-05-21 12:15:08 +02:00
fd51609713 chore(release): 2.6.1 [skip ci] 2023-05-13 17:15:54 +00:00
edf16c2562 fix(deps): update latest 2023-05-13 19:09:54 +02:00
94e0d190ae chore(release): 2.6.0 [skip ci] 2023-05-10 18:12:22 +00:00
b1cf7f8517 chore: remove unneeded Lighthouse checking 2023-05-09 23:22:33 +02:00
a1a715d3b9 feat: add Numerize as work experience 2023-05-09 23:06:10 +02:00
eede46fb41 build(deps): update latest 2023-05-09 22:56:42 +02:00
e32c53caa1 chore(release): 2.5.6 [skip ci] 2023-04-02 21:18:14 +00:00
361ea37deb chore: fix CI issues 2023-04-02 23:16:51 +02:00
d49a8a7470 fix: update dependencies to latest 2023-04-02 22:44:09 +02:00
a4996c8251 chore: remove useless runner-dependencies in Dockerfile 2023-01-11 17:42:29 +01:00
b25451e631 chore(release): 2.5.5 [skip ci] 2023-01-10 23:05:24 +00:00
042a861f58 fix: update dependencies to latest 2023-01-10 23:56:46 +01:00
d76db36dbc chore(release): 2.5.4 [skip ci] 2022-12-08 08:54:03 +00:00
99d9dcf334 fix: improve Resume 2022-12-08 09:52:39 +01:00
ece5ded1b4 chore(release): 2.5.3 [skip ci] 2022-11-29 09:33:10 +00:00
1514600998 fix: improve Resume 2022-11-29 10:29:02 +01:00
5f5b328895 chore(release): 2.5.2 [skip ci] 2022-11-19 19:43:26 +00:00
c88887a322 fix: better resume 2022-11-19 20:24:13 +01:00
014044573a chore(release): 2.5.1 [skip ci] 2022-11-10 11:35:11 +00:00
df009c3f7b fix(posts): update broken link in thream-v1.0.0.md 2022-11-10 12:31:48 +01:00
5c85ca2ef1 chore: fix cypress unit tests 2022-11-08 11:00:31 +01:00
07f7942496 chore(release): 2.5.0 [skip ci] 2022-10-27 17:24:30 +00:00
213a3fa182 build(deps): bump Next.js to v13 2022-10-27 19:13:29 +02:00
28d9211583 fix(posts): update git-ultimate-guide 2022-10-23 20:15:07 +02:00
4d085cb148 fix: update biography description 2022-10-23 18:38:37 +02:00
e6c583f2cd ci: fix timeout 2022-10-20 23:57:53 +02:00
232b54588a feat(skills): add PHP and Laravel 2022-10-20 22:44:40 +02:00
c419fb3bb4 chore: remove usage of styled-jsx 2022-10-20 22:44:32 +02:00
03e7e22d74 chore: reduce docker image size 2022-10-20 22:44:32 +02:00
e85c241ed1 feat(posts): add git-ultimate-guide 2022-10-20 22:43:25 +02:00
c1877297f8 refactor: minor changes 2022-08-27 02:30:55 +02:00
83231197dd chore(release): 2.4.1 [skip ci] 2022-08-23 11:33:38 +00:00
a2fe2205bc fix(resume): wrong base path for assets 2022-08-23 13:31:17 +02:00
e1f3dceb07 chore(release): 2.4.0 [skip ci] 2022-08-23 10:33:09 +00:00
0f89fee52f feat: add giscus comments system for blog posts 2022-08-23 12:23:31 +02:00
2fcc7ac384 chore(release): 2.3.2 [skip ci] 2022-07-28 21:06:12 +00:00
9351edf626 chore: use the right resume.json 2022-07-28 23:01:19 +02:00
1f4aa54211 chore: remove jest -> cypress for unit tests 2022-07-28 22:51:12 +02:00
8bc1471cbb chore: easier development for jsonresume-theme-custom thanks to vite 2022-07-28 21:20:41 +02:00
1ebdab18a5 fix: update about, now second year of university 2022-07-23 23:00:58 +02:00
b9b76e839a build(deps): update latest 2022-07-01 23:12:47 +02:00
bc065a2e19 chore(release): 2.3.1 [skip ci] 2022-05-03 08:12:15 +00:00
5d3a287b27 fix(resume): wrong dates 2022-05-03 10:05:11 +02:00
fb689c9bc1 chore(release): 2.3.0 [skip ci] 2022-04-11 10:35:55 +00:00
2c3a70df2a feat(posts): add thream-v1-0-0 2022-04-11 12:31:19 +02:00
bce254a355 chore(release): 2.2.1 [skip ci] 2022-03-24 18:00:10 +00:00
f67d331416 fix: calculate age client side so it updates "automatically" (not only on rebuild) 2022-03-24 18:57:27 +01:00
6abc881e94 chore(release): 2.2.0 [skip ci] 2022-03-24 10:49:45 +00:00
a67d6665ea feat: display age nearby the birth date 2022-03-24 11:45:19 +01:00
1152039663 chore(release): 2.1.0 [skip ci] 2022-03-14 08:15:56 +00:00
919ebd5f3e feat(posts): add mistakes-as-junior-developer 2022-03-14 09:09:46 +01:00
94212f9b5c chore(release): 2.0.2 [skip ci] 2022-02-23 18:52:16 +00:00
bf9347f685 ci: multiple workflows instead of one 2022-02-23 19:46:44 +01:00
896b6051e8 fix: redirect /curriculum-vitae.html to /curriculum-vitae 2022-02-23 19:31:18 +01:00
b5f3552c07 chore(release): 2.0.1 [skip ci] 2022-02-23 10:55:50 +00:00
5fbae8601f fix(posts): spelling mistakes 2022-02-23 11:51:00 +01:00
48d35776a9 fix(resume): usage of experience website 2022-02-23 11:14:53 +01:00
8b9e58c47c chore(release): 2.0.0 [skip ci] 2022-02-23 08:14:21 +00:00
33078ece66 chore: temporarily support Node.js v14 to deploy on Vercel 2022-02-23 09:06:12 +01:00
a2da9618af test(e2e): header should always be visible (sticky) 2022-02-23 09:03:10 +01:00
a467ea7aff feat: usage of VSCode Dark+ syntax highlighting in posts 2022-02-23 00:38:50 +01:00
0e0036b737 feat: add Curriculum vitae 2022-02-22 21:19:42 +01:00
729e540d04 chore: maintenance 2022-02-20 15:12:10 +01:00
e5f4615f7f fix(posts): grammar and orthograph in clean-code (#321) 2022-02-20 15:12:10 +01:00
0bf89f4df5 feat(posts): add clean-code 2022-02-20 15:12:10 +01:00
bcb184e49c feat: add blog (#320) 2022-02-20 15:12:10 +01:00
1505b81233 build(deps): bump Node.js to 16.0.0 and npm to 8.0.0
BREAKING CHANGE: minimum supported Node.js >= 16.0.0 and npm >= 8.0.0

fixes #74
2022-02-20 15:12:10 +01:00
a30355582e feat(skills): add C/C++ 2022-02-20 15:12:10 +01:00
a4effb52f9 feat(skills): add GNU/Linux 2022-02-20 15:12:10 +01:00
52bba0ef9c build(deps): update latest 2022-02-20 15:08:48 +01:00
8ecfeca50d chore(release): 1.3.6 [skip ci] 2021-09-09 08:15:20 +00:00
fd0740d12a fix: add text that I'm a student at University 2021-09-09 10:08:42 +02:00
bd2dc9c9af build(deps-dev): bump babel-jest from 27.1.0 to 27.1.1 (#212) 2021-09-09 08:46:48 +02:00
a53888ab42 build(deps-dev): bump @types/node from 16.7.13 to 16.9.0 (#213) 2021-09-09 08:46:16 +02:00
624e79eecd build(deps-dev): bump jest from 27.1.0 to 27.1.1 (#214) 2021-09-09 08:46:02 +02:00
049ec367fc build(deps-dev): bump tailwindcss from 2.2.11 to 2.2.14 (#211) 2021-09-08 21:27:01 +02:00
56f22d0c9b build(deps-dev): bump tailwindcss from 2.2.9 to 2.2.11 (#207) 2021-09-08 21:17:25 +02:00
9adb67662e build(deps-dev): bump @types/node from 16.7.10 to 16.7.13 (#208) 2021-09-08 21:17:14 +02:00
010087088f build(deps): bump html-react-parser from 1.2.8 to 1.3.0 (#209) 2021-09-08 21:17:00 +02:00
35d4396e80 build(deps): bump sharp from 0.29.0 to 0.29.1 (#210) 2021-09-08 21:16:48 +02:00
934118737a build(deps-dev): bump @typescript-eslint/eslint-plugin (#204) 2021-09-08 21:16:31 +02:00
b692dac926 build(deps): bump crazy-max/ghaction-import-gpg from 3.2.0 to 4 (#200)
Co-authored-by: Divlo <contact@divlo.fr>
2021-09-06 16:37:10 +02:00
dd582652ab build(deps-dev): bump @types/react from 17.0.19 to 17.0.20 (#201) 2021-09-06 16:28:01 +02:00
337352de0c build(deps-dev): bump @semantic-release/git from 9.0.0 to 9.0.1 (#202) 2021-09-06 16:27:44 +02:00
c513268cbb build(deps-dev): bump autoprefixer from 10.3.3 to 10.3.4 (#199) 2021-09-03 09:54:38 +02:00
4fdcb2b667 build(deps-dev): bump start-server-and-test from 1.13.1 to 1.14.0 (#198) 2021-09-03 09:54:17 +02:00
377b8e91a6 chore(release): 1.3.5 [skip ci] 2021-09-01 22:17:55 +00:00
fce29c9d4a build(deps): update latest 2021-09-02 00:13:20 +02:00
c198f47aa9 build(deps-dev): eslint-config-standard-with-typescript to 21.0.1 (#195) 2021-09-01 16:38:44 +02:00
8e051332cd build(deps-dev): bump @typescript-eslint/eslint-plugin to 4.30.0 (#197) 2021-09-01 16:37:39 +02:00
9f3436e1df build(deps-dev): bump tailwindcss from 2.2.8 to 2.2.9 (#196) 2021-09-01 16:37:17 +02:00
2f2373e62f build(deps-dev): bump cypress from 8.3.0 to 8.3.1 (#187) 2021-09-01 16:36:12 +02:00
c6b455dd10 build(deps-dev): bump eslint-plugin-prettier from 3.4.1 to 4.0.0 (#189) 2021-09-01 16:35:35 +02:00
4e089b41f2 build(deps-dev): bump @types/node from 16.7.2 to 16.7.10 (#193) 2021-09-01 16:35:19 +02:00
6c102b1b35 build(deps-dev): bump eslint-config-next from 11.1.0 to 11.1.2 (#194) 2021-09-01 16:35:03 +02:00
52b10944b7 build(deps): bump next from 11.1.0 to 11.1.2 (#192) 2021-09-01 16:34:50 +02:00
db36eb3e7a build(deps-dev): bump jest from 27.0.6 to 27.1.0 (#185) 2021-08-27 12:45:18 +02:00
c739ad951d build(deps-dev): bump babel-jest from 27.0.6 to 27.1.0 (#184) 2021-08-27 12:45:07 +02:00
2802ff029f build(deps-dev): bump tailwindcss from 2.2.7 to 2.2.8 (#182) 2021-08-27 12:43:05 +02:00
1a7457b44b build(deps-dev): bump @types/node from 16.7.1 to 16.7.2 (#183) 2021-08-27 12:41:56 +02:00
ff210f879d build(deps-dev): bump semantic-release from 17.4.6 to 17.4.7 (#178) 2021-08-27 12:41:43 +02:00
607454b360 build(deps-dev): bump eslint-plugin-import from 2.24.1 to 2.24.2 (#176) 2021-08-27 12:41:29 +02:00
d1522fbf44 build(deps): bump node from 16.7.0 to 16.8.0 (#179) 2021-08-27 12:41:06 +02:00
b82eae7499 build(deps-dev): bump autoprefixer from 10.3.2 to 10.3.3 (#181) 2021-08-27 12:40:52 +02:00
73527ce8fe build(deps-dev): bump husky from 7.0.1 to 7.0.2 (#177) 2021-08-27 12:40:30 +02:00
0cd885ee70 build(deps-dev): bump typescript from 4.3.5 to 4.4.2 (#180) 2021-08-27 12:40:16 +02:00
2cb2df975f build(deps-dev): bump @typescript-eslint/eslint-plugin to 4.29.3 (#175) 2021-08-24 02:30:24 +02:00
37f5843adb build(deps-dev): bump semantic-release from 17.4.5 to 17.4.6 (#174) 2021-08-24 02:30:06 +02:00
d794d38f14 test(e2e): visible instead of exist 2021-08-23 19:48:15 +02:00
fc5ba28b8a perf: remove unnecessary fonts weight 2021-08-23 19:41:39 +02:00
b5945150b8 fix: remove Hyper Terminal from tools used 2021-08-23 19:25:17 +02:00
aa12d626d2 perf: uses-responsive-images 2021-08-23 19:17:30 +02:00
6ac4782b7d build(deps-dev): bump @types/node from 16.6.2 to 16.7.1 (#171) 2021-08-23 12:00:52 +02:00
0aa998d593 build(deps-dev): bump eslint-plugin-prettier from 3.4.0 to 3.4.1 (#172) 2021-08-23 12:00:39 +02:00
56f975e53c build(deps-dev): bump autoprefixer from 10.3.1 to 10.3.2 (#173) 2021-08-23 12:00:26 +02:00
5a16d24ea1 build(deps-dev): bump eslint-plugin-import from 2.24.0 to 2.24.1 (#170) 2021-08-20 10:37:53 +02:00
52267005ec build(deps-dev): bump @types/react from 17.0.18 to 17.0.19 (#169) 2021-08-20 10:37:38 +02:00
99b9b12ac9 build(deps-dev): bump @types/node from 16.6.1 to 16.6.2 (#168) 2021-08-19 10:56:35 +02:00
2cae77481f build(deps): bump node from 16.6.2 to 16.7.0 (#167) 2021-08-19 10:55:46 +02:00
e98b47a459 build(deps): bump sharp from 0.28.3 to 0.29.0 (#166) 2021-08-18 11:26:24 +02:00
4cc87758c1 build(deps): bump next-pwa from 5.2.24 to 5.3.1 (#164) 2021-08-17 20:49:12 +02:00
1bb0f31223 build(deps-dev): bump @typescript-eslint/eslint-plugin (#165) 2021-08-17 20:48:56 +02:00
af2dd0bd60 build(deps-dev): bump cypress from 8.2.0 to 8.3.0 (#163) 2021-08-17 20:48:39 +02:00
63d7485c8d build(deps): bump next-pwa from 5.3.0 to 5.2.24 2021-08-16 15:38:56 +02:00
74fde0ea40 build(deps): update latest version 2021-08-16 15:31:35 +02:00
0d2b318818 build(deps): bump node from 16.6.1 to 16.6.2 (#155) 2021-08-13 15:50:10 +02:00
266b3f8589 test: add cypress e2e (#159) 2021-08-13 15:48:29 +02:00
f7d304ca80 build(deps): bump read-pkg from 5.2.0 to 6.0.0 (#136) 2021-08-12 11:03:37 +02:00
63017953d7 chore(release): 1.3.4 [skip ci] 2021-08-11 23:29:15 +00:00
20600eb976 build(deps): bump crazy-max/ghaction-import-gpg from 3.1.0 to 3.2.0 (#154) 2021-08-12 01:21:54 +02:00
7f920b77aa build(deps): bump actions/setup-node from 2.3.1 to 2.4.0 (#152) 2021-08-12 01:21:40 +02:00
4f5dfc63ea perf: reduce build size + add next-secure-headers 2021-08-12 01:19:11 +02:00
712805df93 build(deps): bump actions/setup-node from 2.3.0 to 2.3.1 (#144) 2021-08-04 10:39:56 +02:00
cd68f597c9 build(deps-dev): bump @typescript-eslint/eslint-plugin (#143) 2021-08-04 10:39:35 +02:00
7ec3fe8ced build(deps-dev): bump eslint from 7.31.0 to 7.32.0 (#141) 2021-08-04 10:39:12 +02:00
90d22b2c7f build(deps-dev): bump @types/node from 16.4.7 to 16.4.10 (#142) 2021-08-04 10:38:47 +02:00
4b06fd0522 build(deps): bump node from 16.5.0 to 16.6.1 (#145) 2021-08-04 10:38:28 +02:00
b4427f36c2 build(deps): bump @fortawesome/react-fontawesome to 0.1.15 (#146) 2021-08-04 10:38:07 +02:00
b758c64e02 build(deps-dev): bump @types/node from 16.4.6 to 16.4.7 (#139) 2021-07-30 07:21:41 +02:00
04469b83ea build(deps-dev): bump @types/node from 16.4.4 to 16.4.6 (#138) 2021-07-29 08:16:05 +02:00
36d54666a0 build(deps-dev): bump @types/node from 16.4.3 to 16.4.4 (#137) 2021-07-28 08:17:45 +02:00
a34cefec6e chore(release): set correctly env [skip ci] 2021-07-27 21:34:08 +02:00
5c343395df chore(release): 1.3.3 [skip ci] 2021-07-27 19:06:15 +00:00
028815a7b6 fix: sign release commit and backmerge to develop 2021-07-27 21:01:33 +02:00
a2ad591d6d chore(release): 1.3.2 [skip ci] 2021-07-27 18:04:31 +00:00
7087911756 ci(release): add GH_TOKEN 2021-07-27 20:01:21 +02:00
35b1c4169f ci(release): persist-credentials: false 2021-07-27 19:52:24 +02:00
4c351b8179 chore: update message of release commit 2021-07-27 19:35:08 +02:00
701dccc018 fix: include version in release 2021-07-27 19:26:08 +02:00
5133765f94 chore: add Vercel CLI 2021-07-27 19:00:21 +02:00
3b208c6614 fix: disable hover:underline on link of Respository (open source) 2021-07-27 18:31:41 +02:00
52870fd6a4 fix: replace facebook/jest to vercel/styled-jsx 2021-07-27 11:44:44 +00:00
3a278fec10 feat: add version number in footer 2021-07-27 11:36:35 +00:00
669f592a9f build(deps-dev): bump @typescript-eslint/eslint-plugin (#135) 2021-07-27 11:02:51 +02:00
9c0a3ea1af build(deps-dev): bump @types/react from 17.0.14 to 17.0.15 (#134) 2021-07-26 06:50:08 +02:00
fa8d70bf82 build(deps-dev): bump @commitlint/cli from 12.1.4 to 13.1.0 (#129) 2021-07-26 06:49:55 +02:00
3293fd488e build(deps-dev): bump lint-staged from 11.1.0 to 11.1.1 (#130) 2021-07-26 06:49:39 +02:00
426bee09da build(deps-dev): bump tailwindcss from 2.2.6 to 2.2.7 (#133) 2021-07-26 06:49:16 +02:00
dbc6c84895 build(deps-dev): bump @commitlint/config-conventional to 13.1.0 (#128) 2021-07-26 06:48:57 +02:00
fab539c9d7 build(deps-dev): bump @types/node from 16.4.1 to 16.4.3 (#132) 2021-07-26 06:48:32 +02:00
176ab64a37 build(deps-dev): bump markdownlint-cli from 0.27.1 to 0.28.1 (#131) 2021-07-26 06:48:10 +02:00
1b56bbc694 build(deps-dev): bump @types/node from 16.4.0 to 16.4.1 (#126) 2021-07-23 08:11:04 +02:00
0f9a968081 build(deps-dev): bump lint-staged from 11.0.1 to 11.1.0 (#127) 2021-07-23 08:10:52 +02:00
6b9ff4100d build(deps-dev): bump tailwindcss from 2.2.4 to 2.2.6 (#124) 2021-07-22 07:57:57 +02:00
870bc3d26b build(deps-dev): bump postcss from 8.3.5 to 8.3.6 (#125) 2021-07-22 07:55:45 +02:00
41e4b93427 build(deps-dev): bump @typescript-eslint/eslint-plugin (#120) 2021-07-21 12:57:31 +02:00
72ae4ef01d build(deps): bump next-pwa from 5.2.23 to 5.2.24 (#121) 2021-07-21 12:57:20 +02:00
748259b57c build(deps): bump actions/setup-node from 2.2.0 to 2.3.0 (#122) 2021-07-21 12:57:09 +02:00
fafd606c18 build(deps-dev): bump @types/node from 16.3.3 to 16.4.0 (#123) 2021-07-21 12:56:56 +02:00
b8c3022532 build(deps-dev): bump @types/node from 16.3.2 to 16.3.3 (#119) 2021-07-19 11:32:26 +02:00
46adaee53f build(deps-dev): bump eslint from 7.30.0 to 7.31.0 (#118) 2021-07-19 11:32:04 +02:00
508114152c build(deps-dev): bump @types/node from 16.3.1 to 16.3.2 (#116) 2021-07-15 17:19:26 +02:00
b2852d172c build(deps-dev): bump lint-staged from 11.0.0 to 11.0.1 (#115) 2021-07-15 17:19:13 +02:00
16e3b1e465 build(deps): bump node from 16.4.2 to 16.5.0 (#117) 2021-07-15 17:19:01 +02:00
ae610ff816 build(deps-dev): bump @typescript-eslint/eslint-plugin to 4.28.3 (#114) 2021-07-13 23:24:17 +02:00
7c001f3c30 build(deps-dev): bump autoprefixer from 10.3.0 to 10.3.1 (#113) 2021-07-13 23:18:52 +02:00
7eada755e1 build(deps-dev): bump autoprefixer from 10.2.6 to 10.3.0 (#112) 2021-07-12 13:28:27 +02:00
6909304f15 build(deps-dev): bump @types/node from 16.0.3 to 16.3.1 (#111) 2021-07-10 19:07:50 +02:00
25b2f05170 build(deps-dev): bump @types/react from 17.0.13 to 17.0.14 (#107) 2021-07-10 19:06:30 +02:00
0cc83a811c build(deps): bump node from 16.4.0 to 16.4.2 (#106) 2021-07-10 19:06:10 +02:00
78b14c2620 build(deps-dev): bump @types/node from 16.0.0 to 16.0.3 (#110) 2021-07-10 19:05:51 +02:00
eebdf0edd2 build(deps): bump @fontsource/montserrat from 4.4.5 to 4.5.0 (#109) 2021-07-10 19:05:40 +02:00
62e8005081 build(deps-dev): bump @types/jest from 26.0.23 to 26.0.24 (#105) 2021-07-07 19:04:04 +02:00
6473e9da7d build(deps-dev): bump husky from 7.0.0 to 7.0.1 (#104) 2021-07-07 19:03:52 +02:00
1805997f59 build(deps): bump node from 16.3.0 to 16.4.0 (#103) 2021-07-07 19:03:39 +02:00
fb25c12883 build(deps-dev): bump @typescript-eslint/eslint-plugin to 4.28.2 (#102) 2021-07-06 09:02:07 +02:00
849b758fab build(deps): bump next-pwa to 5.2.23 (#101) 2021-07-06 09:01:44 +02:00
ccf5d42c19 feat: add Open source section 2021-07-04 19:56:05 +02:00
2d68ce59ca docs(readme): usage of json instead of TypeScript (About) 2021-07-04 15:42:52 +02:00
4e6531e341 build(deps-dev): bump @types/react from 17.0.11 to 17.0.13 (#98) 2021-07-02 10:39:07 +02:00
8f2d0817ce build(deps-dev): bump husky from 6.0.0 to 7.0.0 (#99) 2021-07-02 10:38:56 +02:00
7674401e7c build(deps-dev): bump @types/node from 15.12.5 to 15.14.0 (#100) 2021-07-02 10:37:50 +02:00
61983dfc4a build(deps): bump actions/setup-node from 2.1.5 to 2.2.0 (#96) 2021-07-01 09:14:38 +02:00
ed47407b7d build(deps-dev): bump typescript from 4.3.4 to 4.3.5 (#97) 2021-07-01 09:00:18 +02:00
0a79754978 build(deps-dev): bump babel-jest to 27.0.6 (#94) 2021-06-29 11:40:39 +02:00
725afecbf3 build(deps-dev): bump jest to 27.0.6 (#95) 2021-06-29 11:39:23 +02:00
1bf79e55e1 build(deps-dev): bump @typescript-eslint/eslint-plugin to 4.28.1 (#93) 2021-06-29 11:38:57 +02:00
3a369c49fa build(deps-dev): bump prettier from 2.3.1 to 2.3.2 (#90) 2021-06-28 12:03:12 +02:00
e78ccf3db4 build(deps-dev): bump @types/node from 15.12.4 to 15.12.5 (#91) 2021-06-28 12:02:52 +02:00
acafe71f31 build(deps): bump next-themes from 0.0.14 to 0.0.15 (#92) 2021-06-28 12:02:15 +02:00
3ef876b737 feat: add GitLab and npm social medias like README 2021-06-24 20:10:53 +02:00
b30bbc99e9 feat: add new Leon portfolio 2021-06-24 19:57:06 +02:00
235c072c21 feat: add new skills 2021-06-24 19:46:44 +02:00
f5bdd85b73 fix: set Divlo in Header in yellow 2021-06-24 18:39:08 +02:00
b81ae5a9a6 fix: replace "My section" to "Section", delete "My" 2021-06-24 18:32:13 +02:00
1ea5e3f323 build(deps-dev): bump tailwindcss to 2.2.4 (#89) 2021-06-24 09:26:46 +02:00
f6eaef54b9 build(deps-dev): bump @testing-library/react to 12.0.0 (#88) 2021-06-24 09:26:31 +02:00
5b14361d74 build(deps-dev): bump eslint-config-next to 11.0.1 (#84) 2021-06-23 13:28:18 +02:00
d1f9c0eb2f build(deps-dev): bump @typescript-eslint/eslint-plugin to 4.28.0 (#83) 2021-06-23 13:28:02 +02:00
95b27abec1 build(deps-dev): bump babel-jest to 27.0.5 (#85) 2021-06-23 13:27:45 +02:00
228e987d8b build(deps): bump next to 11.0.1 (#86) 2021-06-23 13:27:29 +02:00
7c44102afd build(deps-dev): bump jest to 27.0.5 (#87) 2021-06-23 13:27:14 +02:00
b8410e5628 build(deps-dev): bump tailwindcss to 2.2.2 (#81) 2021-06-21 07:05:31 +02:00
d6f0b12b17 build(deps-dev): bump @types/node to 15.12.4 (#80) 2021-06-21 07:04:50 +02:00
b02e31c373 build(deps-dev): bump eslint to 7.29.0 (#82) 2021-06-21 07:04:09 +02:00
e012d41929 build(deps): bump html-react-parser to 1.2.7 (#79) 2021-06-21 07:03:36 +02:00
4bd77b45e4 build(deps-dev): bump tailwindcss to 2.2.0 (#77) 2021-06-18 11:19:52 +02:00
e43f572588 build(deps-dev): bump postcss to 8.3.5 (#78) 2021-06-18 11:18:44 +02:00
9aecb3cab9 build(deps-dev): bump typescript to 4.3.4 (#76) 2021-06-18 11:18:21 +02:00
f1256ab23f build(deps-dev): bump typescript to 4.3.3 (#75) 2021-06-17 12:21:16 +02:00
892bf0e87a build(deps): bump next to 11.0.0 2021-06-15 20:35:52 +02:00
61ef6c5525 build(deps-dev): bump postcss from 8.3.3 to 8.3.4 (#73) 2021-06-15 11:54:11 +02:00
38405d658e build(deps-dev): bump @typescript-eslint/eslint-plugin to 4.27.0 (#72) 2021-06-15 11:54:01 +02:00
f3b7c315f0 build(deps-dev): bump postcss from 8.3.2 to 8.3.3 (#71) 2021-06-14 10:20:21 +02:00
6950286eec chore: fix some imperfections 2021-06-13 01:53:13 +02:00
60f966c493 chore: usage of node >= 14.0.0 2021-06-12 22:31:34 +00:00
7af4d3c512 chore: add devcontainer 2021-06-12 22:30:02 +00:00
d9b53480be build(deps-dev): bump postcss from 8.3.1 to 8.3.2 (#70) 2021-06-11 09:02:51 +02:00
a574a8ffd1 build(deps-dev): bump postcss from 8.3.0 to 8.3.1 (#69) 2021-06-10 08:48:34 +02:00
b0a34c6162 fix: link styles with underline on hover 2021-06-10 00:17:52 +02:00
ea04f0f189 build(deps-dev): bump @types/react from 17.0.9 to 17.0.10 (#68) 2021-06-09 11:18:01 +02:00
1403cdf80c build(deps-dev): bump @typescript-eslint/eslint-plugin (#67) 2021-06-08 09:16:29 +02:00
40e676cfc7 build(deps-dev): bump @types/node from 15.12.1 to 15.12.2 (#66) 2021-06-08 09:16:12 +02:00
5f654020d5 build(deps-dev): bump @lhci/cli from 0.7.2 to 0.8.0 (#58) 2021-06-07 14:44:05 +02:00
a3ec87bf52 build(deps-dev): bump @types/node from 15.12.0 to 15.12.1 (#63) 2021-06-07 10:59:08 +02:00
88588355fd build(deps): bump @fontsource/montserrat from 4.4.2 to 4.4.5 (#64) 2021-06-07 10:58:15 +02:00
c329c56094 build(deps-dev): bump prettier from 2.3.0 to 2.3.1 (#65) 2021-06-07 10:57:58 +02:00
08a5454cf4 build(deps-dev): bump eslint from 7.27.0 to 7.28.0 (#62) 2021-06-07 10:57:38 +02:00
8faf47c06e build(deps-dev): bump @testing-library/jest-dom from 5.12.0 to 5.13.0 (#59) 2021-06-04 10:25:13 +02:00
d7f778de28 build(deps-dev): bump jest from 27.0.3 to 27.0.4 (#60) 2021-06-04 10:24:58 +02:00
cd3cc50e00 build(deps-dev): bump @types/node from 15.9.0 to 15.12.0 (#61) 2021-06-04 10:24:39 +02:00
755f2da03a build(deps-dev): bump @types/react from 17.0.8 to 17.0.9 (#54) 2021-06-04 09:29:48 +02:00
7ef9f79b97 build(deps): bump node from 16.2.0 to 16.3.0 (#57) 2021-06-04 09:25:00 +02:00
2c53a1409c build(deps-dev): bump @types/node from 15.6.1 to 15.9.0 (#55) 2021-06-03 10:54:28 +02:00
1e2d5c0f3e build(deps-dev): bump tailwindcss from 2.1.2 to 2.1.4 (#56) 2021-06-03 10:54:11 +02:00
6db7ed2f5e build(deps-dev): bump @typescript-eslint/eslint-plugin (#52) 2021-06-01 18:22:33 +02:00
9b8102cbdc ci: only one workflow (Divlo) 2021-05-31 15:04:17 +02:00
e0bc1fed49 build(deps): bump @fontsource/montserrat from 4.4.0 to 4.4.2 (#51) 2021-05-31 13:43:10 +02:00
c230f5bb51 build(deps-dev): bump eslint-plugin-import from 2.23.3 to 2.23.4 (#50) 2021-05-31 13:42:53 +02:00
6f4819b689 build(deps-dev): bump jest from 27.0.1 to 27.0.3 (#49) 2021-05-31 13:42:30 +02:00
fd67737754 build(deps-dev): bump babel-jest from 27.0.1 to 27.0.2 (#48) 2021-05-31 13:42:14 +02:00
6f94865917 build(deps): bump @fontsource/montserrat from 4.3.0 to 4.4.0 (#47) 2021-05-28 08:46:08 +02:00
1e4167e209 build(deps): bump actions/cache from 2.1.5 to 2.1.6 (#46) 2021-05-28 08:44:01 +02:00
655ed6f6f6 build(deps-dev): bump typescript from 4.2.4 to 4.3.2 (#45) 2021-05-27 10:23:19 +02:00
8fe73be90b build(deps): bump jest to 27.0.1 2021-05-26 18:54:09 +02:00
e925b73606 build(deps): bump next from 10.2.2 to 10.2.3 (#40) 2021-05-25 08:56:30 +02:00
b902b9a122 build(deps-dev): bump @typescript-eslint/eslint-plugin (#41) 2021-05-25 08:55:07 +02:00
1044302118 build(deps-dev): bump @types/node from 15.6.0 to 15.6.1 (#39) 2021-05-25 08:54:46 +02:00
df15232312 build(deps-dev): bump eslint-plugin-import from 2.23.2 to 2.23.3 (#36) 2021-05-24 11:30:29 +02:00
f5d273688d build(deps): bump next-translate from 1.0.6 to 1.0.7 (#37) 2021-05-24 11:30:08 +02:00
993dd1e30e build(deps-dev): bump @types/node from 15.3.1 to 15.6.0 (#38) 2021-05-24 11:29:36 +02:00
83f90e24c7 build(deps-dev): bump eslint from 7.26.0 to 7.27.0 (#35) 2021-05-24 11:29:24 +02:00
c3fd177ff5 build(deps-dev): bump postcss from 8.2.15 to 8.3.0 (#34) 2021-05-21 09:34:40 +02:00
c5f8b4fb13 build(deps): bump node from 16.1.0 to 16.2.0 (#31) 2021-05-20 11:14:07 +02:00
a4e48de57e build(deps-dev): bump @types/node from 15.3.0 to 15.3.1 (#32) 2021-05-20 11:13:37 +02:00
e3aa2a4d50 build(deps): bump next from 10.2.0 to 10.2.2 (#33) 2021-05-20 11:13:11 +02:00
88c44ed31f build(deps-dev): bump @types/react from 17.0.5 to 17.0.6 (#30) 2021-05-19 10:26:33 +02:00
d3d1ca7beb build(deps-dev): bump @typescript-eslint/eslint-plugin (#29) 2021-05-18 09:17:15 +02:00
8d758bc1d7 build(deps-dev): bump @types/node from 15.0.3 to 15.3.0 (#26) 2021-05-17 15:55:05 +02:00
34b5f123b4 build(deps-dev): bump eslint-plugin-import from 2.23.0 to 2.23.2 (#27) 2021-05-17 15:54:48 +02:00
809f4612b5 build(deps-dev): bump @testing-library/react from 11.2.6 to 11.2.7 (#28) 2021-05-17 15:54:32 +02:00
1f48f7a296 build(deps-dev): bump eslint-plugin-import from 2.22.1 to 2.23.0 (#25) 2021-05-14 11:18:23 +02:00
56258dc06b build(deps-dev): bump @commitlint/cli to 12.1.4 (#21) 2021-05-13 13:38:13 +02:00
3fea7d48f6 build(deps-dev): bump @types/node from 15.0.2 to 15.0.3 (#22) 2021-05-13 13:36:12 +02:00
f49ca1f4f2 build(deps-dev): bump @commitlint/config-conventional (#23) 2021-05-13 13:36:00 +02:00
e9d9139263 build(deps-dev): bump semantic-release from 17.4.2 to 17.4.3 (#24) 2021-05-13 13:35:49 +02:00
98e7987b04 build(deps): bump actions/checkout from 2 to 2.3.4 (#20) 2021-05-13 13:35:37 +02:00
4dc145fe75 build(deps-dev): bump prettier from 2.2.1 to 2.3.0 (#17) 2021-05-11 18:33:41 +02:00
c8b12cd618 build(deps-dev): bump @typescript-eslint/eslint-plugin (#18) 2021-05-11 18:25:24 +02:00
97cf63f643 build(deps-dev): bump postcss from 8.2.14 to 8.2.15 (#19) 2021-05-11 18:25:12 +02:00
cd20e25082 fix: update content 2021-05-08 21:09:03 +02:00
204 changed files with 19053 additions and 40722 deletions

View File

@ -1,3 +0,0 @@
{
"presets": ["next/babel"]
}

1
.devcontainer/Dockerfile Normal file
View File

@ -0,0 +1 @@
FROM mcr.microsoft.com/devcontainers/javascript-node:20

View File

@ -0,0 +1,9 @@
services:
workspace:
build:
context: './'
dockerfile: './Dockerfile'
volumes:
- '..:/workspace:cached'
command: 'sleep infinity'
network_mode: 'host'

View File

@ -0,0 +1,24 @@
{
"name": "theoludwig",
"dockerComposeFile": "./compose.yaml",
"service": "workspace",
"workspaceFolder": "/workspace",
"customizations": {
"vscode": {
"settings": {
"remote.autoForwardPorts": false,
"remote.localPortHost": "allInterfaces"
}
},
"extensions": [
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"davidanson.vscode-markdownlint",
"bradlc.vscode-tailwindcss",
"mikestead.dotenv",
"ms-azuretools.vscode-docker"
]
},
"remoteUser": "node"
}

View File

@ -1,11 +1,4 @@
.vscode
.git
.next
build
.next
coverage
dist
node_modules
out
**/workbox-*.js
**/sw.js
**/__test__/**

View File

@ -1,2 +1,2 @@
COMPOSE_PROJECT_NAME=divlo.fr
COMPOSE_PROJECT_NAME=theoludwig
PORT=3000

View File

@ -1,6 +0,0 @@
.next
.lighthouseci
node_modules
next-env.d.ts
**/workbox-*.js
**/sw.js

View File

@ -1,15 +1,16 @@
{
"extends": ["standard-with-typescript", "eslint-config-prettier"],
"plugins": ["eslint-plugin-prettier"],
"extends": ["conventions", "next/core-web-vitals", "prettier"],
"plugins": ["prettier"],
"parserOptions": {
"project": "./tsconfig.json"
},
"env": {
"node": true,
"browser": true,
"jest": true
},
"rules": {
"prettier/prettier": "error"
},
"overrides": [
{
"files": ["*.ts", "*.tsx"],
"parser": "@typescript-eslint/parser"
}
]
}

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
* text=auto eol=lf

View File

@ -1,13 +1,6 @@
<!--
<!-- Please first discuss the change you wish to make via issue before making a change. It might avoid a waste of your time. -->
Please first discuss the change you wish to make via issue before making a change. It might avoid a waste of your time.
Before submitting your contribution, please take a moment to review this document:
https://github.com/Divlo/Divlo/blob/master/.github/CONTRIBUTING.md
-->
## What changes this PR introduce?
# What changes this PR introduce?
## List any relevant issue numbers

View File

@ -1,16 +0,0 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'daily'
- package-ecosystem: 'docker'
directory: '/'
schedule:
interval: 'daily'
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'daily'

View File

@ -1,38 +0,0 @@
name: 'Divlo'
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
ci:
runs-on: 'ubuntu-latest'
strategy:
matrix:
node-version: [14.x]
steps:
- uses: 'actions/checkout@v2'
- name: Use Node.js ${{ matrix.node-version }}
uses: 'actions/setup-node@v2.1.5'
with:
node-version: ${{ matrix.node-version }}
- name: 'Cache dependencies'
uses: 'actions/cache@v2.1.5'
with:
path: '.npm'
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
- run: 'npm install --global npm@7'
- run: 'npm ci --cache .npm --prefer-offline'
- run: 'npm run lint:commit -- --to "${{ github.sha }}"'
- run: 'npm run lint:docker'
- run: 'npm run lint:editorconfig'
- run: 'npm run lint:markdown'
- run: 'npm run lint:typescript'
- run: 'npm run build'
- run: 'npm run lighthouse'
- run: 'npm run test'

25
.github/workflows/build.yml vendored Normal file
View File

@ -0,0 +1,25 @@
name: 'Build'
on:
push:
branches: [develop]
pull_request:
branches: [master, develop]
jobs:
build:
runs-on: 'ubuntu-latest'
steps:
- uses: 'actions/checkout@v4.0.0'
- name: 'Setup Node.js'
uses: 'actions/setup-node@v3.8.1'
with:
node-version: '20.x'
cache: 'npm'
- name: 'Install dependencies'
run: 'npm clean-install'
- name: 'Build'
run: 'npm run build'

View File

@ -1,28 +0,0 @@
name: 'CodeQL'
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
analyze:
name: 'Analyze'
runs-on: 'ubuntu-latest'
strategy:
fail-fast: false
matrix:
language: ['javascript']
steps:
- uses: 'actions/checkout@v2'
- name: 'Initialize CodeQL'
uses: 'github/codeql-action/init@v1'
with:
languages: ${{ matrix.language }}
- name: 'Perform CodeQL Analysis'
uses: 'github/codeql-action/analyze@v1'

42
.github/workflows/lint.yml vendored Normal file
View File

@ -0,0 +1,42 @@
name: 'Lint'
on:
push:
branches: [develop]
pull_request:
branches: [master, develop]
jobs:
lint:
runs-on: 'ubuntu-latest'
steps:
- uses: 'actions/checkout@v4.0.0'
- name: 'Setup Node.js'
uses: 'actions/setup-node@v3.8.1'
with:
node-version: '20.x'
cache: 'npm'
- name: 'Install dependencies'
run: 'npm clean-install'
- name: 'lint:commit'
run: 'npm run lint:commit -- --to "${{ github.sha }}"'
- name: 'lint:editorconfig'
run: 'npm run lint:editorconfig'
- name: 'lint:markdown'
run: 'npm run lint:markdown'
- name: 'lint:eslint'
run: 'npm run lint:eslint'
- name: 'lint:prettier'
run: 'npm run lint:prettier'
- name: 'lint:dotenv'
uses: 'dotenv-linter/action-dotenv-linter@v2.18.0'
with:
github_token: ${{ secrets.github_token }}

View File

@ -1,34 +1,37 @@
name: 'Release'
on:
workflow_run:
workflows: [Divlo]
push:
branches: [master]
types:
- 'completed'
jobs:
release:
runs-on: 'ubuntu-latest'
strategy:
matrix:
node-version: [14.x]
steps:
- uses: 'actions/checkout@v2'
- name: Use Node.js ${{ matrix.node-version }}
uses: 'actions/setup-node@v2.1.5'
- uses: 'actions/checkout@v4.0.0'
with:
node-version: ${{ matrix.node-version }}
fetch-depth: 0
persist-credentials: false
- name: 'Cache dependencies'
uses: 'actions/cache@v2.1.5'
- name: 'Import GPG key'
uses: 'crazy-max/ghaction-import-gpg@v6.0.0'
with:
path: '.npm'
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
git_user_signingkey: true
git_commit_gpgsign: true
- run: 'npm install --global npm@7'
- run: 'npm ci --cache .npm --prefer-offline'
- run: 'npm run release'
- name: 'Setup Node.js'
uses: 'actions/setup-node@v3.8.1'
with:
node-version: '20.x'
cache: 'npm'
- name: 'Install dependencies'
run: 'npm clean-install'
- name: 'Release'
run: 'npm run release'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GIT_COMMITTER_NAME: ${{ secrets.GIT_NAME }}
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_EMAIL }}

48
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,48 @@
name: 'Test'
on:
push:
branches: [develop]
pull_request:
branches: [master, develop]
jobs:
test-unit:
runs-on: 'ubuntu-latest'
steps:
- uses: 'actions/checkout@v4.0.0'
- name: 'Setup Node.js'
uses: 'actions/setup-node@v3.8.1'
with:
node-version: '20.x'
cache: 'npm'
- name: 'Install dependencies'
run: 'npm clean-install'
- name: 'Unit Test'
run: 'npm run test:unit'
test-e2e:
runs-on: 'ubuntu-latest'
steps:
- uses: 'actions/checkout@v4.0.0'
- name: 'Setup Node.js'
uses: 'actions/setup-node@v3.8.1'
with:
node-version: '20.x'
cache: 'npm'
- name: 'Install dependencies'
run: 'npm clean-install'
- name: 'Build'
run: 'npm run build'
- name: 'html-w3c-validator'
run: 'npm run test:html-w3c-validator'
- name: 'End To End (e2e) Test'
run: 'npm run test:e2e'

12
.gitignore vendored
View File

@ -11,13 +11,13 @@ out
# production
build
dist
public/curriculum-vitae
# testing
coverage
# PWA
**/workbox-*.js
**/sw.js
cypress/screenshots
cypress/videos
cypress/downloads
# envs
.env
@ -45,3 +45,7 @@ npm-debug.log*
# misc
.DS_Store
.lighthouseci
# typescript
*.tsbuildinfo
next-env.d.ts

View File

@ -1,7 +1,7 @@
image: 'gitpod/workspace-full'
tasks:
- before: 'cp .env.example .env && npm install --global npm@7'
- before: 'cp .env.example .env'
init: 'npm clean-install'
command: 'npm run dev'

View File

@ -0,0 +1,4 @@
{
"urls": ["http://127.0.0.1:3000/", "http://127.0.0.1:3000/blog"],
"files": ["./public/curriculum-vitae/index.html"]
}

1
.husky/.gitignore vendored
View File

@ -1 +0,0 @@
_

View File

@ -1,29 +0,0 @@
{
"ci": {
"collect": {
"startServerCommand": "npm run start",
"startServerReadyPattern": "ready on",
"startServerReadyTimeout": 20000,
"url": ["http://localhost:3000/"],
"numberOfRuns": 3
},
"assert": {
"preset": "lighthouse:recommended",
"assertions": {
"legacy-javascript": "off",
"unused-javascript": "off",
"uses-rel-preload": "off",
"canonical": "off",
"unsized-images": "off",
"uses-responsive-images": "off",
"bypass": "warning",
"color-contrast": "warning",
"preload-lcp-image": "warning"
}
},
"upload": {
"target": "temporary-public-storage"
},
"server": {}
}
}

View File

@ -1,11 +1,6 @@
{
"*": ["editorconfig-checker"],
"*.{js,ts,jsx,tsx}": [
"prettier --write",
"eslint --fix",
"jest --findRelatedTests"
],
"*.{css,yml,json}": ["prettier --write"],
"*.{md}": ["prettier --write", "markdownlint --dot --fix"],
"./Dockerfile": ["dockerfilelint"]
"*.{js,jsx,ts,tsx}": ["prettier --write", "eslint --fix"],
"*.{css,scss,sass,json,jsonc,yml,yaml}": ["prettier --write"],
"*.{md,mdx}": ["prettier --write", "markdownlint-cli2 --fix"]
}

12
.markdownlint-cli2.jsonc Normal file
View File

@ -0,0 +1,12 @@
{
"config": {
"default": true,
"relative-links": true,
"extends": "markdownlint/style/prettier",
"MD024": false,
"MD033": false
},
"globs": ["**/*.{md,mdx}"],
"ignores": ["**/node_modules"],
"customRules": ["markdownlint-rule-relative-links"]
}

View File

@ -1,7 +0,0 @@
{
"default": true,
"MD013": false,
"MD024": false,
"MD033": false,
"MD041": false
}

View File

@ -1,8 +0,0 @@
.next
.lighthouseci
node_modules
next-env.d.ts
package.json
package-lock.json
**/workbox-*.js
**/sw.js

View File

@ -1,4 +1,5 @@
{
"branches": ["master"],
"plugins": [
[
"@semantic-release/commit-analyzer",
@ -6,7 +7,32 @@
"preset": "conventionalcommits"
}
],
[
"@semantic-release/release-notes-generator",
"@semantic-release/github"
{
"preset": "conventionalcommits"
}
],
[
"@semantic-release/npm",
{
"npmPublish": false
}
],
[
"@semantic-release/git",
{
"assets": ["package.json", "package-lock.json"],
"message": "chore(release): ${nextRelease.version} [skip ci]"
}
],
"@semantic-release/github",
[
"@saithodev/semantic-release-backmerge",
{
"branches": [{ "from": "master", "to": "develop" }],
"backmergeStrategy": "merge"
}
]
]
}

View File

@ -3,11 +3,9 @@
"editorconfig.editorconfig",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"divlo.vscode-styled-jsx-syntax",
"divlo.vscode-styled-jsx-languageserver",
"bradlc.vscode-tailwindcss",
"mikestead.dotenv",
"coenraads.bracket-pair-colorizer",
"davidanson.vscode-markdownlint"
"davidanson.vscode-markdownlint",
"ms-azuretools.vscode-docker"
]
}

View File

@ -1,9 +1,14 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.bracketPairColorization.enabled": true,
"prettier.configPath": ".prettierrc.json",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": true
}
},
"eslint.options": {
"ignorePath": ".gitignore"
},
"prettier.ignorePath": ".gitignore"
}

View File

@ -60,7 +60,7 @@ representative at an online or offline event.
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
contact@divlo.fr.
<contact@theoludwig.fr>.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the

View File

@ -1,6 +1,10 @@
# 💡 Contributing
Thanks a lot for your interest in contributing to **divlo.fr**! 🎉
Thanks a lot for your interest in contributing to **theoludwig.fr**! 🎉
## Code of Conduct
**theoludwig.fr** adopted the [Contributor Covenant](https://www.contributor-covenant.org/) as its Code of Conduct, and we expect project participants to adhere to it. Please read [the full text](./CODE_OF_CONDUCT.md) so that you can understand what actions will and will not be tolerated.
## Types of contributions
@ -11,64 +15,57 @@ Thanks a lot for your interest in contributing to **divlo.fr**! 🎉
## Pull Requests
- **Please first discuss** the change you wish to make via [issue](https://github.com/Divlo/Divlo/issues) before making a change. It might avoid a waste of your time.
- **Please first discuss** the change you wish to make via [issue](https://github.com/theoludwig/theoludwig/issues) before making a change. It might avoid a waste of your time.
- Ensure your code respect [Typescript Standard Style](https://www.npmjs.com/package/ts-standard).
- Ensure your code respect linting.
- Make sure your **code passes the tests**.
If you're adding new features to **divlo.fr**, please include tests.
If you're adding new features to **theoludwig.fr**, please include tests.
## Commits
The commit message guidelines respect [@commitlint/config-conventional](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional) and [Semantic Versioning](https://semver.org/) for releases.
### Types
Types define which kind of changes you made to the project.
| Types | Description |
| -------- | ------------------------------------------------------------------------------------------------------------ |
| feat | A new feature. |
| fix | A bug fix. |
| docs | Documentation only changes. |
| style | Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc). |
| refactor | A code change that neither fixes a bug nor adds a feature. |
| perf | A code change that improves performance. |
| test | Adding missing tests or correcting existing tests. |
| build | Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm). |
| ci | Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs). |
| chore | Other changes that don't modify src or test files. |
| revert | Reverts a previous commit. |
### Scopes
Scopes define what part of the code changed.
The commit message guidelines adheres to [Conventional Commits](https://www.conventionalcommits.org/) and [Semantic Versioning](https://semver.org/) for releases.
## Getting Started
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/Divlo/Divlo)
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/theoludwig/theoludwig)
### Prerequisites
- [Node.js](https://nodejs.org/) >= 20.0.0
- [npm](https://www.npmjs.com/) >= 9.0.0
### Installation
```sh
# Clone the repository
git clone https://github.com/Divlo/Divlo.git
git clone git@github.com:theoludwig/theoludwig.git
# Go to the project root
cd Divlo
cd theoludwig
# Configure environment variables
cp .env.example .env
# Install
npm clean-install
```
### Development environment with [Docker](https://www.docker.com/)
### Local Development environment
```sh
# Run website
npm run dev
```
### Production environment with [Docker](https://www.docker.com/)
```sh
# Setup and run all the services for you
docker-compose up --build
docker compose up --build
```
### Services started
- website : `http://localhost:3000`
- `website`: <http://127.0.0.1:3000>

View File

@ -1,11 +1,23 @@
FROM node:16.1.0
FROM node:20.6.1 AS builder-dependencies
WORKDIR /usr/src/application
COPY ./package*.json ./
RUN npm clean-install
WORKDIR /usr/src/app
RUN chown --recursive node:node /usr/src/app
COPY --chown=node:node ./package*.json ./
RUN npm install
COPY --chown=node:node ./ ./
USER node
FROM node:20.6.1 AS builder
WORKDIR /usr/src/application
COPY --from=builder-dependencies /usr/src/application/node_modules ./node_modules
COPY ./ ./
RUN npm run build
CMD ["npm", "run", "start", "--", "--port", "${PORT}"]
FROM gcr.io/distroless/nodejs20-debian11:latest AS runner
WORKDIR /usr/src/application
ENV NODE_ENV=production
ENV HOSTNAME=0.0.0.0
ENV NEXT_TELEMETRY_DISABLED=1
COPY --from=builder-dependencies /usr/src/application/node_modules ./node_modules
COPY --from=builder /usr/src/application/.next/standalone ./
COPY --from=builder /usr/src/application/.next/static ./.next/static
COPY --from=builder /usr/src/application/public ./public
COPY --from=builder /usr/src/application/i18n/translations ./i18n/translations
COPY --from=builder /usr/src/application/next.config.js ./next.config.js
CMD ["./server.js"]

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) Divlo
Copyright (c) Théo LUDWIG
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,49 +1,45 @@
<h1 align="center"><a href="https://divlo.fr/">Divlo</a></h1>
<h1 align="center"><a href="https://theoludwig.fr/">Théo LUDWIG</a></h1>
<p align="center">
<strong>Developer Full Stack Junior • Passionate about High-Tech</strong>
<strong>Developer Full Stack • Open-Source enthusiast</strong>
</p>
<p align="center">
<a href="https://github.com/Divlo/Divlo/actions?query=workflow%3A%22Divlo%22"><img src="https://github.com/Divlo/Divlo/actions/workflows/Divlo.yml/badge.svg?branch=master" alt="Divlo's CI" /></a>
<a href="https://github.com/Divlo"><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/Divlo"><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/~divlo"><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/Divlo_FR"><img alt="Twitter" src="https://img.shields.io/badge/-Twitter-1ca0f1?style=flat&labelColor=1ca0f1&logo=twitter&logoColor=white"/></a>
<a href="https://www.youtube.com/channel/UCfEKQzI3c8vmZOrsTOi5spA"><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/divlo"><img alt="Twitch" src="https://img.shields.io/badge/-Twitch-9147FF?style=flat&labelColor=9147FF&logo=twitch&logoColor=white"/></a>
<a href="https://www.divlo.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@divlo.fr"><img alt="Email" src="https://img.shields.io/badge/-contact@divlo.fr-2F7EBE?style=flat&labelColor=2F7EBE&logo=minutemailer&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://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=twitter&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://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>
</p>
<hr />
## 📜 About
```typescript
export interface Divlo {
pronouns: 'He' | 'Him'
birthDate: '31/03/2003'
nationality: 'Alsace, France'
interests: [
'Developer Full Stack Junior',
'Passionate about High-Tech',
'Open-Source enthusiast'
]
skills: {
languages: ['JavaScript', 'TypeScript', 'Python', 'Dart']
frontEnd: ['HTML', 'CSS', 'SASS', 'React.js (+ Next.js)', 'Flutter']
backEnd: ['Node.js', 'Strapi', 'MySQL']
tools: ['Ubuntu', 'Hyper Terminal', 'VSCode', 'Git', 'Docker']
```json
{
"name": "Théo LUDWIG",
"pronouns": "He/Him",
"birthDate": "31/03/2003",
"nationality": "Alsace, France",
"interests": ["Developer Full Stack", "Open-Source enthusiast"],
"skills": {
"programmingLanguages": ["JavaScript/TypeScript", "Python", "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"]
}
}
```
<hr />
## 📈 Stats
## 📈 Statistics
<p align=center>
<img height=175 align="center" src="https://github-readme-stats.vercel.app/api?username=Divlo&show_icons=true&theme=dark" />
<img height=175 align="center" src="https://github-readme-stats.vercel.app/api/top-langs/?username=Divlo&hide=html,css&langs_count=8&layout=compact&theme=dark" />
<img height=175 align="center" src="https://github-readme-stats.vercel.app/api?username=theoludwig&show_icons=true&theme=dark" />
<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" />
</p>

View File

@ -1,10 +0,0 @@
import { render } from '@testing-library/react'
import Error404 from 'pages/404'
describe('GET /404', () => {
it('should render', async () => {
const { getByText } = render(<Error404 />)
expect(getByText('404')).toBeInTheDocument()
})
})

View File

@ -1,10 +0,0 @@
import { render } from '@testing-library/react'
import Error500 from 'pages/500'
describe('GET /500', () => {
it('should render', async () => {
const { getByText } = render(<Error500 />)
expect(getByText('500')).toBeInTheDocument()
})
})

View File

@ -0,0 +1,11 @@
import { Loader } from '@/components/design/Loader'
const Loading = (): JSX.Element => {
return (
<main className='flex flex-col flex-1 items-center justify-center'>
<Loader />
</main>
)
}
export default Loading

44
app/blog/[slug]/page.tsx Normal file
View File

@ -0,0 +1,44 @@
import type { Metadata } from 'next'
import { notFound } from 'next/navigation'
import 'katex/dist/katex.min.css'
import { getBlogPostBySlug } from '@/blog/blog'
import { BlogPost } from '@/blog/BlogPost'
interface BlogPostPageProps {
params: {
slug: string
}
}
export const generateMetadata = async (
props: BlogPostPageProps
): Promise<Metadata> => {
const blogPost = await getBlogPostBySlug(props.params.slug)
if (blogPost == null) {
return notFound()
}
const title = `${blogPost.frontmatter.title} | Théo LUDWIG`
const description = blogPost.frontmatter.description
return {
title,
description,
openGraph: {
title,
description
},
twitter: {
title,
description
}
}
}
const BlogPostPage = async (props: BlogPostPageProps): Promise<JSX.Element> => {
const { params } = props
return <BlogPost slug={params.slug} />
}
export default BlogPostPage

11
app/blog/loading.tsx Normal file
View File

@ -0,0 +1,11 @@
import { Loader } from '@/components/design/Loader'
const Loading = (): JSX.Element => {
return (
<main className='flex flex-col flex-1 items-center justify-center'>
<Loader />
</main>
)
}
export default Loading

40
app/blog/page.tsx Normal file
View File

@ -0,0 +1,40 @@
import { Suspense } from 'react'
import type { Metadata } from 'next'
import { BlogPosts } from '@/blog/BlogPosts'
import { Loader } from '@/components/design/Loader'
const title = 'Blog | Théo LUDWIG'
const description =
'The latest news about my journey of learning computer science.'
export const metadata: Metadata = {
title,
description,
openGraph: {
title,
description
},
twitter: {
title,
description
}
}
const BlogPage = async (): Promise<JSX.Element> => {
return (
<main className='flex flex-1 flex-col flex-wrap items-center'>
<div className='mt-10 flex flex-col items-center'>
<h1 className='text-4xl font-semibold'>Blog</h1>
<p className='mt-6 text-center' data-cy='blog-post-date'>
{description}
</p>
</div>
<Suspense fallback={<Loader className='mt-8' />}>
<BlogPosts />
</Suspense>
</main>
)
}
export default BlogPage

32
app/error.tsx Normal file
View File

@ -0,0 +1,32 @@
'use client'
import { useEffect } from 'react'
export interface ErrorHandlingProps {
error: Error
}
const ErrorHandling = (props: ErrorHandlingProps): JSX.Element => {
const { error } = props
useEffect(() => {
console.error(error)
}, [error])
return (
<main className='flex flex-col flex-1 items-center justify-center'>
<h1 className='my-6 text-4xl font-semibold'>
Error{' '}
<span
className='text-yellow dark:text-yellow-dark'
data-cy='status-code'
>
500
</span>
</h1>
<p className='text-center text-lg'>Server error</p>
</main>
)
}
export default ErrorHandling

69
app/globals.css Normal file
View File

@ -0,0 +1,69 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
.break-wrap-words {
word-wrap: break-word;
word-break: break-word;
}
.prose {
@apply !max-w-5xl scroll-smooth text-gray dark:text-gray-300;
}
.prose p {
@apply text-justify;
}
.prose [id]::before {
content: '';
display: block;
height: 90px;
margin-top: -90px;
visibility: hidden;
}
.prose a,
.prose strong {
@apply text-yellow dark:text-yellow-dark;
}
.prose h2,
.prose h3,
.prose h4,
.prose h5,
.prose h6 {
@apply mt-1 text-gray dark:text-gray-dark;
}
.prose code {
color: #ce9178;
}
.prose :where(code):not(:where([class~='not-prose'] *))::before,
.prose :where(code):not(:where([class~='not-prose'] *))::after {
content: '';
}
.shiki {
white-space: pre-wrap !important;
}
code {
counter-reset: step;
counter-increment: step 0;
}
code .line::before {
content: counter(step);
counter-increment: step;
width: 1rem;
margin-right: 1.5rem;
display: inline-block;
text-align: right;
color: rgba(133, 133, 133, 0.8);
word-wrap: normal;
word-break: normal;
}
.katex .base {
display: inline !important;
white-space: normal !important;
width: 100% !important;
}

80
app/layout.tsx Normal file
View File

@ -0,0 +1,80 @@
import type { Metadata } from 'next'
import classNames from 'clsx'
import '@fontsource/montserrat/400.css'
import '@fontsource/montserrat/600.css'
import './globals.css'
import { Header } from '@/components/Header'
import { Footer } from '@/components/Footer'
import { getI18n } from '@/i18n/i18n.server'
import { getTheme } from '@/theme/theme.server'
const title = 'Théo LUDWIG'
const description =
'Théo LUDWIG - Developer Full Stack • Open-Source enthusiast'
const image = '/images/icon-96x96.png'
const url = new URL('https://theoludwig.fr')
const locale = 'fr-FR, en-US'
export const metadata: Metadata = {
title,
description,
metadataBase: url,
openGraph: {
title,
description,
url,
siteName: title,
images: [
{
url: image,
width: 96,
height: 96
}
],
locale,
type: 'website'
},
icons: {
icon: '/images/icon-96x96.png'
},
twitter: {
card: 'summary',
title,
description,
images: [image]
}
}
interface RootLayoutProps {
children: React.ReactNode
}
const RootLayout = (props: RootLayoutProps): JSX.Element => {
const { children } = props
const i18n = getI18n()
const theme = getTheme()
return (
<html
lang={i18n.locale}
className={classNames({
dark: theme === 'dark',
light: theme === 'light'
})}
style={{
colorScheme: theme
}}
>
<body className='bg-white font-headline text-black dark:bg-black dark:text-white flex flex-col min-h-screen'>
<Header />
{children}
<Footer />
</body>
</html>
)
}
export default RootLayout

11
app/loading.tsx Normal file
View File

@ -0,0 +1,11 @@
import { Loader } from '@/components/design/Loader'
const Loading = (): JSX.Element => {
return (
<main className='flex flex-col flex-1 items-center justify-center'>
<Loader />
</main>
)
}
export default Loading

32
app/not-found.tsx Normal file
View File

@ -0,0 +1,32 @@
import Link from 'next/link'
import { getI18n } from '@/i18n/i18n.server'
const NotFound = (): JSX.Element => {
const i18n = getI18n()
return (
<main className='flex flex-col flex-1 items-center justify-center'>
<h1 className='my-6 text-4xl font-semibold'>
{i18n.translate('errors.error')}{' '}
<span
className='text-yellow dark:text-yellow-dark'
data-cy='status-code'
>
404
</span>
</h1>
<p className='text-center text-lg'>
{i18n.translate('errors.not-found')}{' '}
<Link
href='/'
className='text-yellow hover:underline dark:text-yellow-dark'
>
{i18n.translate('errors.return-to-home-page')}
</Link>
</p>
</main>
)
}
export default NotFound

59
app/page.tsx Normal file
View File

@ -0,0 +1,59 @@
import { RevealFade } from '@/components/design/RevealFade'
import { Section } from '@/components/design/Section'
import { Interests } from '@/components/Interests'
import { Portfolio } from '@/components/Portfolio'
import { Profile } from '@/components/Profile'
import { SocialMediaList } from '@/components/Profile/SocialMediaList'
import { Skills } from '@/components/Skills'
import { OpenSource } from '@/components/OpenSource'
import { getI18n } from '@/i18n/i18n.server'
const HomePage = (): JSX.Element => {
const i18n = getI18n()
return (
<main className='flex flex-col md:mx-auto md:max-w-4xl lg:max-w-7xl'>
<Section isMain id='about'>
<Profile />
<SocialMediaList />
</Section>
<RevealFade>
<Section
id='interests'
heading={i18n.translate('home.interests.title')}
>
<Interests />
</Section>
</RevealFade>
<RevealFade>
<Section
id='skills'
heading={i18n.translate('home.skills.title')}
withoutShadowContainer
>
<Skills />
</Section>
</RevealFade>
<RevealFade>
<Section
id='portfolio'
heading={i18n.translate('home.portfolio.title')}
withoutShadowContainer
>
<Portfolio />
</Section>
</RevealFade>
<RevealFade>
<Section id='open-source' heading='Open source' withoutShadowContainer>
<OpenSource />
</Section>
</RevealFade>
</main>
)
}
export default HomePage

35
blog/BlogPost.tsx Normal file
View File

@ -0,0 +1,35 @@
import { notFound } from 'next/navigation'
import date from 'date-and-time'
import 'katex/dist/katex.min.css'
import { getBlogPostBySlug } from '@/blog/blog'
import { BlogPostContent } from '@/blog/BlogPostContent'
export interface BlogPostProps {
slug: string
}
export const BlogPost = async (props: BlogPostProps): Promise<JSX.Element> => {
const { slug } = props
const blogPost = await getBlogPostBySlug(slug)
if (blogPost == null) {
return notFound()
}
return (
<main className='break-wrap-words flex flex-1 flex-col flex-wrap items-center justify-center'>
<div className='my-10 flex flex-col items-center text-center'>
<h1 className='text-3xl font-semibold'>{blogPost.frontmatter.title}</h1>
<p className='mt-2' data-cy='blog-post-date'>
{date.format(
new Date(blogPost.frontmatter.publishedOn),
'DD/MM/YYYY'
)}
</p>
</div>
<BlogPostContent content={blogPost.content} />
</main>
)
}

33
blog/BlogPostComments.tsx Normal file
View File

@ -0,0 +1,33 @@
'use client'
import Giscus from '@giscus/react'
import { useTheme } from '@/theme/theme.client'
import type { CookiesStore } from '@/utils/constants'
interface BlogPostCommentsProps {
cookiesStore: CookiesStore
}
export const BlogPostComments = (props: BlogPostCommentsProps): JSX.Element => {
const { cookiesStore } = props
const theme = useTheme(cookiesStore)
return (
<Giscus
id='comments'
repo='theoludwig/theoludwig'
repoId='MDEwOlJlcG9zaXRvcnkzNTg5NDg1NDQ='
category='General'
categoryId='DIC_kwDOFWUewM4CQ_WK'
mapping='pathname'
reactionsEnabled='1'
emitMetadata='0'
inputPosition='top'
theme={theme}
lang='en'
loading='lazy'
/>
)
}

111
blog/BlogPostContent.tsx Normal file
View File

@ -0,0 +1,111 @@
import Image from 'next/image'
import Link from 'next/link'
import { cookies } from 'next/headers'
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { faLink } from '@fortawesome/free-solid-svg-icons'
import { MDXRemote } from 'next-mdx-remote/rsc'
import { nodeTypes } from '@mdx-js/mdx'
import rehypeRaw from 'rehype-raw'
import remarkGfm from 'remark-gfm'
import rehypeSlug from 'rehype-slug'
import remarkMath from 'remark-math'
import rehypeKatex from 'rehype-katex'
import { getHighlighter } from 'shiki'
import 'katex/dist/katex.min.css'
import { getTheme } from '@/theme/theme.server'
import { remarkSyntaxHighlightingPlugin } from '@/blog/remarkSyntaxHighlightingPlugin'
import { BlogPostComments } from '@/blog/BlogPostComments'
const Heading = (
props: React.DetailedHTMLProps<
React.HTMLAttributes<HTMLHeadingElement>,
HTMLHeadingElement
>
): JSX.Element => {
const { children, id = '' } = props
return (
<h2 {...props} className='group'>
<Link
href={`#${id}`}
className='invisible !text-black group-hover:visible dark:!text-white'
>
<FontAwesomeIcon className='mr-2 inline h-4 w-4' icon={faLink} />
</Link>
{children}
</h2>
)
}
export interface BlogPostContentProps {
content: string
}
export const BlogPostContent = async (
props: BlogPostContentProps
): Promise<JSX.Element> => {
const { content } = props
const cookiesStore = cookies()
const theme = getTheme()
const highlighter = await getHighlighter({
theme: `${theme}-plus`
})
return (
<div className='prose mb-10'>
<div className='px-8'>
<MDXRemote
source={content}
options={{
mdxOptions: {
remarkPlugins: [
remarkGfm,
[remarkSyntaxHighlightingPlugin, { highlighter }],
remarkMath
],
rehypePlugins: [
rehypeSlug,
[rehypeRaw, { passThrough: nodeTypes }],
rehypeKatex
]
}
}}
components={{
h1: Heading,
h2: Heading,
h3: Heading,
h4: Heading,
h5: Heading,
h6: Heading,
img: (properties) => {
const { src = '', alt = 'Blog Image' } = properties
const source = src.replace('../../public/', '/')
return (
<span className='flex flex-col items-center justify-center'>
<Image
src={source}
alt={alt}
width={1000}
height={1000}
className='h-auto w-auto'
/>
</span>
)
},
a: (props) => {
const { href = '' } = props
if (href.startsWith('#')) {
return <a {...props} />
}
return <a target='_blank' rel='noopener noreferrer' {...props} />
}
}}
/>
<BlogPostComments cookiesStore={cookiesStore.toString()} />
</div>
</div>
)
}

42
blog/BlogPosts.tsx Normal file
View File

@ -0,0 +1,42 @@
import Link from 'next/link'
import date from 'date-and-time'
import { ShadowContainer } from '@/components/design/ShadowContainer'
import { getBlogPosts } from '@/blog/blog'
export const BlogPosts = async (): Promise<JSX.Element> => {
const posts = await getBlogPosts()
return (
<div className='flex w-full items-center justify-center p-8'>
<div className='w-[1600px]' data-cy='blog-posts'>
{posts.map((post, index) => {
const postPublishedOn = date.format(
new Date(post.frontmatter.publishedOn),
'DD/MM/YYYY'
)
return (
<Link
href={`/blog/${post.slug}`}
key={index}
locale='en'
data-cy={post.slug}
>
<ShadowContainer className='cursor-pointer p-6 transition duration-200 ease-in-out hover:-translate-y-2'>
<h2 data-cy='blog-post-title' className='text-xl font-semibold'>
{post.frontmatter.title}
</h2>
<p data-cy='blog-post-date' className='mt-2'>
{postPublishedOn}
</p>
<p data-cy='blog-post-description' className='mt-3'>
{post.frontmatter.description}
</p>
</ShadowContainer>
</Link>
)
})}
</div>
</div>
)
}

65
blog/blog.ts Normal file
View File

@ -0,0 +1,65 @@
import fs from 'node:fs'
import path from 'node:path'
import { cache } from 'react'
import matter from 'gray-matter'
export const BLOG_POSTS_PATH = path.join(process.cwd(), 'blog', 'posts')
export interface FrontMatter {
title: string
description: string
isPublished: boolean
publishedOn: string
}
export interface BlogPost {
frontmatter: FrontMatter
slug: string
content: string
}
export const getBlogPosts = cache(async (): Promise<BlogPost[]> => {
const blogPosts = await fs.promises.readdir(BLOG_POSTS_PATH)
const blogPostsWithTime = await Promise.all(
blogPosts.map(async (blogPostFilename) => {
const [slug, extension] = blogPostFilename.split('.')
if (slug == null || extension == null) {
throw new Error('Invalid blog post filename.')
}
const blogPostPath = path.join(BLOG_POSTS_PATH, `${slug}.${extension}`)
const blogPostContent = await fs.promises.readFile(blogPostPath, {
encoding: 'utf8'
})
const { data, content } = matter(blogPostContent) as unknown as {
data: FrontMatter
content: string
}
const date = new Date(data.publishedOn)
return {
slug,
content,
frontmatter: data,
time: date.getTime()
}
})
)
const blogPostsSortedByPublicationDate = blogPostsWithTime
.filter((post) => {
return post.frontmatter.isPublished
})
.sort((a, b) => {
return b.time - a.time
})
return blogPostsSortedByPublicationDate
})
export const getBlogPostBySlug = cache(
async (slug: string): Promise<BlogPost | undefined> => {
const blogPosts = await getBlogPosts()
const blogPost = blogPosts.find((blogPost) => {
return blogPost.slug === slug && blogPost.frontmatter.isPublished
})
return blogPost
}
)

259
blog/posts/clean-code.md Normal file
View File

@ -0,0 +1,259 @@
---
title: '🧼 Clean Code'
description: 'What is "Clean Code", what are "Design Patterns", and why is it so important today? Tips and tricks to make your code more readable and maintainable in the long term.'
isPublished: true
publishedOn: '2022-02-23T08:00:18.758Z'
---
Hello! 👋
Have you already heard of "**Clean Code**" or "**Design Patterns**"?
Even if you know what it is about, this blog post will probably still be useful to you, I will share some tips and tricks to make your code more readable and maintainable in the long term.
**Note:** Sources used to write this blog post are available at the [end of this post](#sources).
## Definition: Clean Code
A clean code is a code that is **easy** to **read** and easy to **understand**.
But I promise it is not a code that is easy to write, in fact it is really **hard to write Clean Code**.
We could ask ourselves, what is **easy** to **read** and easy to **understand** ?
It depends of many factors, and is somewhat relative to each one of us. The **perfect** Clean code **doesn't exist**, but we can try to be **as perfect as possible**.
## Why is it so important?
Code like that works great, but it is not enough, even if the code will be read by the computer and understood by the machine, we should not forget that the code is **written by human** and will be also **read by human** not only a machine.
For example the [Linux kernel](https://www.kernel.org/), is one of the biggest open source project with many contributors worldwide. Last data shows that it is about **20 millions** lines of code.
With a project of this magnitude, we can't let everyone do what they want and however they want, **we must set rules and conventions** to get everyone to agree, this allows to add features faster and will reduce possible bugs as **developers** will not struggle as much to understand the code.
## Definition: Design Patterns
These **rules** and **conventions** are so called **Design Patterns**.
A software design pattern is a general way of **solving a problem** by applying a **well-known solution**.
Design patterns are formalized **best practices** that the programmer can use to solve common problems when designing an application or system.
## How to write Clean Code and famous Design Patterns
To show you the rules and conventions, I will write the examples in the [TypeScript](https://www.typescriptlang.org/) programming language but it is relevant to any programming language.
### Naming variables
We all know that **variables** are used everywhere in **programming**, good variable names allow us to better understand the intention of the code.
#### Same vocabulary for the same type of variable
##### Example (bad way)
```typescript
function getUserInfo(): User
function getUserDetails(): User
function getUserData(): User
```
##### Example (good way)
```typescript
function getUser(): User
```
---
#### Avoid "Magic Numbers"
##### Example (bad way)
```typescript
// What does 86400000 mean?
setTimeout(restart, 86400000)
```
##### Example (good way)
```typescript
const MILLISECONDS_IN_ONE_DAY = 24 * 60 * 60 * 1000
setTimeout(restart, MILLISECONDS_IN_ONE_DAY)
```
---
#### Explicit is better than implicit (no abbreviations or acronyms)
##### Example (bad way)
```typescript
const u = getUser()
const s = getSubscription()
const t = charge(u, s)
```
##### Example (good way)
```typescript
const user = getUser()
const subscription = getSubscription()
const transaction = charge(user, subscription)
```
---
#### As short as possible, as long as necessary
##### Example (bad way)
```typescript
interface Car {
carModel: string
carColor: 'red' | 'blue' | 'yellow'
}
const printCar = (car: Car): void => {
console.log(`${car.carModel} (${car.carColor})`)
}
```
##### Example (good way)
```typescript
interface Car {
model: string
color: 'red' | 'blue' | 'yellow'
}
const printCar = (car: Car): void => {
console.log(`${car.model} (${car.color})`)
}
```
---
#### Boolean names
The name of a boolean variable should be a question, and the answer should be true or false. We can use prefixes like `is`, `has`, `can` to make it more explicit and we should avoid negation.
##### Example (bad way)
```typescript
let person = true
let age = true
let dance = true
function isEmailNotUsed(email: string): boolean
```
##### Example (good way)
```typescript
let isPerson = true
let hasAge = true
let canDance = true
function isEmailUsed(email: string): boolean
```
---
### DRY (Don't Repeat Yourself)
When we copy/paste the same lines of code, we should better abstract it in a function, that we can reuse later without having to copy/paste the lines of code, that makes the code more maintainable afterwards, because if we need to change the behavior of this piece of code, we won't need to change it in several places, but only when declaring the function.
---
### KISS (Keep It Simple Stupid)
As we have just said, we will prefer to abstract the code in multiple functions, rather than leaving everything in the same place, but a function should not do "too much", and we should rather separate it into several distinct functions.
We have to keep it as simple as possible, not to implement features that are not requested, and to divide the functions as much as possible into small functions.
### Example (bad way)
```typescript
import fs from 'node:fs'
import path from 'node:path'
const createFile = async (
name: string,
isTemporary: boolean = false
): Promise<void> => {
if (isTemporary) {
return await fs.promises.writeFile(path.join('temporary', name), '')
}
return await fs.promises.writeFile(name, '')
}
```
`createFile` is a function that does 2 things so it is better to split it in 2 separated functions.
### Example (good way)
```typescript
import fs from 'node:fs'
import path from 'node:path'
const createFile = async (name: string): Promise<void> => {
await fs.promises.writeFile(name, '')
}
const createTemporaryFile = async (name: string): Promise<void> => {
await createFile(path.join('temporary', name))
}
```
---
### TDD (Test Driven Development)
Test-driven development (TDD) is a software development process relying on software requirements being converted to test cases before software is fully developed, and tracking all software development by repeatedly testing the software against all test cases. This is as opposed to software being developed first and test cases created later.
We first write tests that should fails because there are no implementation, and then we write the code implementation to make the tests succeeds.
The End To End (e2e) and Unit tests should document what is the behavior intended for the code.
---
### Avoid comments
One of the most important rule of "Clean Code": If you need to add **comments**, it's because your code is **not clean**.
I know that might be counter intuitive at first, as most developers will advice you to add comments to your code, to document what it does.
The thing is that you should choose good variable names, break down features in multiple functions, so that others developers can read your code and understand it just by reading the functions names etc.
You can write comments, but that should only be used documenting how to use a function but not for the implementation itself and in places where you can't be more explicit.
In fact, as we saw in the [TDD section](#tdd-test-driven-development), automated tests can document what a function should returns, and how the code should behave, so that should already improve code maintainability.
Having a good comment explaining a difficult code is better than nothing with a bad written code, difficult to understand.
#### Example (bad way)
```typescript
// Check if subscription is active
if (subscription.endDate > Date.now()) {
}
```
#### Example (good way)
```typescript
const isSubscriptionActive = subscription.endDate > Date.now()
if (isSubscriptionActive) {
}
```
Here we are creating a new variable `isSubscriptionActive` that allows us to avoid the need of a comment to understand what the code does.
---
## Conclusion
We can't write the perfect clean code understandable by everyone but we can **write code that is as perfect as possible to ease maintaibility** for yourself and others developers.
## Sources
- [Clean Code: A Handbook of Agile Software Craftsmanship by Robert C. Martin](https://books.google.fr/books/about/Clean_Code.html?id=hjEFCAAAQBAJ)
- [Software Design Pattern (Wikipedia)](https://en.wikipedia.org/wiki/Software_design_pattern)
- [TDD - Test-driven development (Wikipedia)](https://en.wikipedia.org/wiki/Test-driven_development)
- [github.com/labs42io/clean-code-typescript](https://github.com/labs42io/clean-code-typescript)

View File

@ -0,0 +1,255 @@
---
title: '🗓️ Git version control: Ultimate Guide'
description: 'What is `git`, what are the most used commands, best practices, and tips and tricks. The Ultimate guide to master `git` in your daily workflow.'
isPublished: true
publishedOn: '2022-10-27T14:33:07.465Z'
---
Hello! 👋
Welcome to the Ultimate Guide to master `git` in your daily workflow, we will see what are the most used commands, what are the best practices, and tips and tricks.
This guide is a summary of the most important things to know when working with `git`, and in general, will link to the official documentation of `git` or other resources for more details, it is on purpose to not go in depth in each topic, it allows to summarize `git` and vocabulary about it (you can use it as a `git` cheatsheet).
**Note:** Sources used to write this blog post are available at the [end of this post](#sources).
## Introduction
**Git** is a free and open-source distributed **version control system** for keeping track of changes across a set of files.
Git was originally authored by [Linus Torvalds](https://en.wikipedia.org/wiki/Linus_Torvalds) in 2005 for the development of the [Linux kernel](https://kernel.org/).
Git allows:
- to work with several people on the same codebase.
- track changes to know who did what and when.
- revert changes.
Git is **decentralized**, which means that every developer has a full copy of the repository and the complete history of the project.
## Get started with `git` and `.gitconfig` config file
The first thing you should do when you install Git is to set your user name and email address.
```sh
git config --global user.name "Username"
git config --global user.email "email@example.com"
```
These configurations are stored in the `.gitconfig` file in your home directory (e.g: `~/.gitconfig`) with this format:
```sh
[user]
name = Username
email = email@example.com
```
You can find more information and useful `git` configurations in the [official documentation](https://git-scm.com/docs/git-config).
## How `git` works?
Each `git` project is called a **repository** (or **repo** for short) and it contains all the files and folders for a project, as well as each file's revision history (**commits**) stored in the `.git` folder.
The history of a repository is represented by a graph.
Each node is called commit and contains:
- an instantaneous view (snapshot) of the state of the repository at a specific moment
- metadata: message, author, creation date, etc.
Commits are **snapshots** (not diffs on each file) of the project at specific moments in time.
There are several areas where the files in your project will live in Git:
- **Working directory**: the files that you see in your computer's file system.
- **Staging area**: the files that will go into your next commit (files added with `git add <filename>` command).
- **Local repository**: the `.git` directory, which contains all of your project's commits, branches, etc. (files added with `git commit -m "message"` command).
- **Remote repository**: the `.git` directory in a remote server (files added with `git push` command).
## Commands cheatsheet
You can find the official documentation of `git` commands at [git-scm.com/docs](https://git-scm.com/docs).
```sh
# Initialize a new git repository
git init
# Clone a repository
git clone <url>
# Add all the files to staging area
git add .
# Add specific file to staging area
git add <file>
# Commit changes
git commit -m "chore: initial commit"
# Add remote repository
git remote add <remote> <url>
# The main <remote> is often called `origin`
# Add forked repository
git remote add <remote> <url>
# The forked <remote> is often called `upstream`
# List all the remotes
git remote
# Sync forked repository
git fetch <remote>
git merge <remote>/<branch>
# Push changes to remote repository
git push <remote>
# Pull changes from remote repository
git pull <remote>
# Show the status of the working tree
git status
# Show the commit history
git log
# Create a new branch
git checkout -b <branch>
# Switch to a branch (or tag or commit)
git checkout <branch>
# Merge a branch into the current branch
git merge <branch>
# Note: Merge creates a "Merge commit" when the base branch and the branch to merge have diverged (they have different commits).
# To avoid creating a "Merge commit", we can use rebase instead of merge.
git rebase --interactive <branch-to-rebase-on>
# Combine multiple commits of a branch into one for a merge
git merge --squash <branch>
# Change several past commits (interactive rebase)
# HEAD points to the current consulted commit.
git rebase --interactive HEAD~<number-of-commits>
# Delete a branch
git branch --delete <branch>
git push <remote> --delete <branch>
# Fetch branches from remote repository and prune
git fetch --prune
# Revert a commit
git revert <commit>
# Reset the current branch, delete all commits since <branch> (without removing the changes)
git reset --soft <branch>
# Apply the changes introduced by some existing commits
# (by first being on the branch where you want to apply the commit)
git cherry-pick <commit>
# To list all commits that differ between two branches
git log <branch1>..<branch2> # commits in branch2 that are not in branch1 (branch2 ahead of branch1, branch2 behind branch1)
git log <branch2>..<branch1> # commits in branch1 that are not in branch2 (branch1 ahead of branch2, branch1 behind branch2)
# Summary of commit authors across all branches, excluding merge commits.
git shortlog --summary --numbered --all --no-merges
```
## `.gitignore` file
The `.gitignore` file is a text file that tells `git` which files (or patterns) it should ignore.
The `.gitignore` file is usually placed in the root directory of the repository.
We usually ignore files that are generated by the build process or files that contain sensitive information.
Example of `.gitignore` file:
```sh
.env
build
*.exe
```
## `.gitkeep` file
The `.gitkeep` file is a file that is used to keep an empty directory in a Git repository.
This is useful when you want to keep an empty directory in your repository but you don't want to commit any file inside it.
## Git remote repositories (GitHub/GitLab)
Once you are ready to share your code over the internet, you will need to create a remote repository on a service like [GitHub](https://github.com) or [GitLab](https://gitlab.com).
There are many other services, you can also self-host your own Git server.
### SSH vs HTTPS authentication
Once you have created a remote repository, you will need to authenticate to push and pull changes.
There are two main ways to authenticate:
- **SSH**: you will need to generate an SSH key pair and add the public key to your remote repository.
- **HTTPS**: you will need to provide your username and password each time you push or pull changes.
SSH authentication is the recommended way to authenticate to a remote repository.
You can find more information about SSH authentication in the [official documentation](https://git-scm.com/book/en/v2/Git-on-the-Server-Generating-Your-SSH-Public-Key).
### Sign `git` commits with `gpg`
As we have seen in the [Get started with `git` and `.gitconfig` config file](#get-started-with-git-and-gitconfig-config-file) section, we can configure `git` with a name and email address with a value of our choice.
That means that **anyone can create a commit with any name and email address and claim to be whoever they want** when they create a commit.
To avoid this, you can sign your commits with a [GNU Privacy Guard](https://gnupg.org/) (<abbr>gpg</abbr>) key.
You can find more information about signing commits in the [official documentation](https://git-scm.com/book/en/v2/Git-Tools-Signing-Your-Work).
### Continous Integration/Continuous Delivery (CI/CD)
Once you have your code in a remote repository, everyone (with access) can potentially start contributing to the project. This is great, but it also means that you need to have a way to ensure that your code is working as expected for each change in the project.
You could do it manually, depending on the size and the complexity of the project, but it could be a tedious task.
Instead, you can use a **Continuous Integration** (CI) service to automate the process of testing your code, running linting, unit tests, e2e tests, etc.
There are many CI services, but the most popular ones are [GitHub Actions](https://github.com/features/actions), [GitLab CI](https://docs.gitlab.com/ee/ci/), [CircleCI](https://circleci.com/), [Travis CI](https://travis-ci.org/), and many others...
Then, once your code is ready, tested and working as expected, you can use a **Continuous Delivery** (CD) service to automate the process of **deploying your code**.
CI/CD services are usually integrated with remote repositories, so you can configure them to run automatically when you push changes to the remote repository.
## Best practices and `git` workflows
Commit messages are very important, they are a way to easily know what has changed in the project.
There are many conventions for commit messages, but the most popular one is the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.
Then, we can use the commit messages to automatically determine a [semantic version](https://semver.org/) for the next release of the project.
When multiple developers are working on the same project, it is important to organize the work in a way that everyone can work on different features without conflicts (changes in the same files).
There are many ways to organize the work, but the most popular ones are:
- [GitFlow](https://nvie.com/posts/a-successful-git-branching-model/)
- [GitHub Flow](https://guides.github.com/introduction/flow/)
- [Trunk-based development](https://trunkbaseddevelopment.com/)
They are called **Git workflows**, or **Git branching strategies**.
## Conclusion
`git` is the tool that every programmer should know to do collaborative work (not only, `git` is also very powerful even when working alone) and keep track of changes across a set of files.
## Sources
- [Git official website and documentation](https://git-scm.com/)
- [Git Explained in 100 Seconds](https://www.youtube.com/watch?v=hwP7WQkmECE)
- [Understand Git in 7 minutes](https://www.jesuisundev.com/en/understand-git-in-7-minutes/)
- [How (and why) to sign Git commits | With Blue Ink](https://withblue.ink/2020/05/17/how-and-why-to-sign-git-commits.html?utm_source=tiktok&utm_campaign=codetok-sign)
- [What Are the Best Git Branching Strategies](https://www.flagship.io/git-branching-strategies/)

64
blog/posts/hello-world.md Normal file
View File

@ -0,0 +1,64 @@
---
title: '👋 Hello, world!'
description: 'First post of the blog, introduction and explanation of how this blog is made.'
isPublished: true
publishedOn: '2022-02-20T08:00:18.758Z'
---
Hello, world! 👋
## Introduction
This blog is here to document my journey of learning computer science, explaining technical difficulties and problems I encountered, and how I solved them.
The idea is that I will share my knowledge with you (readers), and hopefully help you to learn too.
Keep in mind that I will not translate the posts in French, all the posts will be written in English, as I'm not a native English speaker, I will probably make mistakes, feel free to open pull requests on [GitHub](https://github.com/theoludwig/theoludwig) to correct them. 😊
I plan to publish new posts when I have something new to share. There's no schedule, so stay tuned!
To stay informed of new blog post and to ask questions, feel free to follow me on Twitter: [@theoludwig\_](https://twitter.com/theoludwig_).
## Project based learning
The blog posts subjects will be often related to the problems I encountered in the projects I am currently working on.
Most of the time, when I am learning something new, I **learn it because I actually need it for a project**, I don't learn [React.js](https://reactjs.org) because it is trending, and everyone talks about it.
I learn something new, because it solved a "real life" problem I had encountered. For example, [React.js](https://reactjs.org) allows to easily update the DOM (Document Object Model) in the browser, so we can add interactivity to our web pages, not only that, it allows to reuse multiple HTML (JSX) elements with components.
[React.js](https://reactjs.org) is only an example, but hopefully you understood my point: I often don't like too much theoretical thing, and enjoy much more practical things.
## How this blog is made
In this section, I will explain what technologies I used to make this blog, and what are the technical choices I had to do.
The code of this website is open source on [GitHub](https://github.com/theoludwig/theoludwig), so you can see the code and contribute to it.
### Technologies
- [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>.
- [MDX](https://mdxjs.com/)
MDX is an extension of Markdown that allows you to use custom React components.
Here's what Markdown looks like:
```md
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.
- [Tailwind CSS](https://tailwindcss.com/)
Tailwind is a CSS framework to rapidly build modern websites without ever leaving HTML.
## Conclusion
I hope you will enjoy my blog, and will find it useful.
See you in the next posts! 😊

View File

@ -0,0 +1,66 @@
---
title: '❌ Mistakes I made as a junior developer'
description: 'Here are mistakes I made when I started, to prevent you from making the same mistakes.'
isPublished: true
publishedOn: '2022-03-14T07:42:52.989Z'
---
Hello! 👋
I will explain some of the mistakes I made as a junior developer, so you can avoid doing them.
## 1. Skipped learning how to do automated tests
Probably one of the most common errors junior developers does.
When you begin in programming, you learn a programming language, so you learn variables, conditions, loops, functions, etc.
With these concepts, you might start a new project, but as the project grows, you will end up using functions at multiple places in code, so if you change the behavior of a function, it will affect the whole project.
And because the code grows, you might do some refactoring to make it more maintainable, but because we are humans, we make mistakes, you could accidentally break the entire project even with a tiny change you thought was safe to do.
If you had automated tests, you would have a way to know if you made a mistake even before deploying to production.
Depending on the programming language you are using, and what is the project you are working on, writing tests will be different.
Be aware that there are 3 main testing strategies:
- [Unit testing](https://en.wikipedia.org/wiki/Unit_testing)
- [Integration testing](https://en.wikipedia.org/wiki/Integration_testing)
- [End-to-end testing](https://en.wikipedia.org/wiki/End-to-end_testing)
After you learned the basics of programming, learn how to write automated tests, it will save you a lot of time and debugging.
I would even say that you should get used-to writing tests, it should be an automatism, you should not even have to think about it to do it.
## 2. Thinking too big, with too much abstraction
Abstraction is great, but it can be harder to understand what is going on if actually don't need this abstraction.
Find the right balance, between abstraction and simple implementation, start simple, and then gradually improve and add more features.
When you start a new project, you should focus on the core of the project, not on the details, to release as soon as possible, a working usable version of your project also called a [**Minimum Viable Product** (MVP)](https://en.wikipedia.org/wiki/Minimum_viable_product), it is better than a half-functioning, over-engineered project.
I made this mistake while developing [Thream](https://thream.theoludwig.fr), your **open source** platform to stay close with your friends and communities, **talk**, chat, **collaborate**, share and **have fun**.
Basically, I thought it was cool, to do a "big" v1.0.0 release with a lot of features, but in fact, it was not, because I could not even show what I was developing (to the end-users, not technical people) as I was making multiple features at the same time and also mainly focused on the **REST API** side and not at all the **website (frontend)**.
What I recommend you to do is to start with a **v1.0.0** release as soon as possible with the minimum required features needed for your project idea, and then gradually add new features and release new versions.
In my example for [Thream](https://thream.theoludwig.fr), I could release a v1.0.0 without these features:
- English/French translation (could be only English)
- Light/Dark theme (could be only Dark)
- OAuth2 Authentication (could be only simple email/password authentication)
- User public profile
- Channels (maybe could be only one channel per guild to start with)
And probably more, what was really required with [Thream](https://thream.theoludwig.fr), is that users could authenticate, create a community of friends, and then they could communicate with each other with messages in real-time, really that was enough.
And then with this basis, I could release, v1.1.0, v1.2.0 etc. with more features, and release new versions more often to show the progress of the project, it is also more motivating to have users testing our project and to **get feedback sooner**.
**Start simple, improve later.**
## Conclusion
The real key to success is to **be passionate**, **keep learning** on your own, and **look at mistakes as learning experiences**.

View File

@ -0,0 +1,343 @@
---
title: '🧠 Programming Challenges'
description: 'What are Programming Challenges and Competitive Programming and an introduction to Time/Space Complexity with Big O Notation.'
isPublished: true
publishedOn: '2023-05-21T10:20:18.837Z'
---
Hello! 👋
As **performance** and **reliability** is more and more important in software development, it is important to know how to write **efficient code**, and also learn to **not rely on every possible dependency of the world**, when it is not worth it.
The more dependencies we add to our projects, the greater the complexity and maintenance overhead becomes. Each additional dependency requires understanding its functionality, <abbr title="Application Programming Interface">API</abbr>, and potential conflicts with other dependencies. This complexity makes the codebase harder to maintain, and it also poses significant security risks.
We don't want to "reinvent the wheel" and rewrite everything from scratch for each project. In fact, you are **always depending on something** when you are writing your software. At the very least, you are dependent on the programming language you are using. Even if you are doing very low-level stuff, you are still depending on something: hardware.
However, it is important to draw a line between what dependencies are worth the cost and which are not.
Most likely adding a [JavaScript npm package `is-odd`](https://www.npmjs.com/package/is-odd) to check if a number is odd or even for example, is not worth it. Writing it ourselves is easier and allows a better maintenance in the long term.
Learning **how to solve problems** and how to write efficient code is very important and also a very broad and complicated topic, so this blog post will only be an **introduction to the subject**, and will not go in depth.
**Note:** Sources used to write this blog post are available at the [end of this post](#sources).
## What is Competitive Programming?
**Competitive programming** consists of solving correctly and efficiently **well-defined problems** by writing **computer programs** under specified **constraints**. Typically a solution to a problem is a combination of well-known techniques and new insights.
There are many famous competitions: [Google Code Jam](https://codingcompetitions.withgoogle.com/codejam), [Facebook Hacker Cup](https://www.facebook.com/codingcompetitions/hacker-cup), [International Olympiad in Informatics](https://ioinformatics.org/), [International Collegiate Programming Contest](https://icpc.global/), [LeetCode](https://leetcode.com/), [CodinGame](https://www.codingame.com/), etc.
The most common programming languages used for Competitive Programming are: **C++**, **Python** and **Java**. However the design of the algorithms and data structures are applicable to **any programming language**.
All examples solutions on this blog post will be done in **Python**.
## Topics to explore/learn with Competitive Programming
- Time/Space complexity and Big O Notation
- Sorting: Sorting algorithms and Binary search
- Data structures: Arrays (1D, 2D: Matrix, 3D, Multidimensional), Dictionaries, Linked lists, Stack, Queue, Trees, Graphs, Heaps, etc.
- Complete search: Generating Subsets, Permutations, Combinations, etc.
- Greedy algorithms: Coin problem, Scheduling, Minimizing sums, etc.
- Dynamic programming: Fibonacci, Coin problem, Knapsack, etc.
- Bit manipulation: Bit representation, Bit operations, etc.
- Shortest path: Dijkstra, Bellman-Ford, Floyd-Warshall, etc.
- String: Trie structure, String hashing, Z-algorithm, etc.
You can see there are lot of concepts to learn and explore, and it is not an exhaustive list. On this blog post, we will only see the first topic: **Time/Space complexity and Big O Notation**.
## Time/Space complexity and Big O Notation
### Definition
An Algorithm is a finite sequence of well-defined instructions, that have to be given to the computer to perform a specific task. In this context, the variation can occur the way how the instructions are defined. There can be **any number of ways**, a specific set of instructions can be defined **to perform the same task**. Also, with options available to choose any one of the available programming languages, the instructions can take any form of syntax along with the performance boundaries of the chosen programming language. We also indicated the algorithm to be performed in a computer, which leads to the next variation, in terms of the operating system, processor, hardware, etc. that are used, which can also influence the way an algorithm can be performed.
Different factors can influence the outcome of an algorithm being executed, it is wise to understand how efficiently such programs are used to perform a task. To gauge this, we require to evaluate:
- The **Space complexity** of an algorithm **quantifies** the amount of **space or memory taken** by an algorithm to run based on the size of the input.
- The **Time complexity** of an algorithm **quantifies** the amount of **time taken** by an algorithm to run based on the size of the input.
We more often talk about the **time complexity** than space complexity of an algorithm, because we can reuse memory unlike time and memory is cheap nowadays.
**Big O Notation** describes the complexity of an algorithm in terms of **how quickly it grows relative to the input size $n$ (e.g: length of the string, size of the array etc.)** by defining the $N$ number of operations that are done on it.
Example of Big O notation: $O(n^2)$.
### Time complexity
Time complexity **measures** the **time taken** **to execute each statement** of code in an algorithm. It is not going to examine the total execution time of an algorithm. Rather, it is going to give information about the variation (increase or decrease) in execution time when the number of operations (increase or decrease) in an algorithm.
There are many rules to calculate the time complexity of an algorithm.
#### Loops
A common reason why an algorithm is slow is that it contains many loops that go through the input. The more nested loops the algorithm contains, the slower it will run.
If there are $k$ nested loops, the time complexity of the algorithm will be $O(n^k)$.
##### Example $O(n)$
```python
for iteration in range(n):
pass
# or with a while loop
iteration = 0
while iteration < n:
pass
```
##### Example $O(n^2)$
```python
for iteration in range(n):
for iteration2 in range(n):
pass
```
##### Example $O(n^3)$
```python
for iteration in range(n):
for iteration2 in range(n):
for iteration3 in range(n):
pass
```
etc.
#### Order of magnitude
A time complexity does not tell us the exact number of times the code inside a loop is executed, but it only shows the **order of magnitude**.
In the following examples, the time complexity of the algorithms is $O(n)$ but the number of operations is different.
##### Example 1
```python
for iteration in range(0, n * 3, 1):
pass
```
Number of operations: $3n$
##### Example 2
```python
for iteration in range(0, n + 5, 1):
pass
```
Number of operations: $n + 5$
##### Example 3
```python
for iteration in range(0, n, 2):
pass
```
Number of operations: ${n \over 2}$
#### Phases
If the algorithms consists of consecutive phases, the total time complexity is the largest time complexity of a single phase because it is usually the bottleneck of the code.
The following code consists of 3 phases, with time complexities $O(n)$, $O(n^2)$ and $O(n)$. Thus the total time complexity is $O(n^2)$.
```python
for iteration in range(n):
pass
for iteration in range(n):
for iteration2 in range(n):
pass
for iteration in range(n):
pass
```
#### Several variables
Sometimes the time complexity depends on several factors. In this case, the time complexity formula contains several variables: $O(nm)$.
```python
for iteration in range(n):
for iteration2 in range(m):
pass
```
#### Recursion
The time complexity of a recursive function depends on the number of times it is called and the time complexity of a single call. The total time complexity is the product of these values.
##### Example 1
The call `recursive(n)` causes $n$ calls and the time complexity of each call is $O(1)$. Thus the total time complexity is $O(n)$.
```python
def recursive(n: int):
if n != 1:
recursive(n - 1)
```
##### Example 2
```python
def recursive(n: int):
if n != 1:
recursive(n - 1)
recursive(n - 1)
```
In this case, `recursive(n)` causes 2 other calls except for $n = 1$.
The following table shows the function calls produced by this single call:
| function call | number of calls |
| ------------- | --------------- |
| $g(n)$ | $1$ |
| $g(n - 1)$ | $2$ |
| $g(n - 2)$ | $4$ |
| ... | ... |
| $g(1)$ | $2^{n - 1}$ |
Based on this, the time complexity is:
$$
1 + 2 + 4 + ... + 2^{n - 1} = 2^n - 1 = O(2^n)
$$
#### Complexity Classes (from fastest to slowest)
![Big O Notation](../../public/images/posts/programming-challenges/big-o-chart-notations.webp)
Here is a list of classes of functions that are commonly encountered when analyzing the running time of an algorithm.
- $O(1)$: **Constant** (does not depend on the input size). A typical constant-time algorithm is a direct formula that calculates the answer.
- $O(\log_2(n))$: **Logarithmic** algorithm often halves the input size at each step. $\log_2(n)$ equals the number of times $n$ must be divided by 2 to get 1.
- $O(\sqrt{n})$: **Square root** algorithm is slower than $O(\log_2(n))$ but faster than $O(n)$.
- $O(n)$: **Linear** algorithm goes through the input a constant number of times. This is often the best possible time complexity, because it is usually necessary to access each input element at least once before reporting the answer.
- $O(n \log_2(n))$: **Log linear** often indicates that the algorithm sorts the input, because the time complexity of efficient sorting algorithms is $O(n \log_2(n))$. Another possibility is that the algorithm uses a data structure where each operation takes $O(\log_2(n))$ time.
- $O(n^2)$: **Quadratic** algorithm often contains 2 nested loops. It is possible to go trough all pairs of the input elements in $O(n^2)$ time.
- $O(n^3)$: **Cubic** algorithm often contains 3 nested loops. It is possible to go trough all triplets of the input elements in $O(n^3)$ time.
- $O(2^n)$: **Exponential** often indicates that the algorithm iterates through all subsets of the input elements. For example, the subsets of $\{1, 2, 3\}$ are $S = \{\{\empty\}, \{1\}, \{2\}, \{3\}, \{1, 2\}, \{1, 3\}, \{2, 3\}, \{1, 2, 3\} \}$.
- $O(n!)$: **Factorial** often indicates that the algorithm iterates through all permutations of the input elements. For example, the permutations of $\{1, 2, 3\}$ are $P = \{\{1, 2, 3\}, \{1, 3, 2\}, \{2, 1, 3\}, \{2, 3, 1\}, \{3, 1, 2\}, \{3, 2, 1\} \}$.
### Estimating efficiency
By checking the time complexity of an algorithm, it is possible to check before implementing the algorithm,that it is efficient enough for the problem.
Example: assume that the time limit for a problem is 1 second and the input size is $n = 10^5$. If the time complexity is $O(n^2)$, the algorithm will perform about $(10^5)^2 = 10^{10}$ operations.
Given that a modern computer can perform some hundred of millions of operations per second. This should take at least 10 seconds, so the algorithm seems to be too slow for solving the problem.
## Practical problem: Maximum subarray sum
There are often several possible algorithms for solving a problem such that their time complexities are different. This section discusses a classic problem that can be solved using several different algorithmic techniques, including brute force, divide and conquer, dynamic programming, and reduction to shortest paths, each technique with different time complexity.
**Maximum subarray sum**: Given an array of $n$ integers, find the contiguous subarray with the largest sum.
Contiguous subarray is any sub series of elements in a given array that are contiguous ie their indices are continuous. The problem is interesting when there may be negative values in the array, because if the array only contains positive values, the maximum subarray sum is basically the sum of the array (the subarray being the complete array).
### Example 1
#### Input
```txt
[1, 2, 3, 4, 5, 6]
```
#### Output
```txt
21
```
**Explanation:** The subarray with the largest sum is the array itself (as there is no negative values) `[1, 2, 3, 4, 5, 6]` which has a sum of `21`.
### Example 2
#### Input
```txt
[-1, 2, 4, -3, 5, 2, -5, 2]
```
#### Output
```txt
10
```
**Explanation:** The subarray with the largest sum is `[2, 4, -3, 5, 2]` which has a sum of `10`.
### Worst solution: Brute force
```python
def maximum_subarray_sum_cubic(array: list[int]) -> int:
"""
Time complexity: O((array_length)^3)
We go through all possible subarrays, calculate the sum in each subarray and maintain the maximum sum.
"""
if len(array) == 0:
return 0
best_sum = array[0]
length = len(array)
for i in range(length):
for j in range(i, length):
sum = 0
for k in range(i, j + 1):
sum += array[k]
if sum > best_sum:
best_sum = sum
return best_sum
```
### Better solution: Linear time
```python
def maximum_subarray_sum_linear(array: list[int]) -> int:
"""
Time complexity: O(array_length)
We loop through the array and for each array position, we calculate the maximum sum of a subarray that ends at that position. After this, the answer for the problem is the maximum of those sums.
"""
if len(array) == 0:
return 0
best_sum = array[0]
length = len(array)
sum = 0
for i in range(length):
sum = max(array[i], sum + array[i])
best_sum = max(best_sum, sum)
return best_sum
```
## Conclusion
Problems solving is a very complicated and large topic, and also a very important skill to have as a software developer.
To improve our problems solving skills, we can regularly practice with [programming challenges](https://github.com/theoludwig/programming-challenges).
## Sources
- [Wikipedia - Competitive programming](https://en.wikipedia.org/wiki/Competitive_programming)
- [Frontend Masters - The Last Algorithms Course You'll Need](https://frontendmasters.com/courses/algorithms/)
- [Big-O Cheat Sheet](https://www.bigocheatsheet.com/)
- [programming challenges](https://github.com/theoludwig/programming-challenges)

119
blog/posts/thream-v1-0-0.md Normal file
View File

@ -0,0 +1,119 @@
---
title: '🟢 Thream v1.0.0'
description: 'Your open source platform to stay close with your friends and communities, talk, chat, collaborate, share and have fun.'
isPublished: true
publishedOn: '2022-04-11T10:24:55.206Z'
---
Hello! 👋
After months of hard work, [Thream v1.0.0](https://thream.theoludwig.fr/) has been released! 🎉
[**Thream**](https://thream.theoludwig.fr/) is your open-source platform to stay close with your friends and communities, talk, chat, collaborate, share and have fun.
## Presentation
[**Thream**](https://thream.theoludwig.fr/) is a social network to stay close with your friends and communities to talk, chat, collaborate and share.
The project is largely inspired by [Discord](https://discord.com), a proprietary instant messaging service, but differentiates itself by its **non-profit open source philosophy** and will integrate special features.
The source code is available on [GitHub](https://github.com/Thream).
The idea is that a user can create an account to authenticate with an email address, and a password, or directly use an account from another platform (currently supported: Google, GitHub, Discord). Once the user is authenticated, he/she can create and join "guilds", in other words communities, in order to discuss with other people in several channels to group discussions talking about the same subject.
![The Thream app on a community page](../../public/images/posts/thream-v1-0-0/thream-ui.png)
[**Thream**](https://thream.theoludwig.fr/) is a website that works on any recent browser, accessible on [thream.theoludwig.fr](https://thream.theoludwig.fr/).
## History
The idea for the project has existed since May 13, 2020, symbolized by a [publication on Twitter](https://twitter.com/theoludwig_/status/1260638175246135296) by the creator: Théo LUDWIG.
The main goal is to put into **practice knowledge in web development** and computer science in general on a concrete project that can **easily evolve over time** where you can add many features.
The development of the project begins under the name of **SocialProject**, on August 20, 2020.
![SocialProject](../../public/images/posts/thream-v1-0-0/social-project.jpg)
When I started the project, I had little knowledge of database design, real-time management or the architecture of such a large <abbr title="Information Technology">IT</abbr> project, so this will be accompanied by many technical problems, to which we will need to find appropriate solutions.
On October 19, 2020, **SocialProject** becomes **Thream**, an invented name, not yet used and more original than the previous one, and also changes colors so that the application is accessible in two distinct themes (light and dark).
With the help of [Walidoux](https://github.com/Walidoux), a junior developer really good at making beautiful <abbr title="User Interface">UI</abbr> with <abbr title="Cascading Style Sheets">CSS</abbr>, we were able to collaborate on this side project together.
Since the project is mainly developed during free time (mainly on weekends), the project took longer to be developed than desired, but now we finally released the first version. 🥳
## Implementation and Technical Difficulties
### Architecture
**Thream** is divided into two distinct projects:
- The **server** part, called **backend**, which the user does not see, allows actions to be taken to save or recover data in the **database**, it is the technical and functional aspect of the project. This part uses a style of software architecture defining a set of constraints to be used to create web services that establish interoperability between computers on the Internet, called REST <abbr title="Application Programming Interface">API</abbr>.
- The **client** part, called **frontend**, what **the user sees on the screen**, such as forms, buttons and all the **graphic elements** with which the user can interact from a browser.
![HTTP Communication Schema](../../public/images/posts/thream-v1-0-0/http-communication.png)
This design allows the separation between the client and the server, as long as they both structure their communication according to the <abbr title="Representational state transfer">REST</abbr> architectural guidelines, using the <abbr title="Hypertext Transfer Protocol">HTTP</abbr> protocol, they will be able to communicate with each other, which makes it possible to work independently on the backend and on the frontend using different technologies and skills, really useful in teamwork.
To allow the development of this design, it is necessary to think about its architecture in order to solve the following problem: how to store and structure the folders and files of a source code in order to find which file to modify to correct a problem with a particular feature, or to add a feature?
There are two main architectures to solve this problem:
- The **Monorepo** architecture is a single directory containing several distinct projects with well-defined relationships, i.e. it allows the modification of the code in the client and server part simultaneously in the same place by verifying that a modification in the server part does not impact the client part.
- The **Polyrepo** architecture are several directories, a directory corresponding to a project.
Both architectures track source code file history using version control systems such as [git](https://git-scm.com/).
**Thream**, uses the **Polyrepo** architecture, to make it easier to set up and allows complete independence between client and server code.
### Technologies
Now that we have discussed, on the architecture of the source code, we will discuss the choice of technologies. The chosen technologies must meet the need, and allow the developer to be productive to quickly have a result. Often there are several possible technologies to meet the same need, so it is a question of choosing the technology that you prefer and that you know best.
To ease the development, we chose for **Thream** to use the [TypeScript](https://www.typescriptlang.org/), an open source programming language made by Microsoft. It's a stricter syntactic superset of **JavaScript**, and adds optional static typing to the language, meaning we can assign a "type" (`string`, `number`, `boolean` etc.) to each data/variable in the code, which has the advantage of identifying program errors even before execution and thus greatly improves developer productivity.
The **TypeScript** code is then compiled into **JavaScript** language which is one of the basic technologies of the **World Wide Web**, alongside HTML and CSS (in the client part), this makes it possible to make the pages of websites **interactive** by executing code depending on a certain event, for example when clicking on a button, or when pressing a key on the keyboard.
Since the creation of **Node.js** in 2009, it is now also possible to execute **JavaScript** outside the browser, for example on a server. **Node.js is a runtime environment** that offers modules that handle various basic features for interacting with files/folders, networking (DNS, HTTP, TCP, TLS/SSL, or UDP), and other functions inaccessible from a browser and designed to reduce the complexity of developing server applications.
**TypeScript** allows you to code with the same programming language, the client part and the server part, with different needs.
### User Interface (frontend)
The needs of the graphical interface (the client part):
- be accessible through a web browser
- allow the user to install the application
- adapts to screen size
- real-time data update (example: when a new message is sent)
- save the authenticated user (in cookie)
In order to meet its needs, Thream is a **<abbr title="Progressive Web App">PWA</abbr>**, this consists of making a website appear to the user as a native application, which makes it possible to combine the functionalities of browsers with those of the experience offered by native applications, such as the possibility of installing the application. The main advantage is to be able to **code once** and to provide the **application on several platforms (iOS, Android, Windows, GNU/Linux etc.)** without the need to develop specifically according to each platform.
To design a **<abbr title="Progressive Web App">PWA</abbr>**, and allow updating the data on the graphical interface, we can use a framework, a development infrastructure to offer us a set of tools and software components. For **Thream**, we use [Next.js](https://nextjs.org/), a framework based on [React.js](https://reactjs.org/), which allows you to create interactive user interfaces in JavaScript, to **update the graphical interface when the data changes**.
### Server (backend)
By using the protocol, **<abbr title="Hypertext Transfer Protocol">HTTP</abbr>**, it is the client who sends a request to the server, but to allow the transfer of data in real time, the **<abbr title="Hypertext Transfer Protocol">HTTP</abbr>** protocol is no longer sufficient.
We use **WebSockets** so that it is the server that send a response to all connected clients without the client requesting to the server to get a response, the server sends responses according to events, for example when creating or deleting a message.
Thanks to [Fastify](https://www.fastify.io/), a fast and low overhead web framework, for Node.js and [Socket.io](https://socket.io/), a bidirectional and low-latency communication for every platform, we can easily make REST API and real time communication.
To store the data, we use [PostgreSQL](https://www.postgresql.org/) database, and [Prisma](https://www.prisma.io/), a <abbr title="Object-Relational Mapping">ORM</abbr> for Node.js, which allows us to easily interact with the database without the need of writing <abbr title="Structured Query Language">SQL</abbr> ourselves.
## Current and future state
The main interest of **Thream** is to be able to put into practice the computer knowledge acquired as an autodidact on a concrete project, in order to learn, and understand the problems and potential solutions to complex computer applications such as social networks.
Now that the first version of **Thream** has been released, there may not be any major evolution thereafter, the project will continue to be maintained to fix any bugs, and remain accessible, for as long as possible.
The other interest of the project is that it is completely **open-source**, and allows those who want to contribute to the development, and add new features.
**Thream** is **non-profit** and therefore has no financial goal, deadline or specific feature target, which makes the design of the project a hobby and a way to learn new concepts.
Feel free to give feebacks and suggestions to improve the project, and to report any bug you find.
**Thream** is available: [**thream.theoludwig.fr**](https://thream.theoludwig.fr/).

View File

@ -0,0 +1,32 @@
import type { Plugin, Transformer } from 'unified'
import type { Literal, Node } from 'unist'
import { visit } from 'unist-util-visit'
import type { Highlighter } from 'shiki'
export interface RemarkSyntaxHighlightingPluginOptions {
highlighter: Highlighter
}
export interface RemarkSyntaxHighlightingNode extends Node {
lang: string
meta: string
children: undefined
value: string
data: Record<string, unknown>
}
export const remarkSyntaxHighlightingPlugin: Plugin<
[RemarkSyntaxHighlightingPluginOptions],
Literal
> = (options) => {
const transformer: Transformer<RemarkSyntaxHighlightingNode> = (tree) => {
visit<RemarkSyntaxHighlightingNode, string>(tree, 'code', (node) => {
node.type = 'html'
node.children = undefined
node.value = options.highlighter.codeToHtml(node.value, {
lang: node.lang
})
})
}
return transformer
}

View File

@ -1,48 +0,0 @@
import useTranslation from 'next-translate/useTranslation'
import Link from 'next/link'
export interface ErrorPageProps {
statusCode: number
message: string
}
export const ErrorPage: React.FC<ErrorPageProps> = (props) => {
const { message, statusCode } = props
const { t } = useTranslation()
return (
<>
<h1 className='my-6 font-semibold text-4xl'>
{t('errors:error')}{' '}
<span className='text-yellow dark:text-yellow-dark'>{statusCode}</span>
</h1>
<p className='text-center text-lg'>
{message}{' '}
<Link href='/'>
<a className='text-yellow dark:text-yellow-dark hover:underline'>
{t('errors:returnToHomePage')}
</a>
</Link>
</p>
<style jsx global>
{`
main {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-width: 100vw;
flex: 1;
}
#__next {
display: flex;
flex-direction: column;
padding-top: 0;
height: 100vh;
}
`}
</style>
</>
)
}

View File

@ -1,14 +0,0 @@
import useTranslation from 'next-translate/useTranslation'
export const Footer: React.FC = () => {
const { t } = useTranslation()
return (
<footer className='bg-white flex justify-center py-6 text-lg border-t-2 border-gray-600 dark:border-gray-400 dark:bg-black'>
<p>
<span className='text-yellow dark:text-yellow-dark'>Divlo</span> |{' '}
{t('common:allRightsReserved')}
</p>
</footer>
)
}

View File

@ -0,0 +1,19 @@
import Link from 'next/link'
import { getI18n } from '@/i18n/i18n.server'
export const FooterText = (): JSX.Element => {
const i18n = getI18n()
return (
<p>
<Link
href='/'
className='text-yellow hover:underline dark:text-yellow-dark'
>
Théo LUDWIG
</Link>{' '}
| {i18n.translate('common.all-rights-reserved')}
</p>
)
}

View File

@ -0,0 +1,28 @@
import { useMemo } from 'react'
interface FooterVersionProps {
version: string
}
export const FooterVersion = (props: FooterVersionProps): JSX.Element => {
const { version } = props
const versionLink = useMemo(() => {
return `https://github.com/theoludwig/theoludwig/releases/tag/v${version}`
}, [version])
return (
<p className='mt-1'>
Version{' '}
<a
data-cy='version-link'
className='text-yellow hover:underline dark:text-yellow-dark'
href={versionLink}
target='_blank'
rel='noopener noreferrer'
>
{version}
</a>
</p>
)
}

View File

@ -0,0 +1,14 @@
import { FooterText } from './FooterText'
import { FooterVersion } from './FooterVersion'
export const Footer = async (): Promise<JSX.Element> => {
const { readPackage } = await import('read-pkg')
const { version } = await readPackage()
return (
<footer className='flex flex-col items-center justify-center border-t-2 border-gray-600 bg-white py-6 text-lg dark:border-gray-400 dark:bg-black'>
<FooterText />
<FooterVersion version={version} />
</footer>
)
}

View File

@ -1,57 +0,0 @@
import NextHead from 'next/head'
interface HeadProps {
title?: string
image?: string
description?: string
url?: string
}
export const Head: React.FC<HeadProps> = (props) => {
const {
title = 'Divlo',
image = '/images/icons/icon-96x96.png',
description = "I'm Divlo, I'm 18 years old, I'm from France - Developer Full Stack Junior • Passionate about High-Tech",
url = 'https://divlo.fr/'
} = props
return (
<NextHead>
<title>{title}</title>
<link rel='icon' type='image/png' href={image} />
{/* Meta Tag */}
<meta name='viewport' content='width=device-width, initial-scale=1.0' />
<meta name='description' content={description} />
<meta name='Language' content='fr, en' />
<meta name='theme-color' content='#ffd800' />
{/* Open Graph Metadata */}
<meta property='og:title' content={title} />
<meta property='og:type' content='website' />
<meta property='og:url' content={url} />
<meta property='og:image' content={image} />
<meta property='og:description' content={description} />
<meta property='og:locale' content='fr_FR, en_US' />
<meta property='og:site_name' content={title} />
{/* Twitter card Metadata */}
<meta name='twitter:card' content='summary' />
<meta name='twitter:description' content={description} />
<meta name='twitter:title' content={title} />
<meta name='twitter:image:src' content={image} />
{/* Google Verification */}
<meta
name='google-site-verification'
content='j9CQEbSuYydXytr6gdkTfam_xX_pU97NSpVH3Bq-6f4'
/>
{/* PWA Data */}
<link rel='manifest' href='/manifest.json' />
<meta name='apple-mobile-web-app-capable' content='yes' />
<meta name='mobile-web-app-capable' content='yes' />
<link rel='apple-touch-icon' href={image} />
</NextHead>
)
}

View File

@ -1,21 +0,0 @@
import Image from 'next/image'
export interface LanguageFlagProps {
language: string
}
export const LanguageFlag: React.FC<LanguageFlagProps> = (props) => {
const { language } = props
return (
<>
<Image
width={35}
height={35}
src={`/images/languages/${language}.svg`}
alt={language}
/>
<p className='mx-2 text-base'>{language.toUpperCase()}</p>
</>
)
}

View File

@ -1,60 +0,0 @@
import { useEffect, useState } from 'react'
import useTranslation from 'next-translate/useTranslation'
import setLanguage from 'next-translate/setLanguage'
import { Arrow } from './Arrow'
import { LanguageFlag } from './LanguageFlag'
import { locales } from 'i18n.json'
export const Language: React.FC = () => {
const { lang: currentLanguage } = useTranslation()
const [hiddenMenu, setHiddenMenu] = useState(true)
useEffect(() => {
if (!hiddenMenu) {
window.document.addEventListener('click', handleHiddenMenu)
} else {
window.document.removeEventListener('click', handleHiddenMenu)
}
return () => {
window.document.removeEventListener('click', handleHiddenMenu)
}
}, [hiddenMenu])
const handleLanguage = async (language: string): Promise<void> => {
await setLanguage(language)
handleHiddenMenu()
}
const handleHiddenMenu = (): void => {
setHiddenMenu(!hiddenMenu)
}
return (
<div className='flex flex-col justify-center items-center cursor-pointer'>
<div className='flex items-center mr-5' onClick={handleHiddenMenu}>
<LanguageFlag language={currentLanguage} />
<Arrow />
</div>
{!hiddenMenu && (
<ul className='flex flex-col justify-center items-center absolute p-0 top-14 z-10 w-24 mt-3 mr-4 rounded-lg list-none shadow-light dark:shadow-dark bg-white dark:bg-black'>
{locales.map((language, index) => {
if (language === currentLanguage) {
return null
}
return (
<li
key={index}
className='flex items-center justify-center w-full h-12 hover:bg-[#4f545c] hover:bg-opacity-20 pl-2'
onClick={async () => await handleLanguage(language)}
>
<LanguageFlag language={language} />
</li>
)
})}
</ul>
)}
</div>
)
}

View File

@ -1,4 +1,4 @@
export const Arrow: React.FC = () => {
export const Arrow = (): JSX.Element => {
return (
<svg
width='12'

View File

@ -0,0 +1,30 @@
import Image from 'next/image'
import type { CookiesStore } from '@/utils/constants'
import { useI18n } from '@/i18n/i18n.client'
export interface LocaleFlagProps {
locale: string
cookiesStore: CookiesStore
}
export const LocaleFlag = (props: LocaleFlagProps): JSX.Element => {
const { locale, cookiesStore } = props
const i18n = useI18n(cookiesStore)
return (
<>
<Image
quality={100}
width={35}
height={35}
src={`/images/locales/${locale}.svg`}
alt={locale}
/>
<p data-cy='locale-flag-text' className='mx-2 text-base'>
{i18n.translate(`common.${locale}`)}
</p>
</>
)
}

View File

@ -0,0 +1,100 @@
'use client'
import { usePathname } from 'next/navigation'
import { useCallback, useEffect, useState, useRef } from 'react'
import classNames from 'clsx'
import type { Locale as LocaleType, CookiesStore } from '@/utils/constants'
import { LOCALES } from '@/utils/constants'
import { Arrow } from './Arrow'
import { LocaleFlag } from './LocaleFlag'
export interface LocalesProps {
currentLocale: string
cookiesStore: CookiesStore
}
export const Locales = (props: LocalesProps): JSX.Element => {
const { currentLocale, cookiesStore } = props
const pathname = usePathname()
const [hiddenMenu, setHiddenMenu] = useState(true)
const languageClickRef = useRef<HTMLDivElement | null>(null)
const handleHiddenMenu = useCallback(() => {
setHiddenMenu((oldHiddenMenu) => {
return !oldHiddenMenu
})
}, [])
useEffect(() => {
const handleClickEvent = (event: MouseEvent): void => {
if (languageClickRef.current == null || event.target == null) {
return
}
if (!languageClickRef.current.contains(event.target as Node)) {
setHiddenMenu(true)
}
}
window.document.addEventListener('click', handleClickEvent)
return () => {
return window.removeEventListener('click', handleClickEvent)
}
}, [])
const handleLocale = async (locale: LocaleType): Promise<void> => {
const { setLocale } = await import('@/i18n/i18n.server')
setLocale(locale)
}
if (pathname.startsWith('/blog')) {
return <></>
}
return (
<div className='flex cursor-pointer flex-col items-center justify-center'>
<div
ref={languageClickRef}
data-cy='locale-click'
className='mr-5 flex items-center'
onClick={handleHiddenMenu}
>
<LocaleFlag
locale={currentLocale}
cookiesStore={cookiesStore?.toString()}
/>
<Arrow />
</div>
<ul
data-cy='locales-list'
className={classNames(
'absolute top-14 z-10 mr-4 mt-3 flex w-32 list-none flex-col items-center justify-center rounded-lg bg-white p-0 shadow-lightFlag dark:bg-black dark:shadow-darkFlag',
{ hidden: hiddenMenu }
)}
>
{LOCALES.filter((locale) => {
return locale !== currentLocale
}).map((locale) => {
return (
<li
key={locale}
className='flex h-12 w-full items-center justify-center hover:bg-[#4f545c] hover:bg-opacity-20'
onClick={async () => {
return await handleLocale(locale)
}}
>
<LocaleFlag
locale={locale}
cookiesStore={cookiesStore?.toString()}
/>
</li>
)
})}
</ul>
</div>
)
}

View File

@ -1,127 +1,79 @@
import { useEffect, useState } from 'react'
import { useTheme } from 'next-themes'
'use client'
export const SwitchTheme: React.FC = () => {
const [mounted, setMounted] = useState(false)
const { theme, setTheme } = useTheme()
import classNames from 'clsx'
useEffect(() => {
setMounted(true)
}, [])
import { useTheme } from '@/theme/theme.client'
import type { CookiesStore } from '@/utils/constants'
if (!mounted) {
return null
export interface SwitchThemeProps {
cookiesStore: CookiesStore
}
export const SwitchTheme = (props: SwitchThemeProps): JSX.Element => {
const { cookiesStore } = props
const theme = useTheme(cookiesStore)
const handleClick = async (): Promise<void> => {
const { setTheme } = await import('@/theme/theme.server')
const newTheme = theme === 'dark' ? 'light' : 'dark'
setTheme(newTheme)
}
return (
<>
<div
className='toggle-button'
onClick={() => setTheme(theme === 'dark' ? 'light' : 'dark')}
className='flex items-center'
data-cy='switch-theme-click'
onClick={handleClick}
>
<div className='toggle-theme-button'>
<div className='toggle-track'>
<div className='toggle-track-check'>
<span className='toggle_Dark'>🌜</span>
<div className='relative inline-block cursor-pointer touch-pan-x select-none border-0 bg-transparent p-0'>
<div className='h-[24px] w-[50px] rounded-[30px] bg-[#4d4d4d] p-0 text-white transition-all duration-200 ease-in-out'>
<div
data-cy='switch-theme-dark'
className={classNames(
'absolute bottom-0 left-[8px] top-0 mb-auto mt-auto h-[10px] w-[14px] leading-[0] transition-opacity duration-[250ms] ease-in-out',
{
'opacity-100': theme === 'dark',
'opacity-0': theme === 'light'
}
)}
>
<span className='relative flex h-[10px] w-[10px] items-center justify-center'>
🌜
</span>
</div>
<div className='toggle-track-x'>
<span className='toggle_Light'>🌞</span>
<div
data-cy='switch-theme-light'
className={classNames(
'absolute bottom-0 right-[10px] top-0 mb-auto mt-auto h-[10px] w-[10px] leading-[0]',
{
'opacity-100': theme === 'light',
'opacity-0': theme === 'dark'
}
)}
>
<span className='relative flex h-[10px] w-[10px] items-center justify-center'>
🌞
</span>
</div>
</div>
<div className='toggle-thumb' />
<div
className={classNames(
'absolute top-[1px] box-border h-[22px] w-[22px] rounded-[50%] bg-[#fafafa] text-white transition-all duration-[250ms] ease-in-out',
{
'left-[27px]': theme === 'dark',
'left-0': theme === 'light'
}
)}
style={{ border: '1px solid #4d4d4d' }}
/>
<input
data-cy='switch-theme-input'
type='checkbox'
aria-label='Dark mode toggle'
className='toggle-screenreader-only'
className='absolute m-[-1px] h-[1px] w-[1px] overflow-hidden border-0 p-0 hidden'
defaultChecked
/>
</div>
</div>
<style jsx>
{`
.toggle-button {
display: flex;
align-items: center;
}
.toggle-theme-button {
touch-action: pan-x;
display: inline-block;
position: relative;
cursor: pointer;
background-color: transparent;
border: 0;
padding: 0;
user-select: none;
}
.toggle-track {
width: 50px;
height: 24px;
padding: 0;
border-radius: 30px;
background-color: #4d4d4d;
transition: all 0.2s ease;
color: #fff;
}
.toggle-track-check {
position: absolute;
width: 14px;
height: 10px;
top: 0;
bottom: 0;
margin-top: auto;
margin-bottom: auto;
line-height: 0;
left: 8px;
opacity: ${theme === 'dark' ? 1 : 0};
transition: opacity 0.25s ease;
}
.toggle-track-x {
position: absolute;
width: 10px;
height: 10px;
top: 0;
bottom: 0;
margin-top: auto;
margin-bottom: auto;
line-height: 0;
right: 10px;
opacity: ${theme === 'dark' ? 0 : 1};
}
.toggle_Dark,
.toggle_Light {
align-items: center;
display: flex;
height: 10px;
justify-content: center;
position: relative;
width: 10px;
}
.toggle-thumb {
position: absolute;
left: ${theme === 'dark' ? '27px' : '0px'};
width: 22px;
height: 22px;
border: 1px solid #4d4d4d;
border-radius: 50%;
background-color: #fafafa;
box-sizing: border-box;
transition: all 0.25s ease;
top: 1px;
color: #fff;
}
.toggle-screenreader-only {
border: 0;
clip: rect(0 0 0 0);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
}
`}
</style>
</>
)
}

View File

@ -1,10 +0,0 @@
import { render } from '@testing-library/react'
import { Header } from '..'
describe('<Header />', () => {
it('should render', async () => {
const { getByText } = render(<Header />)
expect(getByText('Divlo')).toBeInTheDocument()
})
})

View File

@ -1,30 +1,48 @@
import { cookies } from 'next/headers'
import Link from 'next/link'
import Image from 'next/image'
import { Language } from './Language'
import { getI18n } from '@/i18n/i18n.server'
import { Locales } from './Locales'
import { SwitchTheme } from './SwitchTheme'
export const Header: React.FC = () => {
export const Header = (): JSX.Element => {
const cookiesStore = cookies()
const i18n = getI18n()
return (
<header className='bg-white sticky top-0 z-50 flex w-full justify-between px-6 py-2 border-b-2 border-gray-600 dark:border-gray-400 dark:bg-black'>
<header className='sticky top-0 z-50 flex w-full justify-between border-b-2 border-gray-600 bg-white px-6 py-2 dark:border-gray-400 dark:bg-black'>
<Link href='/'>
<a>
<div className='flex items-center justify-center'>
<Image
quality={100}
width={60}
height={60}
src='/images/divlo_icon_small.png'
alt='Divlo'
src='/images/icon_small.png'
alt='Théo LUDWIG'
priority
/>
<strong className='ml-1 font-headline font-semibold hidden xs:block'>
Divlo
<strong className='ml-1 hidden font-headline font-semibold text-yellow dark:text-yellow-dark xs:block'>
Théo LUDWIG
</strong>
</div>
</a>
</Link>
<div className='flex justify-between'>
<Language />
<SwitchTheme />
<div className='flex flex-col items-center justify-center px-6'>
<Link
href='/blog'
data-cy='header-blog-link'
className='text-yellow hover:underline dark:text-yellow-dark'
>
Blog
</Link>
</div>
<Locales
currentLocale={i18n.locale}
cookiesStore={cookiesStore.toString()}
/>
<SwitchTheme cookiesStore={cookiesStore.toString()} />
</div>
</header>
)

View File

@ -5,17 +5,19 @@ export interface InterestParagraphProps {
description: string
}
export const InterestParagraph: React.FC<InterestParagraphProps> = (props) => {
export const InterestParagraph = (
props: InterestParagraphProps
): JSX.Element => {
const { title, description } = props
return (
<>
<p className='text-center my-6 text-gray dark:text-gray-dark'>
<strong className='text-yellow font-medium text-lg dark:text-yellow-dark'>
<p className='my-6 text-center text-gray dark:text-gray-dark'>
<strong className='text-lg font-semibold text-yellow dark:text-yellow-dark'>
{title}
</strong>
<br />
<span className='paragraph-color'>{htmlParser(description)}</span>
<span>{htmlParser(description)}</span>
</p>
</>
)

View File

@ -1,18 +1,18 @@
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
import { IconDefinition } from '@fortawesome/free-solid-svg-icons'
import type { IconDefinition } from '@fortawesome/free-solid-svg-icons'
interface InterestItemProps {
title: string
fontAwesomeIcon: IconDefinition
}
export const InterestItem: React.FC<InterestItemProps> = (props) => {
export const InterestItem = (props: InterestItemProps): JSX.Element => {
const { fontAwesomeIcon, title } = props
return (
<li className='interest-item my-2 mx-2 w-8 h-8' title={title}>
<li className='interest-item mx-2 my-2 h-8 w-8' title={title}>
<FontAwesomeIcon
className='text-yellow cursor-pointer h-full w-full block dark:text-yellow-dark'
className='block h-full w-full text-yellow dark:text-yellow-dark'
icon={fontAwesomeIcon}
/>
</li>

View File

@ -3,14 +3,11 @@ import { faGit } from '@fortawesome/free-brands-svg-icons'
import { InterestItem } from './InterestItem'
export const InterestsList: React.FC = () => {
export const InterestsList = (): JSX.Element => {
return (
<div className='flex justify-center my-4'>
<ul className='flex justify-around p-0 m-0 list-none w-96'>
<InterestItem
title='Developer Full Stack Junior'
fontAwesomeIcon={faCode}
/>
<div className='my-4 flex justify-center'>
<ul className='m-0 flex w-96 list-none justify-around p-0'>
<InterestItem title='Developer Full Stack' fontAwesomeIcon={faCode} />
<InterestItem
title='Passionate about High-Tech'
fontAwesomeIcon={faMicrochip}

View File

@ -1,27 +1,25 @@
import useTranslation from 'next-translate/useTranslation'
import { getI18n } from '@/i18n/i18n.server'
import { InterestParagraph, InterestParagraphProps } from './InterestParagraph'
import type { InterestParagraphProps } from './InterestParagraph'
import { InterestParagraph } from './InterestParagraph'
import { InterestsList } from './InterestsList'
export const Interests: React.FC = () => {
const { t } = useTranslation()
export const Interests = (): JSX.Element => {
const i18n = getI18n()
const paragraphs: InterestParagraphProps[] = t(
'home:interests.paragraphs',
{},
{
returnObjects: true
}
let paragraphs = i18n.translate<InterestParagraphProps[]>(
'home.interests.paragraphs'
)
if (!Array.isArray(paragraphs)) {
paragraphs = []
}
return (
<>
<div className='max-w-full'>
{paragraphs.map((paragraph, index) => {
return <InterestParagraph key={index} {...paragraph} />
})}
<InterestsList />
</div>
</>
)
}

View File

@ -0,0 +1,24 @@
import { ShadowContainer } from '@/components/design/ShadowContainer'
import { GitHubIcon } from '@/components/Profile/SocialMediaList/SocialMediaIcons/GitHubIcon'
export interface RepositoryProps {
name: string
description: string
href: string
}
export const Repository = (props: RepositoryProps): JSX.Element => {
const { name, description, href } = props
return (
<ShadowContainer className='relative !mb-4 max-h-32 cursor-pointer p-6 transition-transform duration-200 ease-in-out hover:-translate-y-2'>
<a href={href} target='_blank' rel='noopener noreferrer'>
<div className='flex'>
<GitHubIcon className='mr-2 h-6' />
<span className='text-yellow dark:text-yellow-dark'>{name}</span>
</div>
<p className='my-4'>{description}</p>
</a>
</ShadowContainer>
)
}

View File

@ -0,0 +1,37 @@
import { getI18n } from '@/i18n/i18n.server'
import { Repository } from './Repository'
export const OpenSource = (): JSX.Element => {
const i18n = getI18n()
return (
<div className='mt-0 flex max-w-full flex-col items-center'>
<p className='text-center'>
{i18n.translate('home.open-source.description')}
</p>
<div className='my-6 grid grid-cols-1 gap-6 md:w-10/12 md:grid-cols-2'>
<Repository
name='nodejs/node'
description='Node.js JavaScript runtime ✨🐢🚀✨'
href='https://github.com/nodejs/node/commits?author=theoludwig'
/>
<Repository
name='standard/standard'
description='🌟 JavaScript Style Guide, with linter & automatic code fixer'
href='https://github.com/standard/standard/commits?author=theoludwig'
/>
<Repository
name='nrwl/nx'
description='Smart, Fast and Extensible Build System'
href='https://github.com/nrwl/nx/commits?author=theoludwig'
/>
<Repository
name='vercel/next.js'
description='The React Framework'
href='https://github.com/vercel/next.js/commits?author=theoludwig'
/>
</div>
</div>
)
}

View File

@ -1,6 +1,7 @@
import { ShadowContainer } from 'components/design/ShadowContainer'
import Image from 'next/image'
import { ShadowContainer } from '@/components/design/ShadowContainer'
export interface PortfolioItemProps {
title: string
description: string
@ -8,11 +9,11 @@ export interface PortfolioItemProps {
image: string
}
export const PortfolioItem: React.FC<PortfolioItemProps> = (props) => {
export const PortfolioItem = (props: PortfolioItemProps): JSX.Element => {
const { title, description, link, image } = props
return (
<ShadowContainer className='cursor-pointer relative items-center sm:ml-10'>
<ShadowContainer className='relative cursor-pointer items-center sm:ml-10'>
<a
className='group inline-flex justify-center'
target='_blank'
@ -22,15 +23,16 @@ export const PortfolioItem: React.FC<PortfolioItemProps> = (props) => {
>
<div className='flex justify-center'>
<Image
className='transition-opacity duration-500 group-hover:opacity-20 dark:group-hover:opacity-5'
quality={100}
className='h-auto w-auto transition-opacity duration-500 group-hover:opacity-20 dark:group-hover:opacity-5'
width={300}
height={300}
src={image}
alt={title}
/>
</div>
<div className='opacity-0 transition-opacity duration-500 h-auto absolute text-center overflow-hidden bottom-0 group-hover:opacity-100'>
<h3 className='text-yellow text-xl font-semibold my-6 dark:text-yellow-dark'>
<div className='absolute bottom-0 h-auto overflow-hidden text-center opacity-0 transition-opacity duration-500 group-hover:opacity-100'>
<h3 className='my-6 text-xl font-semibold text-yellow dark:text-yellow-dark'>
{title}
</h3>
<p className='my-6'>{description}</p>

View File

@ -1,20 +1,18 @@
import useTranslation from 'next-translate/useTranslation'
import { getI18n } from '@/i18n/i18n.server'
import { PortfolioItem, PortfolioItemProps } from './PortfolioItem'
import type { PortfolioItemProps } from './PortfolioItem'
import { PortfolioItem } from './PortfolioItem'
export const Portfolio: React.FC = () => {
const { t } = useTranslation('home')
export const Portfolio = (): JSX.Element => {
const i18n = getI18n()
const items: PortfolioItemProps[] = t(
'home:portfolio.items',
{},
{
returnObjects: true
let items = i18n.translate<PortfolioItemProps[]>('home.portfolio.items')
if (!Array.isArray(items)) {
items = []
}
)
return (
<div className='flex flex-wrap justify-center px-3 w-full'>
<div className='flex w-full flex-wrap justify-center px-3'>
{items.map((item, index) => {
return <PortfolioItem key={index} {...item} />
})}

View File

@ -1,12 +1,23 @@
import Translation from 'next-translate/Trans'
import { getI18n } from '@/i18n/i18n.server'
export const ProfileDescriptionBottom = (): JSX.Element => {
const i18n = getI18n()
export const ProfileDescriptionBottom: React.FC = () => {
return (
<p className='block mt-8 mb-0 font-normal text-base text-gray dark:text-gray-dark'>
<Translation
i18nKey='home:about.descriptionBottom'
components={[<br key='break' />]}
/>
<p className='mb-8 mt-8 text-base font-normal text-gray dark:text-gray-dark'>
{i18n.translate('home.about.description-bottom')}
{i18n.locale === 'fr-FR' ? (
<>
<br />
<br />
<a
href='/curriculum-vitae/index.html'
className='text-yellow hover:underline dark:text-yellow-dark'
>
Curriculum vitæ
</a>
</>
) : null}
</p>
)
}

View File

@ -1,44 +1,16 @@
import useTranslation from 'next-translate/useTranslation'
import { getI18n } from '@/i18n/i18n.server'
export const ProfileInfo: React.FC = () => {
const { t } = useTranslation()
export const ProfileInformation = (): JSX.Element => {
const i18n = getI18n()
return (
<>
<div className='pb-2 mb-6 border-b-2 font-headline border-gray-600 dark:border-gray-400'>
<h1 className='text-4xl mb-2'>
{t('home:about.IAm')}{' '}
<strong className='font-semibold text-yellow dark:text-yellow-dark'>
Divlo
</strong>
<div className='mb-6 border-b-2 border-gray-600 pb-2 font-headline dark:border-gray-400'>
<h1 className='mb-2 text-4xl font-semibold text-yellow dark:text-yellow-dark'>
Théo LUDWIG
</h1>
<h2 className='text-base mb-3'>{t('home:about.description')}</h2>
<h2 className='mb-3 text-base'>
{i18n.translate('home.about.description')}
</h2>
</div>
<style jsx>
{`
.profile-info {
padding-bottom: 25px;
margin-bottom: 25px;
border-bottom: 1px solid #dedede;
}
.profile-title {
font-size: 36px;
line-height: 1.1;
font-weight: 300;
margin-bottom: 10px;
}
.profile-title > strong {
font-weight: 600;
}
.profile-description {
font-size: 17.4px;
font-weight: 400;
line-height: 1.1;
margin: 0;
}
`}
</style>
</>
)
}

View File

@ -4,18 +4,20 @@ interface ProfileItemProps {
link?: string
}
export const ProfileItem: React.FC<ProfileItemProps> = (props) => {
export const ProfileItem = (props: ProfileItemProps): JSX.Element => {
const { title, value, link } = props
return (
<>
<li className='profile-list__item'>
<strong className='profile-list__item-title text-black dark:text-white'>
<li className='mb-3 before:table after:clear-both after:table'>
<strong className='float-left block w-28 text-sm font-bold text-black dark:text-white'>
{title}
</strong>
<span className='profile-list__item-info text-gray dark:text-gray-dark'>
<span className='mb-4 ml-0 block text-sm font-normal text-gray dark:text-gray-dark sm:mb-0 sm:ml-32'>
{link != null ? (
<a className='text-gray dark:text-gray-dark' href={link}>
<a
className='text-gray hover:underline dark:text-gray-dark'
href={link}
>
{value}
</a>
) : (
@ -23,54 +25,5 @@ export const ProfileItem: React.FC<ProfileItemProps> = (props) => {
)}
</span>
</li>
<style jsx>
{`
.profile-list__item {
margin-bottom: 13px;
}
.profile-list__item::after,
.profile-list__item::before {
content: ' ';
display: table;
}
.profile-list__item::after {
clear: both;
}
.profile-list__item-title {
display: block;
width: 120px;
float: left;
font-size: 12px;
font-weight: 700;
line-height: 20px;
text-transform: uppercase;
}
.profile-list__item-info {
display: block;
margin-left: 125px;
font-size: 15px;
font-weight: 400;
line-height: 20px;
}
@media (max-width: 576px) {
.profile-list__item-title {
margin-bottom: 3px;
}
.profile-list__item-info {
margin-left: 0;
margin-bottom: 15px;
}
.profile-list__item-info,
.profile-list__item-title {
width: 100%;
float: none;
line-height: 1.2;
}
}
`}
</style>
</>
)
}

View File

@ -1,18 +1,46 @@
import useTranslation from 'next-translate/useTranslation'
'use client'
import { useMemo } from 'react'
import { useI18n } from '@/i18n/i18n.client'
import { BIRTH_DATE, BIRTH_DATE_STRING, getAge } from '@/utils/getAge'
import type { CookiesStore } from '@/utils/constants'
import { ProfileItem } from './ProfileItem'
export const ProfileList: React.FC = () => {
const { t } = useTranslation('home')
export interface ProfileListProps {
cookiesStore: CookiesStore
}
export const ProfileList = (props: ProfileListProps): JSX.Element => {
const { cookiesStore } = props
const i18n = useI18n(cookiesStore)
const age = useMemo(() => {
return getAge(BIRTH_DATE)
}, [])
return (
<ul className='m-0 p-0 list-none'>
<ProfileItem title={t('home:about.birthDate')} value='31/03/2003' />
<ProfileItem title={t('home:about.nationality')} value='Alsace, France' />
<ul className='m-0 list-none p-0'>
<ProfileItem
title={i18n.translate('home.about.pronouns')}
value={i18n.translate('home.about.pronouns-value')}
/>
<ProfileItem
title={i18n.translate('home.about.birth-date')}
value={`${BIRTH_DATE_STRING} (${age} ${i18n.translate(
'home.about.years-old'
)})`}
/>
<ProfileItem
title={i18n.translate('home.about.nationality')}
value='Alsace, France'
/>
<ProfileItem
title='Email'
value='contact@divlo.fr'
link='mailto:contact@divlo.fr'
value='contact@theoludwig.fr'
link='mailto:contact@theoludwig.fr'
/>
</ul>
)

View File

@ -1,14 +1,11 @@
import Image from 'next/image'
export const ProfileLogo: React.FC = () => {
import Logo from 'public/images/logo.png'
export const ProfileLogo = (): JSX.Element => {
return (
<div className='px-2 py-6'>
<Image
width={370}
height={370}
src='/images/divlo_logo.png'
alt='Divlo'
/>
<div className='max-h-[370px] max-w-[370px] px-2 py-6'>
<Image quality={100} src={Logo} alt='Théo LUDWIG' priority />
</div>
)
}

View File

@ -1,6 +1,8 @@
import { Icon } from './Icon'
export const EmailIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {
export const EmailIcon = (
props: React.SVGProps<SVGSVGElement>
): JSX.Element => {
return (
<Icon {...props}>
<title>Email</title>

View File

@ -1,6 +1,8 @@
import { Icon } from './Icon'
export const GitHubIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {
export const GitHubIcon = (
props: React.SVGProps<SVGSVGElement>
): JSX.Element => {
return (
<Icon {...props}>
<title>GitHub</title>

View File

@ -0,0 +1,12 @@
import { Icon } from './Icon'
export const GitLabIcon = (
props: React.SVGProps<SVGSVGElement>
): JSX.Element => {
return (
<Icon {...props}>
<title>GitLab</title>
<path d='M4.845.904c-.435 0-.82.28-.955.692C2.639 5.449 1.246 9.728.07 13.335a1.437 1.437 0 00.522 1.607l11.071 8.045c.2.145.472.144.67-.004l11.073-8.04a1.436 1.436 0 00.522-1.61c-1.285-3.942-2.683-8.256-3.817-11.746a1.004 1.004 0 00-.957-.684.987.987 0 00-.949.69l-2.405 7.408H8.203l-2.41-7.408a.987.987 0 00-.942-.69h-.006zm-.006 1.42l2.173 6.678H2.675zm14.326 0l2.168 6.678h-4.341zm-10.593 7.81h6.862c-1.142 3.52-2.288 7.04-3.434 10.559L8.572 10.135zm-5.514.005h4.321l3.086 9.5zm13.567 0h4.325c-2.467 3.17-4.95 6.328-7.411 9.502 1.028-3.167 2.059-6.334 3.086-9.502zM2.1 10.762l6.977 8.947-7.817-5.682a.305.305 0 01-.112-.341zm19.798 0l.952 2.922a.305.305 0 01-.11.341v.002l-7.82 5.68.026-.035z' />
</Icon>
)
}

View File

@ -1,11 +1,16 @@
export const Icon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {
const { children, ...rest } = props
import classNames from 'clsx'
export const Icon = (props: React.SVGProps<SVGSVGElement>): JSX.Element => {
const { children, className, ...rest } = props
return (
<svg
xmlns='http://www.w3.org/2000/svg'
viewBox='0 0 24 24'
className='dark:text-white text-black w-8 h-8 fill-current'
className={classNames(
'h-8 w-8 fill-current text-black dark:text-white',
className
)}
{...rest}
>
{children}

View File

@ -0,0 +1,10 @@
import { Icon } from './Icon'
export const NPMIcon = (props: React.SVGProps<SVGSVGElement>): JSX.Element => {
return (
<Icon {...props}>
<title>npm</title>
<path d='M1.763 0C.786 0 0 .786 0 1.763v20.474C0 23.214.786 24 1.763 24h20.474c.977 0 1.763-.786 1.763-1.763V1.763C24 .786 23.214 0 22.237 0zM5.13 5.323l13.837.019-.009 13.836h-3.464l.01-10.382h-3.456L12.04 19.17H5.113z' />
</Icon>
)
}

View File

@ -1,6 +1,8 @@
import { Icon } from './Icon'
export const TwitchIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {
export const TwitchIcon = (
props: React.SVGProps<SVGSVGElement>
): JSX.Element => {
return (
<Icon {...props}>
<title>Twitch</title>

View File

@ -1,6 +1,8 @@
import { Icon } from './Icon'
export const TwitterIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {
export const TwitterIcon = (
props: React.SVGProps<SVGSVGElement>
): JSX.Element => {
return (
<Icon {...props}>
<title>Twitter</title>

View File

@ -1,6 +1,8 @@
import { Icon } from './Icon'
export const YouTubeIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => {
export const YouTubeIcon = (
props: React.SVGProps<SVGSVGElement>
): JSX.Element => {
return (
<Icon {...props}>
<title>YouTube</title>

View File

@ -1,13 +1,13 @@
interface SocialMediaItemProps {
interface SocialMediaItemProps extends React.PropsWithChildren {
link: string
ariaLabel: string
}
export const SocialMediaItem: React.FC<SocialMediaItemProps> = (props) => {
export const SocialMediaItem = (props: SocialMediaItemProps): JSX.Element => {
const { link, ariaLabel, children } = props
return (
<li className='inline-block mx-4 my-1'>
<li className='mx-4 my-1 inline-block'>
<a
href={link}
aria-label={ariaLabel}

View File

@ -1,29 +1,43 @@
import { SocialMediaItem } from './SocialMediaItem'
import { TwitterIcon } from './SocialMediaIcons/TwitterIcon'
import { GitHubIcon } from './SocialMediaIcons/GitHubIcon'
import { GitLabIcon } from './SocialMediaIcons/GitLabIcon'
import { YouTubeIcon } from './SocialMediaIcons/YouTubeIcon'
import { TwitchIcon } from './SocialMediaIcons/TwitchIcon'
import { EmailIcon } from './SocialMediaIcons/EmailIcon'
import { NPMIcon } from './SocialMediaIcons/NPMIcon'
export const SocialMediaList: React.FC = () => {
export const SocialMediaList = (): JSX.Element => {
return (
<ul className='social-media-list m-0 p-0 list-none text-center mt-2 px-0 py-4'>
<SocialMediaItem link='https://twitter.com/Divlo_FR' ariaLabel='Twitter'>
<TwitterIcon />
</SocialMediaItem>
<SocialMediaItem link='https://github.com/Divlo' ariaLabel='GitHub'>
<ul className='social-media-list m-0 mt-2 list-none py-4 text-center'>
<SocialMediaItem link='https://github.com/theoludwig' ariaLabel='GitHub'>
<GitHubIcon />
</SocialMediaItem>
<SocialMediaItem link='https://gitlab.com/theoludwig' ariaLabel='GitLab'>
<GitLabIcon />
</SocialMediaItem>
<SocialMediaItem link='https://www.npmjs.com/~theoludwig' ariaLabel='npm'>
<NPMIcon />
</SocialMediaItem>
<SocialMediaItem
link='https://www.youtube.com/c/Divlo'
link='https://twitter.com/theoludwig_'
ariaLabel='Twitter'
>
<TwitterIcon />
</SocialMediaItem>
<SocialMediaItem
link='https://www.youtube.com/@theo_ludwig'
ariaLabel='YouTube'
>
<YouTubeIcon />
</SocialMediaItem>
<SocialMediaItem link='https://www.twitch.tv/divlo' ariaLabel='Twitch'>
<SocialMediaItem
link='https://www.twitch.tv/theoludwig'
ariaLabel='Twitch'
>
<TwitchIcon />
</SocialMediaItem>
<SocialMediaItem link='mailto:contact@divlo.fr' ariaLabel='Email'>
<SocialMediaItem link='mailto:contact@theoludwig.fr' ariaLabel='Email'>
<EmailIcon />
</SocialMediaItem>
</ul>

View File

@ -1,15 +1,19 @@
import { cookies } from 'next/headers'
import { ProfileDescriptionBottom } from './ProfileDescriptionBottom'
import { ProfileInfo } from './ProfileInfo'
import { ProfileInformation } from './ProfileInfo'
import { ProfileList } from './ProfileList'
import { ProfileLogo } from './ProfileLogo'
export const Profile: React.FC = () => {
export const Profile = (): JSX.Element => {
const cookiesStore = cookies()
return (
<div className='flex flex-col justify-center items-center px-10 pt-2 pb-6 md:pt-10 xl:pt-0 md:flex-row'>
<div className='flex flex-col items-center justify-center px-10 pt-2 md:flex-row md:pt-10'>
<ProfileLogo />
<div className='col-sm-24 col-md-14'>
<ProfileInfo />
<ProfileList />
<div>
<ProfileInformation />
<ProfileList cookiesStore={cookiesStore.toString()} />
<ProfileDescriptionBottom />
</div>
</div>

View File

@ -1,15 +1,31 @@
import Image from 'next/image'
import { getTheme } from '@/theme/theme.server'
import type { SkillName } from './skills'
import { skills } from './skills'
export interface SkillProps {
skill: keyof typeof skills
export interface SkillComponentProps {
skill: SkillName
}
export const Skill: React.FC<SkillProps> = (props) => {
export const SkillComponent = (props: SkillComponentProps): JSX.Element => {
const { skill } = props
const skillProperties = skills[skill]
const theme = getTheme()
const getImage = (): string => {
if (typeof skillProperties.image === 'string') {
return skillProperties.image
}
if (theme === 'light') {
return skillProperties.image.light
}
return skillProperties.image.dark
}
return (
<a
href={skillProperties.link}
@ -18,7 +34,14 @@ export const Skill: React.FC<SkillProps> = (props) => {
rel='noopener noreferrer'
>
<div className='text-center'>
<Image width={60} height={60} alt={skill} src={skillProperties.image} />
<Image
className='inline h-16 w-16'
quality={100}
width={64}
height={64}
alt={skill}
src={getImage()}
/>
<p className='mt-1'>{skill}</p>
</div>
</a>

View File

@ -1,24 +1,24 @@
import { ShadowContainer } from 'components/design/ShadowContainer'
import { ShadowContainer } from '@/components/design/ShadowContainer'
export interface SkillsSectionProps {
title: string
children: React.ReactNode
}
export const SkillsSection: React.FC<SkillsSectionProps> = (props) => {
export const SkillsSection = (props: SkillsSectionProps): JSX.Element => {
const { title, children } = props
return (
<ShadowContainer>
<div className='w-full px-4 mx-auto'>
<div className='mx-auto w-full px-4'>
<div className='flex flex-wrap px-4 py-6'>
<div className='flex-1'>
<div className='mb-8 border-b border-gray-600 dark:border-opacity-10 dark:border-white'>
<h3 className='text-yellow font-semibold text-xl my-3 dark:text-yellow-dark'>
<div className='mb-8 border-b border-gray-600 dark:border-white dark:border-opacity-10'>
<h3 className='my-3 text-xl font-semibold text-yellow dark:text-yellow-dark'>
{title}
</h3>
</div>
<div className='flex justify-around flex-wrap'>{children}</div>
<div className='flex flex-wrap justify-around'>{children}</div>
</div>
</div>
</div>

View File

@ -1,40 +1,40 @@
import useTranslation from 'next-translate/useTranslation'
import { getI18n } from '@/i18n/i18n.server'
import { Skill } from './Skill'
import { SkillComponent } from './Skill'
import { SkillsSection } from './SkillsSection'
export const Skills: React.FC = () => {
const { t } = useTranslation()
export const Skills = (): JSX.Element => {
const i18n = getI18n()
return (
<>
<SkillsSection title={t('home:skills.languages')}>
<Skill skill='JavaScript' />
<Skill skill='TypeScript' />
<Skill skill='Python' />
<Skill skill='Dart' />
<SkillsSection title={i18n.translate('home.skills.languages')}>
<SkillComponent skill='TypeScript' />
<SkillComponent skill='Python' />
<SkillComponent skill='C/C++' />
<SkillComponent skill='PHP' />
</SkillsSection>
<SkillsSection title='Front-end'>
<Skill skill='HTML' />
<Skill skill='CSS' />
<Skill skill='SASS' />
<Skill skill='React.js (+ Next.js)' />
<Skill skill='Flutter' />
<SkillsSection title='Frontend'>
<SkillComponent skill='HTML' />
<SkillComponent skill='CSS' />
<SkillComponent skill='Tailwind CSS' />
<SkillComponent skill='React.js (+ Next.js)' />
</SkillsSection>
<SkillsSection title='Back-end'>
<Skill skill='Node.js' />
<Skill skill='Strapi' />
<Skill skill='MySQL' />
<SkillsSection title='Backend'>
<SkillComponent skill='Laravel' />
<SkillComponent skill='Node.js' />
<SkillComponent skill='Fastify' />
<SkillComponent skill='PostgreSQL' />
</SkillsSection>
<SkillsSection title={t('home:skills.softwareTools')}>
<Skill skill='Ubuntu' />
<Skill skill='Hyper' />
<Skill skill='Visual Studio Code' />
<Skill skill='Git' />
<Skill skill='Docker' />
<SkillsSection title={i18n.translate('home.skills.software-tools')}>
<SkillComponent skill='GNU/Linux' />
<SkillComponent skill='Arch Linux' />
<SkillComponent skill='Visual Studio Code' />
<SkillComponent skill='Git' />
<SkillComponent skill='Docker' />
</SkillsSection>
</>
)

View File

@ -1,3 +1,8 @@
export interface Skill {
link: string
image: string | { [key: string]: string }
}
export const skills = {
JavaScript: {
link: 'https://developer.mozilla.org/docs/Web/JavaScript',
@ -11,6 +16,18 @@ export const skills = {
link: 'https://www.python.org/',
image: '/images/skills/Python.png'
},
'C/C++': {
link: 'https://isocpp.org/',
image: '/images/skills/C-Cpp.png'
},
PHP: {
link: 'https://www.php.net/',
image: '/images/skills/PHP.png'
},
Laravel: {
link: 'https://laravel.com/',
image: '/images/skills/Laravel.png'
},
Dart: {
link: 'https://dart.dev/',
image: '/images/skills/Dart.png'
@ -27,6 +44,10 @@ export const skills = {
link: 'https://developer.mozilla.org/docs/Web/CSS',
image: '/images/skills/CSS.png'
},
'Tailwind CSS': {
link: 'https://tailwindcss.com/',
image: '/images/skills/TailwindCSS.png'
},
SASS: {
link: 'https://sass-lang.com/',
image: '/images/skills/SASS.svg'
@ -39,6 +60,24 @@ export const skills = {
link: 'https://nodejs.org/',
image: '/images/skills/NodeJS.png'
},
Fastify: {
link: 'https://www.fastify.io/',
image: {
light: '/images/skills/Fastify-light.png',
dark: '/images/skills/Fastify-dark.png'
}
},
Prisma: {
link: 'https://www.prisma.io/',
image: {
light: '/images/skills/Prisma-light.png',
dark: '/images/skills/Prisma-dark.png'
}
},
PostgreSQL: {
link: 'https://www.postgresql.org/',
image: '/images/skills/PostgreSQL.png'
},
MySQL: {
link: 'https://www.mysql.com/',
image: '/images/skills/MySQL.png'
@ -49,22 +88,28 @@ export const skills = {
},
'Visual Studio Code': {
link: 'https://code.visualstudio.com/',
image: '/images/skills/Visual_Studio_Code.png'
image: '/images/skills/VisualStudioCode.png'
},
Git: {
link: 'https://git-scm.com/',
image: '/images/skills/Git.png'
},
Hyper: {
link: 'https://hyper.is/',
image: '/images/skills/Hyper.svg'
},
Ubuntu: {
link: 'https://ubuntu.com/',
image: '/images/skills/Ubuntu.png'
},
'Arch Linux': {
link: 'https://archlinux.org/',
image: '/images/skills/ArchLinux.png'
},
'GNU/Linux': {
link: 'https://www.gnu.org/',
image: '/images/skills/GNU-Linux.png'
},
Docker: {
link: 'https://www.docker.com/',
image: '/images/skills/Docker.png'
}
} as const
export type SkillName = keyof typeof skills

Some files were not shown because too many files have changed in this diff Show More