Compare commits
48 Commits
v3.1.2
...
dd09092842
Author | SHA1 | Date | |
---|---|---|---|
dd09092842
|
|||
f64acb68c7
|
|||
3074945c54
|
|||
fc0dfdda5f
|
|||
f62964c62a
|
|||
8ec113c9cb
|
|||
8a59e9034f
|
|||
d7121ea833
|
|||
c10f690622
|
|||
6915072ab9
|
|||
dd803bcc51
|
|||
efa33f26ec
|
|||
5f3dfad988
|
|||
b231381cb3
|
|||
bbb2e56512
|
|||
66cf6d7438
|
|||
2a635bf3ba
|
|||
9f79b88202
|
|||
23d9caf578
|
|||
7febe6d1f9
|
|||
c4650c34d9
|
|||
0eb780485c
|
|||
cd5e92b64a
|
|||
982b148329
|
|||
0febee5b51
|
|||
3502f51735
|
|||
493df4e2f2
|
|||
c2c9b59c7a
|
|||
f6e3008ab9
|
|||
15e94cec64
|
|||
5185c6758b
|
|||
b633eef833
|
|||
d2e627ff13
|
|||
1e0567b538
|
|||
c8d32c6acc
|
|||
05503cda26
|
|||
303b6f3011
|
|||
0272cf7080
|
|||
e8ea42a260
|
|||
f337e14260
|
|||
f5020cad19
|
|||
b8ceefb2f6
|
|||
1523c8cac0
|
|||
548ddc8425
|
|||
bac65ad61a
|
|||
b91f3165b7
|
|||
5478e202a7
|
|||
a89b5932c2
|
@ -1 +0,0 @@
|
||||
FROM mcr.microsoft.com/devcontainers/javascript-node:20
|
@ -1,9 +0,0 @@
|
||||
services:
|
||||
workspace:
|
||||
build:
|
||||
context: "./"
|
||||
dockerfile: "./Dockerfile"
|
||||
volumes:
|
||||
- "..:/workspace:cached"
|
||||
command: "sleep infinity"
|
||||
network_mode: "host"
|
@ -1,24 +0,0 @@
|
||||
{
|
||||
"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"
|
||||
}
|
@ -1,16 +1,38 @@
|
||||
{
|
||||
"extends": ["conventions", "next/core-web-vitals", "prettier"],
|
||||
"plugins": ["prettier"],
|
||||
"parserOptions": {
|
||||
"project": "./tsconfig.json"
|
||||
"root": true,
|
||||
"extends": [
|
||||
"conventions",
|
||||
"next/core-web-vitals",
|
||||
"plugin:tailwindcss/recommended"
|
||||
],
|
||||
"plugins": ["import", "promise", "unicorn"],
|
||||
"settings": {
|
||||
"tailwindcss": {
|
||||
"callees": ["classNames"]
|
||||
},
|
||||
"react": {
|
||||
"version": "detect"
|
||||
}
|
||||
},
|
||||
"rules": {
|
||||
"prettier/prettier": "error"
|
||||
"react/self-closing-comp": [
|
||||
"error",
|
||||
{
|
||||
"component": true,
|
||||
"html": true
|
||||
}
|
||||
],
|
||||
"react/void-dom-elements-no-children": "error",
|
||||
"react/jsx-boolean-value": "error"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts", "*.tsx"],
|
||||
"parser": "@typescript-eslint/parser"
|
||||
"parser": "@typescript-eslint/parser",
|
||||
"plugins": ["@typescript-eslint"],
|
||||
"parserOptions": {
|
||||
"project": "./tsconfig.json"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
4
.github/workflows/build.yml
vendored
@ -10,10 +10,10 @@ jobs:
|
||||
build:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- uses: "actions/checkout@v4.1.1"
|
||||
- uses: "actions/checkout@v4.1.6"
|
||||
|
||||
- name: "Setup Node.js"
|
||||
uses: "actions/setup-node@v4.0.1"
|
||||
uses: "actions/setup-node@v4.0.2"
|
||||
with:
|
||||
node-version: "20.x"
|
||||
cache: "npm"
|
||||
|
6
.github/workflows/lint.yml
vendored
@ -10,10 +10,10 @@ jobs:
|
||||
lint:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- uses: "actions/checkout@v4.1.1"
|
||||
- uses: "actions/checkout@v4.1.6"
|
||||
|
||||
- name: "Setup Node.js"
|
||||
uses: "actions/setup-node@v4.0.1"
|
||||
uses: "actions/setup-node@v4.0.2"
|
||||
with:
|
||||
node-version: "20.x"
|
||||
cache: "npm"
|
||||
@ -37,6 +37,6 @@ jobs:
|
||||
run: "npm run lint:prettier"
|
||||
|
||||
- name: "lint:dotenv"
|
||||
uses: "dotenv-linter/action-dotenv-linter@v2.18.0"
|
||||
uses: "dotenv-linter/action-dotenv-linter@v2.21.0"
|
||||
with:
|
||||
github_token: ${{ secrets.github_token }}
|
||||
|
4
.github/workflows/release.yml
vendored
@ -8,7 +8,7 @@ jobs:
|
||||
release:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- uses: "actions/checkout@v4.1.1"
|
||||
- uses: "actions/checkout@v4.1.6"
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
@ -21,7 +21,7 @@ jobs:
|
||||
git_commit_gpgsign: true
|
||||
|
||||
- name: "Setup Node.js"
|
||||
uses: "actions/setup-node@v4.0.1"
|
||||
uses: "actions/setup-node@v4.0.2"
|
||||
with:
|
||||
node-version: "20.x"
|
||||
cache: "npm"
|
||||
|
8
.github/workflows/test.yml
vendored
@ -10,10 +10,10 @@ jobs:
|
||||
test-unit:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- uses: "actions/checkout@v4.1.1"
|
||||
- uses: "actions/checkout@v4.1.6"
|
||||
|
||||
- name: "Setup Node.js"
|
||||
uses: "actions/setup-node@v4.0.1"
|
||||
uses: "actions/setup-node@v4.0.2"
|
||||
with:
|
||||
node-version: "20.x"
|
||||
cache: "npm"
|
||||
@ -27,10 +27,10 @@ jobs:
|
||||
test-e2e:
|
||||
runs-on: "ubuntu-latest"
|
||||
steps:
|
||||
- uses: "actions/checkout@v4.1.1"
|
||||
- uses: "actions/checkout@v4.1.6"
|
||||
|
||||
- name: "Setup Node.js"
|
||||
uses: "actions/setup-node@v4.0.1"
|
||||
uses: "actions/setup-node@v4.0.2"
|
||||
with:
|
||||
node-version: "20.x"
|
||||
cache: "npm"
|
||||
|
20
.gitpod.yml
@ -1,20 +0,0 @@
|
||||
image: "gitpod/workspace-full"
|
||||
|
||||
tasks:
|
||||
- before: "cp .env.example .env"
|
||||
init: "npm clean-install"
|
||||
command: "npm run dev"
|
||||
|
||||
ports:
|
||||
- port: 3000
|
||||
onOpen: "open-preview"
|
||||
|
||||
github:
|
||||
prebuilds:
|
||||
master: true
|
||||
branches: true
|
||||
pullRequests: true
|
||||
pullRequestsFromForks: true
|
||||
addComment: true
|
||||
addBadge: true
|
||||
addLabel: true
|
@ -1,4 +1,6 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/theoludwig/html-w3c-validator/master/schema/html-w3c-validatorrc-schema.json",
|
||||
"urls": ["http://127.0.0.1:3000/", "http://127.0.0.1:3000/blog"],
|
||||
"files": ["./public/curriculum-vitae/index.html"]
|
||||
"files": ["./public/curriculum-vitae/index.html"],
|
||||
"severities": ["error"]
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
#!/usr/bin/env sh
|
||||
|
||||
npm run lint:commit -- --edit
|
||||
|
@ -1,4 +1,3 @@
|
||||
#!/bin/sh
|
||||
. "$(dirname "$0")/_/husky.sh"
|
||||
#!/usr/bin/env sh
|
||||
|
||||
npm run lint:staged
|
||||
|
@ -1,4 +1,7 @@
|
||||
{
|
||||
"**/*": ["prettier --write --ignore-unknown", "editorconfig-checker"],
|
||||
"*.{md,mdx}": ["markdownlint-cli2 --fix"]
|
||||
"**/*": ["editorconfig-checker", "prettier --write --ignore-unknown"],
|
||||
"**/*.md": ["markdownlint-cli2 --fix --no-globs"],
|
||||
"**/*.{js,jsx,ts,tsx}": [
|
||||
"eslint --fix --max-warnings 0 --report-unused-disable-directives"
|
||||
]
|
||||
}
|
||||
|
@ -1,12 +1,12 @@
|
||||
{
|
||||
"config": {
|
||||
"extends": "markdownlint/style/prettier",
|
||||
"default": true,
|
||||
"relative-links": true,
|
||||
"extends": "markdownlint/style/prettier",
|
||||
"MD024": false,
|
||||
"MD033": false
|
||||
"no-duplicate-heading": false,
|
||||
"no-inline-html": false,
|
||||
},
|
||||
"globs": ["**/*.{md,mdx}"],
|
||||
"globs": ["**/*.md"],
|
||||
"ignores": ["**/node_modules"],
|
||||
"customRules": ["markdownlint-rule-relative-links"]
|
||||
"customRules": ["markdownlint-rule-relative-links"],
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
{
|
||||
"semi": false
|
||||
"semi": false,
|
||||
"plugins": ["prettier-plugin-tailwindcss"]
|
||||
}
|
||||
|
@ -29,8 +29,6 @@ The commit message guidelines adheres to [Conventional Commits](https://www.conv
|
||||
|
||||
## Getting Started
|
||||
|
||||
[](https://gitpod.io/#https://github.com/theoludwig/theoludwig)
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- [Node.js](https://nodejs.org/) >= 20.0.0
|
||||
@ -66,6 +64,6 @@ npm run dev
|
||||
docker compose up --build
|
||||
```
|
||||
|
||||
### Services started
|
||||
### Service started
|
||||
|
||||
- `website`: <http://127.0.0.1:3000>
|
||||
`website`: <http://127.0.0.1:3000>
|
||||
|
@ -1,9 +1,9 @@
|
||||
FROM node:20.10.0 AS builder-dependencies
|
||||
FROM node:20.12.2 AS builder-dependencies
|
||||
WORKDIR /usr/src/application
|
||||
COPY ./package*.json ./
|
||||
RUN npm clean-install
|
||||
|
||||
FROM node:20.10.0 AS builder
|
||||
FROM node:20.12.2 AS builder
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
ENV IS_STANDALONE=true
|
||||
WORKDIR /usr/src/application
|
||||
@ -11,7 +11,7 @@ COPY --from=builder-dependencies /usr/src/application/node_modules ./node_module
|
||||
COPY ./ ./
|
||||
RUN npm run build
|
||||
|
||||
FROM node:20.10.0-slim AS runner
|
||||
FROM node:20.12.2-slim AS runner
|
||||
ENV NODE_ENV=production
|
||||
ENV HOSTNAME=0.0.0.0
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
|
2
LICENSE
@ -1,6 +1,6 @@
|
||||
# MIT License
|
||||
|
||||
Copyright (c) Théo LUDWIG
|
||||
Copyright (c) Théo LUDWIG <contact@theoludwig.fr>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -1,7 +1,7 @@
|
||||
<h1 align="center"><a href="https://theoludwig.fr/">Théo LUDWIG</a></h1>
|
||||
|
||||
<p align="center">
|
||||
<strong>Developer Full Stack • Open-Source enthusiast</strong>
|
||||
<strong>Developer Full Stack • Open-Source Enthusiast</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
@ -25,10 +25,10 @@
|
||||
"pronouns": "He/Him",
|
||||
"birthDate": "31/03/2003",
|
||||
"nationality": "Alsace, France",
|
||||
"interests": ["Developer Full Stack", "Open-Source enthusiast"],
|
||||
"interests": ["Developer Full Stack", "Open-Source Enthusiast"],
|
||||
"skills": {
|
||||
"programmingLanguages": ["JavaScript/TypeScript", "Python", "C/C++", "PHP"],
|
||||
"frontend": ["HTML", "CSS", "Tailwind CSS", "React.js/Next.js"],
|
||||
"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"]
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ import { Loader } from "@/components/design/Loader"
|
||||
|
||||
const Loading = (): JSX.Element => {
|
||||
return (
|
||||
<main className="flex flex-col flex-1 items-center justify-center">
|
||||
<main className="flex flex-1 flex-col items-center justify-center">
|
||||
<Loader />
|
||||
</main>
|
||||
)
|
||||
|
@ -2,7 +2,7 @@ import { Loader } from "@/components/design/Loader"
|
||||
|
||||
const Loading = (): JSX.Element => {
|
||||
return (
|
||||
<main className="flex flex-col flex-1 items-center justify-center">
|
||||
<main className="flex flex-1 flex-col items-center justify-center">
|
||||
<Loader />
|
||||
</main>
|
||||
)
|
||||
|
@ -25,7 +25,9 @@ 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>
|
||||
<h1 className="text-4xl font-semibold text-primary dark:text-primary-dark">
|
||||
Blog
|
||||
</h1>
|
||||
<p className="mt-6 text-center" data-cy="blog-post-date">
|
||||
{description}
|
||||
</p>
|
||||
|
@ -14,11 +14,11 @@ const ErrorHandling = (props: ErrorHandlingProps): JSX.Element => {
|
||||
}, [error])
|
||||
|
||||
return (
|
||||
<main className="flex flex-col flex-1 items-center justify-center">
|
||||
<main className="flex flex-1 flex-col items-center justify-center">
|
||||
<h1 className="my-6 text-4xl font-semibold">
|
||||
Error{" "}
|
||||
<span
|
||||
className="text-yellow dark:text-yellow-dark"
|
||||
className="text-primary dark:text-primary-dark"
|
||||
data-cy="status-code"
|
||||
>
|
||||
500
|
||||
|
BIN
app/favicon.ico
Normal file
After Width: | Height: | Size: 2.4 KiB |
@ -7,6 +7,10 @@
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.text-base {
|
||||
line-height: 1.75rem;
|
||||
}
|
||||
|
||||
.prose {
|
||||
@apply !max-w-5xl scroll-smooth text-gray dark:text-gray-300;
|
||||
}
|
||||
@ -25,7 +29,12 @@
|
||||
|
||||
.prose a,
|
||||
.prose strong {
|
||||
@apply text-yellow dark:text-yellow-dark;
|
||||
@apply !font-semibold text-primary dark:text-primary-dark;
|
||||
}
|
||||
|
||||
strong,
|
||||
b {
|
||||
@apply font-bold;
|
||||
}
|
||||
|
||||
.prose h2,
|
||||
@ -53,15 +62,17 @@ code {
|
||||
code .line::before {
|
||||
content: counter(step);
|
||||
counter-increment: step;
|
||||
width: 1rem;
|
||||
margin-right: 1.5rem;
|
||||
display: inline-block;
|
||||
margin-right: 1rem;
|
||||
text-align: right;
|
||||
color: rgba(133, 133, 133, 0.8);
|
||||
word-wrap: normal;
|
||||
word-break: normal;
|
||||
}
|
||||
|
||||
code .line:last-child {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.katex .base {
|
||||
display: inline !important;
|
||||
white-space: normal !important;
|
||||
|
@ -12,8 +12,8 @@ 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"
|
||||
"Théo LUDWIG - Developer Full Stack • Open-Source Enthusiast"
|
||||
const image = "/images/logo.png"
|
||||
const url = new URL("https://theoludwig.fr")
|
||||
const locale = "fr-FR, en-US"
|
||||
|
||||
@ -36,9 +36,6 @@ export const metadata: Metadata = {
|
||||
locale,
|
||||
type: "website",
|
||||
},
|
||||
icons: {
|
||||
icon: "/images/icon-96x96.png",
|
||||
},
|
||||
twitter: {
|
||||
card: "summary",
|
||||
title,
|
||||
@ -60,15 +57,18 @@ const RootLayout = (props: RootLayoutProps): JSX.Element => {
|
||||
return (
|
||||
<html
|
||||
lang={i18n.locale}
|
||||
className={classNames({
|
||||
dark: theme === "dark",
|
||||
light: theme === "light",
|
||||
})}
|
||||
className={classNames(
|
||||
{
|
||||
dark: theme === "dark",
|
||||
light: theme === "light",
|
||||
},
|
||||
"scroll-smooth",
|
||||
)}
|
||||
style={{
|
||||
colorScheme: theme,
|
||||
}}
|
||||
>
|
||||
<body className="bg-white font-headline text-black dark:bg-black dark:text-white flex flex-col min-h-screen">
|
||||
<body className="flex min-h-screen flex-col bg-white font-headline text-black dark:bg-black dark:text-white">
|
||||
<Header />
|
||||
{children}
|
||||
<Footer />
|
||||
|
@ -2,7 +2,7 @@ import { Loader } from "@/components/design/Loader"
|
||||
|
||||
const Loading = (): JSX.Element => {
|
||||
return (
|
||||
<main className="flex flex-col flex-1 items-center justify-center">
|
||||
<main className="flex flex-1 flex-col items-center justify-center">
|
||||
<Loader />
|
||||
</main>
|
||||
)
|
||||
|
@ -6,11 +6,11 @@ const NotFound = (): JSX.Element => {
|
||||
const i18n = getI18n()
|
||||
|
||||
return (
|
||||
<main className="flex flex-col flex-1 items-center justify-center">
|
||||
<main className="flex flex-1 flex-col items-center justify-center">
|
||||
<h1 className="my-6 text-4xl font-semibold">
|
||||
{i18n.translate("errors.error")}{" "}
|
||||
<span
|
||||
className="text-yellow dark:text-yellow-dark"
|
||||
className="text-primary dark:text-primary-dark"
|
||||
data-cy="status-code"
|
||||
>
|
||||
404
|
||||
@ -20,7 +20,7 @@ const NotFound = (): JSX.Element => {
|
||||
{i18n.translate("errors.not-found")}{" "}
|
||||
<Link
|
||||
href="/"
|
||||
className="text-yellow hover:underline dark:text-yellow-dark"
|
||||
className="text-primary hover:underline dark:text-primary-dark"
|
||||
>
|
||||
{i18n.translate("errors.return-to-home-page")}
|
||||
</Link>
|
||||
|
@ -21,7 +21,9 @@ export const BlogPost = async (props: BlogPostProps): Promise<JSX.Element> => {
|
||||
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>
|
||||
<h1 className="text-3xl font-semibold text-primary dark:text-primary-dark">
|
||||
{blogPost.frontmatter.title}
|
||||
</h1>
|
||||
<p className="mt-2" data-cy="blog-post-date">
|
||||
{date.format(
|
||||
new Date(blogPost.frontmatter.publishedOn),
|
||||
|
@ -1,22 +1,22 @@
|
||||
import { faLink } from "@fortawesome/free-solid-svg-icons"
|
||||
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"
|
||||
import { nodeTypes } from "@mdx-js/mdx"
|
||||
import rehypeShikiFromHighlighter from "@shikijs/rehype/core"
|
||||
import { MDXRemote } from "next-mdx-remote/rsc"
|
||||
import { cookies } from "next/headers"
|
||||
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 rehypeRaw from "rehype-raw"
|
||||
import rehypeSlug from "rehype-slug"
|
||||
import remarkGfm from "remark-gfm"
|
||||
import remarkMath from "remark-math"
|
||||
import { getHighlighterCore } from "shiki/core"
|
||||
|
||||
import "katex/dist/katex.min.css"
|
||||
|
||||
import { getTheme } from "@/theme/theme.server"
|
||||
import { remarkSyntaxHighlightingPlugin } from "@/blog/remarkSyntaxHighlightingPlugin"
|
||||
import { BlogPostComments } from "@/blog/BlogPostComments"
|
||||
import { getTheme } from "@/theme/theme.server"
|
||||
|
||||
const Heading = (
|
||||
props: React.DetailedHTMLProps<
|
||||
@ -26,14 +26,14 @@ const Heading = (
|
||||
): 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} />
|
||||
<h2 {...props}>
|
||||
<Link href={`#${id}`} className="group relative hover:no-underline">
|
||||
<FontAwesomeIcon
|
||||
className="absolute bottom-2 left-[-26px] mr-2 hidden size-4 !text-black group-hover:inline dark:!text-white"
|
||||
icon={faLink}
|
||||
/>
|
||||
{children}
|
||||
</Link>
|
||||
{children}
|
||||
</h2>
|
||||
)
|
||||
}
|
||||
@ -50,8 +50,19 @@ export const BlogPostContent = async (
|
||||
const cookiesStore = cookies()
|
||||
const theme = getTheme()
|
||||
|
||||
const highlighter = await getHighlighter({
|
||||
theme: `${theme}-plus`,
|
||||
const highlighter = await getHighlighterCore({
|
||||
themes: [
|
||||
import("shiki/themes/light-plus.mjs"),
|
||||
import("shiki/themes/dark-plus.mjs"),
|
||||
],
|
||||
langs: [
|
||||
import("shiki/langs/markdown.mjs"),
|
||||
import("shiki/langs/shell.mjs"),
|
||||
import("shiki/langs/javascript.mjs"),
|
||||
import("shiki/langs/typescript.mjs"),
|
||||
import("shiki/langs/python.mjs"),
|
||||
],
|
||||
loadWasm: import("shiki/wasm"),
|
||||
})
|
||||
|
||||
return (
|
||||
@ -61,15 +72,18 @@ export const BlogPostContent = async (
|
||||
source={content}
|
||||
options={{
|
||||
mdxOptions: {
|
||||
remarkPlugins: [
|
||||
remarkGfm,
|
||||
[remarkSyntaxHighlightingPlugin, { highlighter }],
|
||||
remarkMath,
|
||||
],
|
||||
remarkPlugins: [remarkGfm, remarkMath],
|
||||
rehypePlugins: [
|
||||
rehypeSlug,
|
||||
[rehypeRaw, { passThrough: nodeTypes }],
|
||||
rehypeKatex,
|
||||
[
|
||||
rehypeShikiFromHighlighter,
|
||||
highlighter,
|
||||
{
|
||||
theme: `${theme}-plus`,
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
}}
|
||||
@ -90,16 +104,26 @@ export const BlogPostContent = async (
|
||||
alt={alt}
|
||||
width={1000}
|
||||
height={1000}
|
||||
className="h-auto w-auto"
|
||||
className="size-auto"
|
||||
/>
|
||||
</span>
|
||||
)
|
||||
},
|
||||
a: (props) => {
|
||||
const { href = "" } = props
|
||||
const { href = "", ...rest } = props
|
||||
if (href.startsWith("#")) {
|
||||
return <a {...props} />
|
||||
}
|
||||
if (href.startsWith("../posts/")) {
|
||||
return (
|
||||
<a
|
||||
href={href
|
||||
.replace("../posts/", "/blog/")
|
||||
.replace(".md", "")}
|
||||
{...rest}
|
||||
/>
|
||||
)
|
||||
}
|
||||
return <a target="_blank" rel="noopener noreferrer" {...props} />
|
||||
},
|
||||
}}
|
||||
|
@ -9,34 +9,34 @@ export const BlogPosts = async (): Promise<JSX.Element> => {
|
||||
|
||||
return (
|
||||
<div className="flex w-full items-center justify-center p-8">
|
||||
<div className="w-[1600px]" data-cy="blog-posts">
|
||||
{posts.map((post, index) => {
|
||||
<ul className="w-[1600px]" data-cy="blog-posts">
|
||||
{posts.map((post) => {
|
||||
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>
|
||||
<li key={post.slug}>
|
||||
<Link href={`/blog/${post.slug}`} locale="en" data-cy={post.slug}>
|
||||
<ShadowContainer className="cursor-pointer p-6 transition-all duration-300 ease-in-out hover:scale-[1.02]">
|
||||
<h2
|
||||
data-cy="blog-post-title"
|
||||
className="text-xl font-semibold text-primary dark:text-primary-dark"
|
||||
>
|
||||
{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>
|
||||
</li>
|
||||
)
|
||||
})}
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
@ -19,13 +19,13 @@ 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** ?
|
||||
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.
|
||||
Code that works is great, but not enough, even if the code will be read and understood by the computer, 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.
|
||||
|
||||
|
@ -84,7 +84,10 @@ git add .
|
||||
git add <file>
|
||||
|
||||
# Commit changes
|
||||
git commit -m "chore: initial commit"
|
||||
git commit -m "Commit message"
|
||||
|
||||
# Commit changes in the past
|
||||
git commit --date "10 day ago" -m "Commit message"
|
||||
|
||||
# Add remote repository
|
||||
git remote add <remote> <url>
|
||||
@ -151,6 +154,17 @@ git reset --soft <branch>
|
||||
# (by first being on the branch where you want to apply the commit)
|
||||
git cherry-pick <commit>
|
||||
|
||||
# To avoid creating duplicated commits with cherry-pick, we can use rebase after cherry-pick.
|
||||
# <target-branch> being the commit where you want to apply the commit to cherry-pick.
|
||||
# <from-branch> being the branch where the commit to cherry-pick is.
|
||||
git rebase <target-branch> <from-branch>
|
||||
|
||||
# If, by mistake, you have started a branch from the wrong base branch, you can rebase the branch on the correct base branch.
|
||||
# For example, if you have started a branch `feature-2` from `feature` instead of `develop`, you can rebase the branch on `develop`.
|
||||
git rebase --onto <new-base-branch> <old-base-branch> <branch>
|
||||
# For example:
|
||||
git rebase --onto develop feature feature-2
|
||||
|
||||
# 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)
|
||||
@ -242,6 +256,32 @@ There are many ways to organize the work, but the most popular ones are:
|
||||
|
||||
They are called **Git workflows**, or **Git branching strategies**.
|
||||
|
||||
## Tips and tricks
|
||||
|
||||
### `diff-commits` alias
|
||||
|
||||
The `git diff` command allows you to compare the changes between two commits, branches, etc.
|
||||
|
||||
Sometimes, you want to compare what commits have been made between two branches, without looking at the changes in the files, to do so, we can create an `alias` in `.gitconfig`:
|
||||
|
||||
```sh
|
||||
[alias]
|
||||
diff-commits = !sh -c 'echo -n "Commits in $2 not in $1 \\(" && printf "%d" $(git cherry -v $1 $2 | wc -l) && echo "\\)" && git cherry -v $1 $2 && echo "" && echo -n "Commits in $1 not in $2 \\(" && printf "%d" $(git cherry -v $2 $1 | wc -l) && echo "\\)" && git cherry -v $2 $1' -
|
||||
```
|
||||
|
||||
With this alias, we can compare the commits between `main` and `develop` branches for example:
|
||||
|
||||
```sh
|
||||
$ git diff-commits main develop
|
||||
|
||||
Commits in develop not in main (2)
|
||||
+ 9b80e0724df8454b43bc3935a1bffb67615572d7 feat: new feature
|
||||
+ 50721f8ecb60ff023bdccc1873ec1e20ee0b21a0 feat: new feature 2
|
||||
|
||||
Commits in main not in develop (1)
|
||||
- f7bb9d2af7763e0a311099e880e8bf7d6b51bf4d fix: urgent hotfix
|
||||
```
|
||||
|
||||
## 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.
|
||||
|
@ -41,13 +41,13 @@ Find the right balance, between abstraction and simple implementation, start sim
|
||||
|
||||
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**.
|
||||
I made this mistake while developing [Thream](../posts/thream-v1-0-0.md), 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:
|
||||
In my example for [Thream](../posts/thream-v1-0-0.md), I could release a v1.0.0 without these features:
|
||||
|
||||
- English/French translation (could be only English)
|
||||
- Light/Dark theme (could be only Dark)
|
||||
@ -55,7 +55,7 @@ In my example for [Thream](https://thream.theoludwig.fr), I could release a v1.0
|
||||
- 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 probably more, what was really required with [Thream](../posts/thream-v1-0-0.md), 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**.
|
||||
|
||||
|
@ -15,7 +15,7 @@ We don't want to "reinvent the wheel" and rewrite everything from scratch for ea
|
||||
|
||||
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.
|
||||
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 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.
|
||||
|
||||
@ -240,7 +240,7 @@ Here is a list of classes of functions that are commonly encountered when analyz
|
||||
|
||||
### 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.
|
||||
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.
|
||||
|
||||
@ -286,7 +286,7 @@ Contiguous subarray is any sub series of elements in a given array that are cont
|
||||
|
||||
**Explanation:** The subarray with the largest sum is `[2, 4, -3, 5, 2]` which has a sum of `10`.
|
||||
|
||||
### Worst solution: Brute force
|
||||
### Worst solution: Brute force ($O(n^3)$)
|
||||
|
||||
```python
|
||||
def maximum_subarray_sum_cubic(array: list[int]) -> int:
|
||||
@ -309,7 +309,7 @@ def maximum_subarray_sum_cubic(array: list[int]) -> int:
|
||||
return best_sum
|
||||
```
|
||||
|
||||
### Better solution: Linear time
|
||||
### Better solution: Linear time ($O(n)$)
|
||||
|
||||
```python
|
||||
def maximum_subarray_sum_linear(array: list[int]) -> int:
|
||||
|
@ -5,15 +5,25 @@ isPublished: true
|
||||
publishedOn: "2022-04-11T10:24:55.206Z"
|
||||
---
|
||||
|
||||
⚠️ **Thream** is **not maintained anymore**, and is no longer accessible on ~~[thream.theoludwig.fr](https://thream.theoludwig.fr)`~~.
|
||||
|
||||
While the project taught me a lot, it had too much ambitions for new features, with nearly no users, and no contributors.
|
||||
|
||||
You can still use the code as you wish and fork it to maintain it yourself, as the code is completely open source on [GitHub](https://github.com/Thream).
|
||||
|
||||
This blog post is still available to explain the project, and how it was implemented.
|
||||
|
||||
---
|
||||
|
||||
Hello! 👋
|
||||
|
||||
After months of hard work, [Thream v1.0.0](https://thream.theoludwig.fr/) has been released! 🎉
|
||||
After months of hard work, [Thream v1.0.0](https://github.com/Thream) 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.
|
||||
[**Thream**](https://github.com/Thream) 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.
|
||||
[**Thream**](https://github.com/Thream) 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.
|
||||
|
||||
@ -23,7 +33,7 @@ The idea is that a user can create an account to authenticate with an email addr
|
||||
|
||||

|
||||
|
||||
[**Thream**](https://thream.theoludwig.fr/) is a website that works on any recent browser, accessible on [thream.theoludwig.fr](https://thream.theoludwig.fr/).
|
||||
[**Thream**](https://github.com/Thream) is a website that works on any recent browser.
|
||||
|
||||
## History
|
||||
|
||||
@ -115,5 +125,3 @@ The other interest of the project is that it is completely **open-source**, and
|
||||
**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/).
|
||||
|
@ -1,32 +0,0 @@
|
||||
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
|
||||
}
|
@ -9,7 +9,7 @@ export const FooterText = (): JSX.Element => {
|
||||
<p>
|
||||
<Link
|
||||
href="/"
|
||||
className="text-yellow hover:underline dark:text-yellow-dark"
|
||||
className="font-semibold text-primary hover:underline dark:text-primary-dark"
|
||||
>
|
||||
Théo LUDWIG
|
||||
</Link>{" "}
|
||||
|
@ -16,7 +16,7 @@ export const FooterVersion = (props: FooterVersionProps): JSX.Element => {
|
||||
Version{" "}
|
||||
<a
|
||||
data-cy="version-link"
|
||||
className="text-yellow hover:underline dark:text-yellow-dark"
|
||||
className="font-semibold text-primary hover:underline dark:text-primary-dark"
|
||||
href={versionLink}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
|
@ -1,9 +1,10 @@
|
||||
import { getVersion } from "@/utils/getVersion"
|
||||
|
||||
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()
|
||||
const version = await getVersion()
|
||||
|
||||
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">
|
||||
|
@ -1,7 +1,5 @@
|
||||
import Image from "next/image"
|
||||
|
||||
import type { CookiesStore } from "@/utils/constants"
|
||||
import { useI18n } from "@/i18n/i18n.client"
|
||||
import type { CookiesStore } from "@/utils/constants"
|
||||
|
||||
export interface LocaleFlagProps {
|
||||
locale: string
|
||||
@ -14,17 +12,8 @@ export const LocaleFlag = (props: LocaleFlagProps): JSX.Element => {
|
||||
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>
|
||||
</>
|
||||
<p data-cy="locale-flag-text" className="mx-2 text-lg font-semibold">
|
||||
{i18n.translate(`common.${locale}`)}
|
||||
</p>
|
||||
)
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ export const Locales = (props: LocalesProps): JSX.Element => {
|
||||
return (
|
||||
<li
|
||||
key={locale}
|
||||
className="flex h-12 w-full items-center justify-center hover:bg-[#4f545c] hover:bg-opacity-20"
|
||||
className="flex h-12 w-full items-center justify-center hover:bg-[#4f545c]/20"
|
||||
onClick={async () => {
|
||||
return await handleLocale(locale)
|
||||
}}
|
||||
|
@ -30,35 +30,35 @@ export const SwitchTheme = (props: SwitchThemeProps): JSX.Element => {
|
||||
<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",
|
||||
"absolute inset-y-0 left-[8px] my-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 className="relative flex size-[10px] items-center justify-center">
|
||||
🌜
|
||||
</span>
|
||||
</div>
|
||||
<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]",
|
||||
"absolute inset-y-0 right-[10px] my-auto size-[10px] leading-[0]",
|
||||
{
|
||||
"opacity-100": theme === "light",
|
||||
"opacity-0": theme === "dark",
|
||||
},
|
||||
)}
|
||||
>
|
||||
<span className="relative flex h-[10px] w-[10px] items-center justify-center">
|
||||
<span className="relative flex size-[10px] items-center justify-center">
|
||||
🌞
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<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",
|
||||
"absolute top-px box-border size-[22px] rounded-[50%] bg-[#fafafa] text-white transition-all duration-[250ms] ease-in-out",
|
||||
{
|
||||
"left-[27px]": theme === "dark",
|
||||
"left-0": theme === "light",
|
||||
@ -70,7 +70,7 @@ export const SwitchTheme = (props: SwitchThemeProps): JSX.Element => {
|
||||
data-cy="switch-theme-input"
|
||||
type="checkbox"
|
||||
aria-label="Dark mode toggle"
|
||||
className="absolute m-[-1px] h-[1px] w-[1px] overflow-hidden border-0 p-0 hidden"
|
||||
className="absolute -m-px hidden size-px overflow-hidden border-0 p-0"
|
||||
defaultChecked
|
||||
/>
|
||||
</div>
|
||||
|
@ -2,6 +2,7 @@ import { cookies } from "next/headers"
|
||||
import Link from "next/link"
|
||||
import Image from "next/image"
|
||||
|
||||
import Logo from "@/public/images/logo.png"
|
||||
import { getI18n } from "@/i18n/i18n.server"
|
||||
|
||||
import { Locales } from "./Locales"
|
||||
@ -13,27 +14,29 @@ export const Header = (): JSX.Element => {
|
||||
|
||||
return (
|
||||
<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="/">
|
||||
<div className="flex items-center justify-center">
|
||||
<h1>
|
||||
<Link
|
||||
href="/"
|
||||
className="flex items-center justify-center transition-all duration-300 ease-in-out hover:scale-105"
|
||||
>
|
||||
<Image
|
||||
quality={100}
|
||||
width={60}
|
||||
height={60}
|
||||
src="/images/icon_small.png"
|
||||
className="size-16"
|
||||
src={Logo}
|
||||
alt="Théo LUDWIG"
|
||||
priority
|
||||
/>
|
||||
<strong className="ml-1 hidden font-headline font-semibold text-yellow dark:text-yellow-dark xs:block">
|
||||
<strong className="ml-1 hidden font-headline font-semibold text-primary dark:text-primary-dark sm:block sm:text-xl">
|
||||
Théo LUDWIG
|
||||
</strong>
|
||||
</div>
|
||||
</Link>
|
||||
</Link>
|
||||
</h1>
|
||||
<div className="flex justify-between">
|
||||
<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"
|
||||
className="font-semibold text-primary hover:underline dark:text-primary-dark"
|
||||
>
|
||||
Blog
|
||||
</Link>
|
||||
|
@ -1,8 +1,17 @@
|
||||
import htmlParser from "html-react-parser"
|
||||
import { faCode, faMicrochip } from "@fortawesome/free-solid-svg-icons"
|
||||
import { faGit } from "@fortawesome/free-brands-svg-icons"
|
||||
|
||||
export const InterestsIcons = {
|
||||
code: faCode,
|
||||
"open-source": faGit,
|
||||
"high-tech": faMicrochip,
|
||||
} as const
|
||||
|
||||
export interface InterestParagraphProps {
|
||||
title: string
|
||||
description: string
|
||||
id: keyof typeof InterestsIcons
|
||||
}
|
||||
|
||||
export const InterestParagraph = (
|
||||
@ -11,14 +20,11 @@ export const InterestParagraph = (
|
||||
const { title, description } = props
|
||||
|
||||
return (
|
||||
<>
|
||||
<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>{htmlParser(description)}</span>
|
||||
</p>
|
||||
</>
|
||||
<div className="my-6 text-center text-gray dark:text-gray-dark">
|
||||
<h3 className="text-lg font-semibold text-primary dark:text-primary-dark">
|
||||
{title}
|
||||
</h3>
|
||||
<p className="my-2">{htmlParser(description)}</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
@ -10,9 +10,9 @@ export const InterestItem = (props: InterestItemProps): JSX.Element => {
|
||||
const { fontAwesomeIcon, title } = props
|
||||
|
||||
return (
|
||||
<li className="interest-item mx-2 my-2 h-8 w-8" title={title}>
|
||||
<li className="m-2 size-8" title={title}>
|
||||
<FontAwesomeIcon
|
||||
className="block h-full w-full text-yellow dark:text-yellow-dark"
|
||||
className="block size-full text-primary dark:text-primary-dark"
|
||||
icon={fontAwesomeIcon}
|
||||
/>
|
||||
</li>
|
||||
|
@ -1,18 +1,28 @@
|
||||
import { faCode, faMicrochip } from "@fortawesome/free-solid-svg-icons"
|
||||
import { faGit } from "@fortawesome/free-brands-svg-icons"
|
||||
import { getI18n } from "@/i18n/i18n.server"
|
||||
|
||||
import {
|
||||
InterestsIcons,
|
||||
type InterestParagraphProps,
|
||||
} from "../InterestParagraph"
|
||||
import { InterestItem } from "./InterestItem"
|
||||
|
||||
export const InterestsList = (): JSX.Element => {
|
||||
const i18n = getI18n()
|
||||
|
||||
let paragraphs = i18n.translate<InterestParagraphProps[]>(
|
||||
"home.interests.paragraphs",
|
||||
)
|
||||
if (!Array.isArray(paragraphs)) {
|
||||
paragraphs = []
|
||||
}
|
||||
|
||||
return (
|
||||
<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}
|
||||
/>
|
||||
<InterestItem title="Open-Source enthusiast" fontAwesomeIcon={faGit} />
|
||||
{paragraphs.map(({ title, id }) => {
|
||||
const icon = InterestsIcons[id]
|
||||
return <InterestItem key={id} title={title} fontAwesomeIcon={icon} />
|
||||
})}
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
|
@ -16,8 +16,8 @@ export const Interests = (): JSX.Element => {
|
||||
|
||||
return (
|
||||
<div className="max-w-full">
|
||||
{paragraphs.map((paragraph, index) => {
|
||||
return <InterestParagraph key={index} {...paragraph} />
|
||||
{paragraphs.map((paragraph) => {
|
||||
return <InterestParagraph key={paragraph.id} {...paragraph} />
|
||||
})}
|
||||
<InterestsList />
|
||||
</div>
|
||||
|
@ -11,14 +11,18 @@ 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">
|
||||
<li>
|
||||
<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>
|
||||
<ShadowContainer className="relative !mb-4 max-h-32 cursor-pointer p-6 transition-all duration-300 ease-in-out hover:scale-[1.03]">
|
||||
<h3 className="flex">
|
||||
<GitHubIcon className="mr-2 h-6" />
|
||||
<span className="font-semibold text-primary dark:text-primary-dark">
|
||||
{name}
|
||||
</span>
|
||||
</h3>
|
||||
<p className="my-4">{description}</p>
|
||||
</ShadowContainer>
|
||||
</a>
|
||||
</ShadowContainer>
|
||||
</li>
|
||||
)
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ export const OpenSource = (): JSX.Element => {
|
||||
<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">
|
||||
<ul 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 ✨🐢🚀✨"
|
||||
@ -22,16 +22,16 @@ export const OpenSource = (): JSX.Element => {
|
||||
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"
|
||||
name="DefinitelyTyped/DefinitelyTyped"
|
||||
description="High quality TypeScript type definitions."
|
||||
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits?author=theoludwig"
|
||||
/>
|
||||
<Repository
|
||||
name="vercel/next.js"
|
||||
description="The React Framework"
|
||||
href="https://github.com/vercel/next.js/commits?author=theoludwig"
|
||||
/>
|
||||
</div>
|
||||
</ul>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ export const PortfolioItem = (props: PortfolioItemProps): JSX.Element => {
|
||||
const { title, description, link, image } = props
|
||||
|
||||
return (
|
||||
<ShadowContainer className="relative cursor-pointer items-center sm:ml-10">
|
||||
<li>
|
||||
<a
|
||||
className="group inline-flex justify-center"
|
||||
target="_blank"
|
||||
@ -21,23 +21,25 @@ export const PortfolioItem = (props: PortfolioItemProps): JSX.Element => {
|
||||
href={link}
|
||||
aria-label={title}
|
||||
>
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
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="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>
|
||||
</div>
|
||||
<ShadowContainer className="relative cursor-pointer items-center sm:ml-10">
|
||||
<div className="flex justify-center">
|
||||
<Image
|
||||
quality={100}
|
||||
className="size-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="absolute bottom-0 h-auto overflow-hidden text-center opacity-0 transition-opacity duration-500 group-hover:opacity-100">
|
||||
<h3 className="my-6 text-2xl font-semibold text-primary dark:text-primary-dark">
|
||||
{title}
|
||||
</h3>
|
||||
<p className="mx-4 my-6 font-semibold">{description}</p>
|
||||
</div>
|
||||
</ShadowContainer>
|
||||
</a>
|
||||
</ShadowContainer>
|
||||
</li>
|
||||
)
|
||||
}
|
||||
|
@ -12,10 +12,10 @@ export const Portfolio = (): JSX.Element => {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex w-full flex-wrap justify-center px-3">
|
||||
{items.map((item, index) => {
|
||||
return <PortfolioItem key={index} {...item} />
|
||||
<ul className="flex w-full flex-wrap justify-center px-3">
|
||||
{items.map((item) => {
|
||||
return <PortfolioItem key={item.title} {...item} />
|
||||
})}
|
||||
</div>
|
||||
</ul>
|
||||
)
|
||||
}
|
||||
|
@ -1,23 +1,21 @@
|
||||
import htmlParser from "html-react-parser"
|
||||
|
||||
import { getI18n } from "@/i18n/i18n.server"
|
||||
|
||||
export const ProfileDescriptionBottom = (): JSX.Element => {
|
||||
const i18n = getI18n()
|
||||
|
||||
return (
|
||||
<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>
|
||||
<div className="my-6 max-w-md text-center text-base text-gray dark:text-gray-dark">
|
||||
<p>{htmlParser(i18n.translate("home.about.description-bottom"))}</p>
|
||||
|
||||
<br />
|
||||
<a
|
||||
href="/curriculum-vitae/index.html"
|
||||
className="font-semibold text-primary hover:underline dark:text-primary-dark"
|
||||
>
|
||||
Curriculum vitæ ({i18n.translate("common.fr-FR")})
|
||||
</a>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
@ -5,7 +5,7 @@ export const ProfileInformation = (): JSX.Element => {
|
||||
|
||||
return (
|
||||
<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">
|
||||
<h1 className="mb-2 text-4xl font-semibold text-primary dark:text-primary-dark">
|
||||
Théo LUDWIG
|
||||
</h1>
|
||||
<h2 className="mb-3 text-base">
|
||||
|
@ -5,6 +5,7 @@ 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 { useIsMounted } from "@/hooks/useIsMounted"
|
||||
|
||||
import { ProfileItem } from "./ProfileItem"
|
||||
|
||||
@ -21,6 +22,8 @@ export const ProfileList = (props: ProfileListProps): JSX.Element => {
|
||||
return getAge(BIRTH_DATE)
|
||||
}, [])
|
||||
|
||||
const { isMounted } = useIsMounted()
|
||||
|
||||
return (
|
||||
<ul className="m-0 list-none p-0">
|
||||
<ProfileItem
|
||||
@ -29,10 +32,15 @@ export const ProfileList = (props: ProfileListProps): JSX.Element => {
|
||||
/>
|
||||
<ProfileItem
|
||||
title={i18n.translate("home.about.birth-date")}
|
||||
value={`${BIRTH_DATE_STRING} (${age} ${i18n.translate(
|
||||
"home.about.years-old",
|
||||
)})`}
|
||||
value={
|
||||
isMounted
|
||||
? `${BIRTH_DATE_STRING} (${age} ${i18n.translate(
|
||||
"home.about.years-old",
|
||||
)})`
|
||||
: BIRTH_DATE_STRING
|
||||
}
|
||||
/>
|
||||
|
||||
<ProfileItem
|
||||
title={i18n.translate("home.about.nationality")}
|
||||
value="Alsace, France"
|
||||
|
@ -1,6 +1,6 @@
|
||||
import Image from "next/image"
|
||||
|
||||
import Logo from "public/images/logo.png"
|
||||
import Logo from "@/public/images/logo.png"
|
||||
|
||||
export const ProfileLogo = (): JSX.Element => {
|
||||
return (
|
||||
|
@ -8,7 +8,7 @@ export const Icon = (props: React.SVGProps<SVGSVGElement>): JSX.Element => {
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
viewBox="0 0 24 24"
|
||||
className={classNames(
|
||||
"h-8 w-8 fill-current text-black dark:text-white",
|
||||
"size-8 fill-current text-black dark:text-white",
|
||||
className,
|
||||
)}
|
||||
{...rest}
|
||||
|
@ -13,7 +13,7 @@ export const SocialMediaItem = (props: SocialMediaItemProps): JSX.Element => {
|
||||
aria-label={ariaLabel}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="relative inline-block bg-transparent"
|
||||
className="relative inline-block bg-transparent transition-all duration-300 ease-in-out hover:scale-110"
|
||||
>
|
||||
{children}
|
||||
</a>
|
||||
|
@ -9,7 +9,7 @@ import { NPMIcon } from "./SocialMediaIcons/NPMIcon"
|
||||
|
||||
export const SocialMediaList = (): JSX.Element => {
|
||||
return (
|
||||
<ul className="social-media-list m-0 mt-2 list-none py-4 text-center">
|
||||
<ul className="m-0 mt-2 list-none py-4 text-center">
|
||||
<SocialMediaItem link="https://github.com/theoludwig" ariaLabel="GitHub">
|
||||
<GitHubIcon />
|
||||
</SocialMediaItem>
|
||||
|
@ -27,23 +27,23 @@ export const SkillComponent = (props: SkillComponentProps): JSX.Element => {
|
||||
}
|
||||
|
||||
return (
|
||||
<a
|
||||
href={skillProperties.link}
|
||||
className="mx-2 max-w-xl text-yellow hover:underline dark:text-yellow-dark"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<div className="text-center">
|
||||
<li>
|
||||
<a
|
||||
href={skillProperties.link}
|
||||
className="mx-2 flex max-w-xl flex-col items-center justify-center text-center text-primary hover:underline dark:text-primary-dark"
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
>
|
||||
<Image
|
||||
className="inline h-16 w-16"
|
||||
className="inline size-16"
|
||||
quality={100}
|
||||
width={64}
|
||||
height={64}
|
||||
alt={skill}
|
||||
src={getImage()}
|
||||
/>
|
||||
<p className="mt-1">{skill}</p>
|
||||
</div>
|
||||
</a>
|
||||
<p className="mt-1 font-semibold">{skill}</p>
|
||||
</a>
|
||||
</li>
|
||||
)
|
||||
}
|
||||
|
@ -13,12 +13,12 @@ export const SkillsSection = (props: SkillsSectionProps): JSX.Element => {
|
||||
<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-white dark:border-opacity-10">
|
||||
<h3 className="my-3 text-xl font-semibold text-yellow dark:text-yellow-dark">
|
||||
<div className="mb-8 border-b border-gray-600 dark:border-white/10">
|
||||
<h3 className="my-3 text-xl font-semibold text-primary dark:text-primary-dark">
|
||||
{title}
|
||||
</h3>
|
||||
</div>
|
||||
<div className="flex flex-wrap justify-around">{children}</div>
|
||||
<ul className="flex flex-wrap justify-around">{children}</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -16,7 +16,7 @@ export const Loader = (props: LoaderProps): JSX.Element => {
|
||||
height,
|
||||
}}
|
||||
className={classNames(
|
||||
"animate-spin inline-block border-[3px] border-current border-t-transparent text-yellow dark:text-yellow-dark rounded-full",
|
||||
"inline-block animate-spin rounded-full border-[3px] border-current border-t-transparent text-primary dark:text-primary-dark",
|
||||
className,
|
||||
)}
|
||||
role="status"
|
||||
|
@ -4,7 +4,10 @@ export const SectionHeading = (props: SectionHeadingProps): JSX.Element => {
|
||||
const { children, ...rest } = props
|
||||
|
||||
return (
|
||||
<h2 {...rest} className="mb-3 mt-1 text-center text-4xl font-semibold">
|
||||
<h2
|
||||
{...rest}
|
||||
className="mb-3 mt-1 text-center text-4xl font-semibold text-primary dark:text-primary-dark"
|
||||
>
|
||||
{children}
|
||||
</h2>
|
||||
)
|
||||
|
@ -57,8 +57,8 @@ export const Section = (props: SectionProps): JSX.Element => {
|
||||
</p>
|
||||
) : null}
|
||||
<div className="w-full px-3">
|
||||
<ShadowContainer>
|
||||
<div className="w-full px-16 py-4 leading-8">{children}</div>
|
||||
<ShadowContainer className="w-full px-2 py-4 leading-8 sm:px-16">
|
||||
{children}
|
||||
</ShadowContainer>
|
||||
</div>
|
||||
</section>
|
||||
|
@ -3,14 +3,14 @@
|
||||
"basics": {
|
||||
"name": "Théo LUDWIG",
|
||||
"label": "Développeur Full Stack • Étudiant",
|
||||
"image": "https://theoludwig.fr/images/logo_orange.png",
|
||||
"image": "https://theoludwig.fr/images/logo_background.png",
|
||||
"email": "contact@theoludwig.fr",
|
||||
"age": "31/03/2003",
|
||||
"location": {
|
||||
"address": "Alsace, France"
|
||||
"address": "Alsace, France",
|
||||
},
|
||||
"url": "https://theoludwig.fr",
|
||||
"summary": "Je suis étudiant à l'université suivant la formation \"BUT Informatique\" et me forme en autodidacte dans l'informatique en suivant des formations en ligne. <br/> Je mets en pratique tout ce que j'apprends et réalise de nombreux projets (disponible sur <a href=\"https://theoludwig.fr\">theoludwig.fr</a>)."
|
||||
"summary": "Je me demande constamment comment améliorer notre présent, afin de rendre notre futur meilleur, particulièrement grâce aux progrès de l'informatique. <br /> Ma priorité réside dans la création d'expériences utilisateurs (UX) intuitives, répondant aux besoins des utilisateurs de la manière la plus efficace que possible.",
|
||||
},
|
||||
"education": [
|
||||
{
|
||||
@ -24,8 +24,8 @@
|
||||
"Intégration/Déploiement Continue et Docker",
|
||||
"Complexité Algorithmique Théorique et Pratique en C++",
|
||||
// "Projet développement LLM (Large Language Model) et NLP (Natural Language Processing)",
|
||||
"Base de données NoSQL (Redis, MongoDB, Cassandra)"
|
||||
]
|
||||
"Base de données NoSQL (Redis, MongoDB, Cassandra)",
|
||||
],
|
||||
},
|
||||
{
|
||||
"startDate": "2022",
|
||||
@ -38,8 +38,8 @@
|
||||
"Qualité de développement et Tests automatisés",
|
||||
"Patrons et Principes de conceptions (Code maintenable et réutilisable) en UML",
|
||||
"Programmation systèmes en C (Multi-Thread, Serveur/Client UDP/TCP)",
|
||||
"Sécurisation des accès à la base de données et PL/SQL"
|
||||
]
|
||||
"Sécurisation des accès à la base de données et PL/SQL",
|
||||
],
|
||||
},
|
||||
{
|
||||
"startDate": "2021",
|
||||
@ -51,16 +51,16 @@
|
||||
"Développement Orientée Objet en Java",
|
||||
"Programmation systèmes en C (Allocation mémoire, Pointeurs, Structures)",
|
||||
"Développement d'application Windows Forms (.NET Framework) en C#",
|
||||
"Base de données relationnelles et langage SQL"
|
||||
]
|
||||
"Base de données relationnelles et langage SQL",
|
||||
],
|
||||
},
|
||||
{
|
||||
"startDate": "2019",
|
||||
"endDate": "2021",
|
||||
"studyType": "Baccalauréat Général (Mathématiques et Numériques Sciences Informatiques)",
|
||||
"institution": "Lycée Heinrich Nessel à Haguenau",
|
||||
"score": "Mention Assez Bien"
|
||||
}
|
||||
"score": "Mention Assez Bien",
|
||||
},
|
||||
// {
|
||||
// "startDate": "2014",
|
||||
// "endDate": "2018",
|
||||
@ -78,7 +78,7 @@
|
||||
"position": "Alternant Développeur Web Full Stack",
|
||||
"startDate": "2023-08-28",
|
||||
"endDate": "2024-09-02",
|
||||
"duration": "1 an"
|
||||
"duration": "1 an",
|
||||
},
|
||||
{
|
||||
"summary": "Développement d'un outil GED (Gestion Électronique de Documents) en React.js, Laravel et GraphQL.",
|
||||
@ -88,7 +88,7 @@
|
||||
"position": "Stagiaire Développeur Web Full Stack",
|
||||
"startDate": "2023-04-11",
|
||||
"endDate": "2023-07-26",
|
||||
"duration": "4 mois"
|
||||
"duration": "4 mois",
|
||||
},
|
||||
// {
|
||||
// "summary": "Agent administratif - Numérisation et archivage des plans électriques initialement sous format papier calque.",
|
||||
@ -108,7 +108,7 @@
|
||||
"position": "Stage initiation métier développeur web",
|
||||
"startDate": "2019-06-17",
|
||||
"endDate": "2019-06-21",
|
||||
"duration": "1 semaine"
|
||||
"duration": "1 semaine",
|
||||
},
|
||||
{
|
||||
"description": "interests",
|
||||
@ -118,7 +118,7 @@
|
||||
"position": "Participation en équipe de 5 personnes",
|
||||
"startDate": "2021-12-02",
|
||||
"endDate": "2021-12-03",
|
||||
"duration": "1 semaine"
|
||||
"duration": "1 semaine",
|
||||
},
|
||||
{
|
||||
"description": "interests",
|
||||
@ -129,8 +129,8 @@
|
||||
"position": "Initiation métier Développeur web",
|
||||
"startDate": "2019-06-24",
|
||||
"endDate": "2019-06-28",
|
||||
"duration": "1 semaine"
|
||||
}
|
||||
"duration": "1 semaine",
|
||||
},
|
||||
// {
|
||||
// "summary": "Apprentissage du métier \"Chargé de communication\" et des logiciels de graphisme tels que \"Adobe Photoshop\".",
|
||||
// "website": "https://es.fr/",
|
||||
@ -144,24 +144,24 @@
|
||||
],
|
||||
"interests": [
|
||||
{
|
||||
"name": "Enthousiaste de l'Open-Source"
|
||||
"name": "Enthousiaste de l'Open-Source",
|
||||
},
|
||||
{
|
||||
"name": "Passionné de High-Tech"
|
||||
}
|
||||
"name": "Passionné de High-Tech",
|
||||
},
|
||||
],
|
||||
"skills": [
|
||||
{
|
||||
"keywords": ["JavaScript/TypeScript", "Python", "C/C++", "PHP"],
|
||||
"name": "Langages de programmation"
|
||||
"name": "Langages de programmation",
|
||||
},
|
||||
{
|
||||
"keywords": ["HTML", "CSS", "Tailwind CSS", "React.js/Next.js"],
|
||||
"name": "Frontend"
|
||||
"name": "Frontend",
|
||||
},
|
||||
{
|
||||
"keywords": ["Laravel", "Node.js", "Fastify", "PostgreSQL"],
|
||||
"name": "Backend"
|
||||
"name": "Backend",
|
||||
},
|
||||
{
|
||||
"keywords": [
|
||||
@ -169,13 +169,13 @@
|
||||
"Arch Linux",
|
||||
"Visual Studio Code",
|
||||
"Git",
|
||||
"Docker"
|
||||
"Docker",
|
||||
],
|
||||
"name": "Logiciels et outils"
|
||||
"name": "Logiciels et outils",
|
||||
},
|
||||
{
|
||||
"keywords": ["Permis B", "Anglais"],
|
||||
"name": "Autres"
|
||||
}
|
||||
]
|
||||
"name": "Autres",
|
||||
},
|
||||
],
|
||||
}
|
||||
|
689
curriculum-vitae/package-lock.json
generated
@ -9,13 +9,13 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"jsonc-parser": "3.2.0",
|
||||
"jsonc-parser": "3.2.1",
|
||||
"modern-normalize": "2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "20.10.5",
|
||||
"date-and-time": "3.0.3",
|
||||
"vite": "5.0.10",
|
||||
"vite-plugin-html": "3.2.1"
|
||||
"@types/node": "20.12.12",
|
||||
"date-and-time": "3.3.0",
|
||||
"vite": "5.2.11",
|
||||
"vite-plugin-html": "3.2.2"
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ describe("Common > Header", () => {
|
||||
cy.get("[data-cy=locales-list]").should("not.be.visible")
|
||||
cy.get("[data-cy=locale-click]").click()
|
||||
cy.get("[data-cy=locales-list]").should("be.visible")
|
||||
cy.get("h1").click()
|
||||
cy.get("main h1").click()
|
||||
cy.get("[data-cy=locales-list]").should("not.be.visible")
|
||||
})
|
||||
})
|
||||
|
@ -2,8 +2,7 @@ describe("Page /blog/[slug]", () => {
|
||||
it("should displays the first blog post (`hello-world`)", () => {
|
||||
cy.visit("/blog/hello-world")
|
||||
cy.get("[data-cy=locale-flag-text]").should("not.exist")
|
||||
cy.get("h1").should("have.text", "👋 Hello, world!")
|
||||
cy.get(".prose a:visible").should("have.attr", "target", "_blank")
|
||||
cy.get("main h1").should("have.text", "👋 Hello, world!")
|
||||
})
|
||||
|
||||
it("should redirect to /404 if the blog post doesn't exist", () => {
|
||||
|
15
hooks/useIsMounted.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { useEffect, useState } from "react"
|
||||
|
||||
export interface UseIsMountedResult {
|
||||
isMounted: boolean
|
||||
}
|
||||
|
||||
export const useIsMounted = (): UseIsMountedResult => {
|
||||
const [isMounted, setIsMounted] = useState(false)
|
||||
|
||||
useEffect(() => {
|
||||
setIsMounted(true)
|
||||
}, [])
|
||||
|
||||
return { isMounted }
|
||||
}
|
@ -25,6 +25,6 @@ const translations = {
|
||||
|
||||
export const i18n = new I18n(translations, {
|
||||
defaultLocale: DEFAULT_LOCALE,
|
||||
availableLocales: LOCALES.slice(),
|
||||
availableLocales: [...LOCALES],
|
||||
enableFallback: true,
|
||||
})
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"en-US": "English",
|
||||
"fr-FR": "French",
|
||||
"en-US": "🇺🇸 English",
|
||||
"fr-FR": "🇫🇷 French",
|
||||
"all-rights-reserved": "All rights reserved",
|
||||
"home": "Home"
|
||||
}
|
||||
|
@ -1,27 +1,25 @@
|
||||
{
|
||||
"about": {
|
||||
"description": "Developer Full Stack • Open-Source enthusiast",
|
||||
"description": "Developer Full Stack • Open-Source Enthusiast",
|
||||
"pronouns": "Pronouns",
|
||||
"pronouns-value": "He/Him",
|
||||
"birth-date": "Birth date",
|
||||
"years-old": "years old",
|
||||
"nationality": "Nationality",
|
||||
"description-bottom": "I am a student in computer science following the French training \"BUT Informatique\" and I am also a self-taught."
|
||||
"description-bottom": "I constantly wonder how to <strong>improve our present, to make our future better</strong>, particularly thanks to the advancements in <strong>computer science</strong>."
|
||||
},
|
||||
"interests": {
|
||||
"title": "Interests",
|
||||
"paragraphs": [
|
||||
{
|
||||
"title": "Developer Full Stack",
|
||||
"description": "Computer programming is my main hobby, I love it! <br/> Mostly web development for the moment but I'm programming in others programming language too."
|
||||
"description": "My priority is to craft <strong>intuitive user experiences (<abbr title=\"User Experience\">UX</abbr>)</strong>, that meet the needs of the users <strong>in the most efficient way possible</strong>. <br/> Mainly focused on the development of <strong>Web solutions</strong>. <br/> I am also interested in mobile and desktop application development, among other areas within the field of computer science.",
|
||||
"id": "code"
|
||||
},
|
||||
{
|
||||
"title": "Open-Source enthusiast",
|
||||
"description": "For me, everyone should work, solve problems, build things and think together.<br/> The website is open-source on <a class='text-yellow dark:text-yellow-dark hover:underline' href='https://github.com/theoludwig/theoludwig' target='_blank' rel='noopener noreferrer'>GitHub</a>."
|
||||
},
|
||||
{
|
||||
"title": "Passionate about High-Tech",
|
||||
"description": "I always wondered how the future would be. Every day I want to wake up and think that the future will be great and better than the past. Technologies improve gradually over time, which is very useful in many areas."
|
||||
"title": "Open-Source Enthusiast",
|
||||
"description": "I value the <strong>sharing of knowledge and collaboration</strong> to collectively resolve problems. <br /> The source code of the website is available on <a class='text-primary dark:text-primary-dark hover:underline font-semibold' href='https://github.com/theoludwig/theoludwig' target='_blank' rel='noopener noreferrer'>GitHub</a>.",
|
||||
"id": "open-source"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"en-US": "Anglais",
|
||||
"fr-FR": "Français",
|
||||
"en-US": "🇺🇸 Anglais",
|
||||
"fr-FR": "🇫🇷 Français",
|
||||
"all-rights-reserved": "Tous droits réservés",
|
||||
"home": "Accueil"
|
||||
}
|
||||
|
@ -6,22 +6,20 @@
|
||||
"birth-date": "Date de naissance",
|
||||
"years-old": "ans",
|
||||
"nationality": "Nationalité",
|
||||
"description-bottom": "Je suis étudiant à l'université suivant la formation \"BUT Informatique\" et me forme en autodidacte dans l'informatique en suivant des formations en ligne."
|
||||
"description-bottom": "Je me demande constamment comment <strong>améliorer notre présent, afin de rendre notre futur meilleur</strong>, particulièrement grâce aux progrès de l'<strong>informatique</strong>."
|
||||
},
|
||||
"interests": {
|
||||
"title": "Intérêts",
|
||||
"paragraphs": [
|
||||
{
|
||||
"title": "Développeur Full Stack",
|
||||
"description": "La programmation informatique est mon loisir principal, j'adore! <br/> Principalement du développement Web pour le moment, mais je programme aussi dans d'autres langages de programmation."
|
||||
"description": "Ma priorité réside dans la création d'<strong>expériences utilisateurs (<abbr title=\"User Experience\">UX</abbr>) intuitives</strong>, répondant aux besoins des utilisateurs de la <strong>manière la plus efficace que possible</strong>. <br/> Principalement axé sur l'élaboration de <strong>solutions en Développement Web</strong>. <br/> Je suis également intéressé par le développement d'applications mobiles parmis d'autres domaines de l'informatique.",
|
||||
"id": "code"
|
||||
},
|
||||
{
|
||||
"title": "Enthousiaste de l'Open-Source",
|
||||
"description": "Pour moi, tout le monde devrait travailler, résoudre des problèmes, construire des choses et réfléchir ensemble. <br/> Le site est open-source sur <a class='text-yellow dark:text-yellow-dark hover:underline' href='https://github.com/theoludwig/theoludwig' target='_blank' rel='noopener noreferrer'>GitHub</a>."
|
||||
},
|
||||
{
|
||||
"title": "Passionné de High-Tech",
|
||||
"description": "Je me suis toujours demandé comment l'avenir serait. Chaque jour, je veux me réveiller et penser que l'avenir sera formidable et meilleur que le passé. Les technolgies s'améliorent progressivement avec le temps, ce qui est très utile dans de nombreux domaines."
|
||||
"description": "J'apprécie le <strong>partage des connaissances et la collaboration</strong> pour résoudre des défis collectivement. <br /> Le code source du site est accessible sur <a class='text-primary dark:text-primary-dark hover:underline font-semibold' href='https://github.com/theoludwig/theoludwig' target='_blank' rel='noopener noreferrer'>GitHub</a>.",
|
||||
"id": "open-source"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
13309
package-lock.json
generated
116
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "theoludwig",
|
||||
"version": "3.1.2",
|
||||
"version": "3.3.1",
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@ -13,7 +13,8 @@
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"start": "next start",
|
||||
"build": "npm run curriculum-vitae:build && next build",
|
||||
"build": "npm run build:curriculum-vitae && next build",
|
||||
"build:curriculum-vitae": "node ./curriculum-vitae/build.js",
|
||||
"lint:commit": "commitlint",
|
||||
"lint:editorconfig": "editorconfig-checker",
|
||||
"lint:markdown": "markdownlint-cli2",
|
||||
@ -24,77 +25,74 @@
|
||||
"test:html-w3c-validator": "start-server-and-test \"start\" \"http://127.0.0.1:3000\" \"html-w3c-validator\"",
|
||||
"test:e2e": "start-server-and-test \"start\" http://127.0.0.1:3000 \"cypress run\"",
|
||||
"test:dev": "start-server-and-test \"dev\" \"http://127.0.0.1:3000\" \"cypress open\"",
|
||||
"curriculum-vitae:build": "node ./curriculum-vitae/build.js",
|
||||
"release": "semantic-release",
|
||||
"postinstall": "husky install"
|
||||
"postinstall": "husky"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fontsource/montserrat": "5.0.16",
|
||||
"@formatjs/intl-localematcher": "0.5.2",
|
||||
"@fortawesome/fontawesome-svg-core": "6.5.1",
|
||||
"@fortawesome/free-brands-svg-icons": "6.5.1",
|
||||
"@fortawesome/free-solid-svg-icons": "6.5.1",
|
||||
"@fortawesome/react-fontawesome": "0.2.0",
|
||||
"@giscus/react": "2.4.0",
|
||||
"clsx": "2.0.0",
|
||||
"date-and-time": "3.0.3",
|
||||
"@fontsource/montserrat": "5.0.18",
|
||||
"@formatjs/intl-localematcher": "0.5.4",
|
||||
"@fortawesome/fontawesome-svg-core": "6.5.2",
|
||||
"@fortawesome/free-brands-svg-icons": "6.5.2",
|
||||
"@fortawesome/free-solid-svg-icons": "6.5.2",
|
||||
"@fortawesome/react-fontawesome": "0.2.2",
|
||||
"@giscus/react": "3.0.0",
|
||||
"@shikijs/rehype": "1.6.0",
|
||||
"clsx": "2.1.1",
|
||||
"date-and-time": "3.3.0",
|
||||
"gray-matter": "4.0.3",
|
||||
"html-react-parser": "5.0.11",
|
||||
"i18n-js": "4.3.2",
|
||||
"katex": "0.16.9",
|
||||
"html-react-parser": "5.1.10",
|
||||
"i18n-js": "4.4.3",
|
||||
"katex": "0.16.10",
|
||||
"negotiator": "0.6.3",
|
||||
"next": "14.0.4",
|
||||
"next-mdx-remote": "4.4.1",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"next": "14.1.0",
|
||||
"next-mdx-remote": "5.0.0",
|
||||
"react": "18.3.1",
|
||||
"react-dom": "18.3.1",
|
||||
"read-pkg": "9.0.1",
|
||||
"rehype-katex": "6.0.3",
|
||||
"rehype-raw": "6.1.1",
|
||||
"rehype-slug": "5.1.0",
|
||||
"remark-gfm": "3.0.1",
|
||||
"remark-math": "5.1.1",
|
||||
"sharp": "0.32.6",
|
||||
"shiki": "0.14.7",
|
||||
"unified": "10.1.2",
|
||||
"unist-util-visit": "5.0.0",
|
||||
"universal-cookie": "6.1.1"
|
||||
"rehype-katex": "7.0.0",
|
||||
"rehype-raw": "7.0.0",
|
||||
"rehype-slug": "6.0.0",
|
||||
"remark-gfm": "4.0.0",
|
||||
"remark-math": "6.0.0",
|
||||
"sharp": "0.33.4",
|
||||
"shiki": "1.6.0",
|
||||
"universal-cookie": "7.1.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "18.4.3",
|
||||
"@commitlint/config-conventional": "18.4.3",
|
||||
"@commitlint/cli": "19.2.2",
|
||||
"@commitlint/config-conventional": "19.2.2",
|
||||
"@saithodev/semantic-release-backmerge": "4.0.1",
|
||||
"@semantic-release/git": "10.0.1",
|
||||
"@tailwindcss/typography": "0.5.10",
|
||||
"@tsconfig/strictest": "2.0.2",
|
||||
"@tailwindcss/typography": "0.5.13",
|
||||
"@total-typescript/ts-reset": "0.5.1",
|
||||
"@tsconfig/strictest": "2.0.5",
|
||||
"@types/negotiator": "0.6.3",
|
||||
"@types/node": "20.10.5",
|
||||
"@types/react": "18.2.45",
|
||||
"@types/unist": "3.0.1",
|
||||
"@typescript-eslint/eslint-plugin": "6.16.0",
|
||||
"@typescript-eslint/parser": "6.16.0",
|
||||
"autoprefixer": "10.4.16",
|
||||
"@types/node": "20.12.12",
|
||||
"@types/react": "18.3.2",
|
||||
"@typescript-eslint/eslint-plugin": "7.10.0",
|
||||
"@typescript-eslint/parser": "7.10.0",
|
||||
"autoprefixer": "10.4.19",
|
||||
"curriculum-vitae": "file:./curriculum-vitae",
|
||||
"cypress": "13.6.2",
|
||||
"editorconfig-checker": "5.1.2",
|
||||
"eslint": "8.56.0",
|
||||
"eslint-config-conventions": "13.1.0",
|
||||
"eslint-config-next": "14.0.4",
|
||||
"eslint-config-prettier": "9.1.0",
|
||||
"cypress": "13.10.0",
|
||||
"editorconfig-checker": "5.1.5",
|
||||
"eslint": "8.57.0",
|
||||
"eslint-config-conventions": "14.2.0",
|
||||
"eslint-config-next": "14.1.0",
|
||||
"eslint-plugin-import": "2.29.1",
|
||||
"eslint-plugin-prettier": "5.1.2",
|
||||
"eslint-plugin-promise": "6.1.1",
|
||||
"eslint-plugin-unicorn": "50.0.1",
|
||||
"html-w3c-validator": "1.5.1",
|
||||
"husky": "8.0.3",
|
||||
"lint-staged": "15.2.0",
|
||||
"markdownlint-cli2": "0.11.0",
|
||||
"markdownlint-rule-relative-links": "2.1.2",
|
||||
"postcss": "8.4.32",
|
||||
"prettier": "3.1.1",
|
||||
"prettier-plugin-tailwindcss": "0.5.9",
|
||||
"semantic-release": "22.0.12",
|
||||
"eslint-plugin-tailwindcss": "3.17.0",
|
||||
"eslint-plugin-unicorn": "53.0.0",
|
||||
"html-w3c-validator": "1.6.2",
|
||||
"husky": "9.0.11",
|
||||
"lint-staged": "15.2.4",
|
||||
"markdownlint-cli2": "0.13.0",
|
||||
"markdownlint-rule-relative-links": "2.3.2",
|
||||
"postcss": "8.4.38",
|
||||
"prettier": "3.2.5",
|
||||
"prettier-plugin-tailwindcss": "0.5.14",
|
||||
"semantic-release": "23.1.1",
|
||||
"start-server-and-test": "2.0.3",
|
||||
"tailwindcss": "3.4.0",
|
||||
"typescript": "5.3.3"
|
||||
"tailwindcss": "3.4.3",
|
||||
"typescript": "5.4.5"
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 6.3 KiB |
BIN
public/images/logo_background.png
Normal file
After Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 89 KiB |
@ -8,23 +8,20 @@ const tailwindConfig = {
|
||||
darkMode: "class",
|
||||
theme: {
|
||||
extend: {
|
||||
screens: {
|
||||
xs: "380px",
|
||||
},
|
||||
colors: {
|
||||
black: "#181818",
|
||||
gray: {
|
||||
DEFAULT: "#333333",
|
||||
dark: "#b2bac2",
|
||||
dark: "#b7c0c9",
|
||||
},
|
||||
yellow: {
|
||||
DEFAULT: "#ff6000",
|
||||
dark: "#ffd800",
|
||||
primary: {
|
||||
DEFAULT: "#006cff",
|
||||
dark: "#00aeff",
|
||||
},
|
||||
},
|
||||
boxShadow: {
|
||||
dark: "0px 0px 4px 4px rgba(0, 0, 0, 0.25)",
|
||||
light: "0px 0px 4px 4px rgba(0, 0, 0, 0.10)",
|
||||
dark: "0px 0px 2px 2px rgba(0, 0, 0, 0.25)",
|
||||
light: "0px 0px 2px 2px rgba(0, 0, 0, 0.10)",
|
||||
darkFlag: "0px 1px 10px hsla(0, 0%, 100%, 0.2)",
|
||||
lightFlag: "0px 1px 10px rgba(0, 0, 0, 0.25)",
|
||||
},
|
||||
|
@ -3,14 +3,14 @@
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Node",
|
||||
"lib": ["dom", "dom.iterable", "ESNext"],
|
||||
"moduleResolution": "Bundler",
|
||||
"lib": ["DOM", "DOM.Iterable", "ESNext"],
|
||||
"allowJs": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["./*"]
|
||||
},
|
||||
"types": ["cypress"],
|
||||
"types": ["@total-typescript/ts-reset", "cypress"],
|
||||
"noEmit": true,
|
||||
"resolveJsonModule": true,
|
||||
"jsx": "preserve",
|
||||
@ -25,5 +25,5 @@
|
||||
]
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
|
||||
"exclude": ["node_modules"]
|
||||
"exclude": ["node_modules", ".next"]
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
export const BIRTH_DATE_DAY = "31" as const
|
||||
export const BIRTH_DATE_MONTH = "03" as const
|
||||
export const BIRTH_DATE_YEAR = "2003" as const
|
||||
export const BIRTH_DATE_DAY = "31"
|
||||
export const BIRTH_DATE_MONTH = "03"
|
||||
export const BIRTH_DATE_YEAR = "2003"
|
||||
export const BIRTH_DATE_STRING =
|
||||
`${BIRTH_DATE_DAY}/${BIRTH_DATE_MONTH}/${BIRTH_DATE_YEAR}` as const
|
||||
export const BIRTH_DATE_ISO_8601 =
|
||||
|
8
utils/getVersion.ts
Normal file
@ -0,0 +1,8 @@
|
||||
export const getVersion = async (): Promise<string> => {
|
||||
if (process.env.NODE_ENV === "development") {
|
||||
return "0.0.0-development"
|
||||
}
|
||||
const { readPackage } = await import("read-pkg")
|
||||
const { version } = await readPackage()
|
||||
return version
|
||||
}
|