Compare commits
56 Commits
Author | SHA1 | Date | |
---|---|---|---|
49599d25ed
|
|||
65e0f4f8b6
|
|||
8d60c2d53a
|
|||
0bbebeab99
|
|||
643e0e5821
|
|||
872b018673
|
|||
2644cb0fb5
|
|||
bc719578d2
|
|||
117c41b1c3
|
|||
b92704b77d
|
|||
bab7581283
|
|||
988fceb2aa
|
|||
5211ba1489
|
|||
6886480cef
|
|||
d78e50638e
|
|||
3b76195d71
|
|||
2dc63ba933
|
|||
336f067c52
|
|||
5fd7f77b6d
|
|||
db0c708c04
|
|||
9d44671fed
|
|||
7bcc5f972c | |||
61172d59e3 | |||
7c0f11ab7d | |||
670897fa78 | |||
b88246b668 | |||
87fbfe4940 | |||
271aa60247 | |||
ba34e314c9 | |||
f41bc644b1 | |||
a18cec4826 | |||
61e589f0f4 | |||
dc5c3cee41 | |||
20cb0c21d5 | |||
e5232c1394 | |||
fd51609713 | |||
edf16c2562 | |||
94e0d190ae | |||
b1cf7f8517 | |||
a1a715d3b9 | |||
eede46fb41 | |||
e32c53caa1 | |||
361ea37deb | |||
d49a8a7470 | |||
a4996c8251 | |||
b25451e631 | |||
042a861f58 | |||
d76db36dbc | |||
99d9dcf334 | |||
ece5ded1b4 | |||
1514600998 | |||
5f5b328895 | |||
c88887a322 | |||
014044573a | |||
df009c3f7b | |||
5c85ca2ef1 |
@ -1 +1 @@
|
||||
FROM mcr.microsoft.com/devcontainers/javascript-node:18
|
||||
FROM mcr.microsoft.com/devcontainers/javascript-node:20
|
||||
|
@ -1,21 +1,24 @@
|
||||
{
|
||||
"name": "Divlo",
|
||||
"name": "theoludwig",
|
||||
"dockerComposeFile": "./docker-compose.yml",
|
||||
"service": "workspace",
|
||||
"workspaceFolder": "/workspace",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
"settings": {
|
||||
"remote.autoForwardPorts": false
|
||||
"remote.autoForwardPorts": false,
|
||||
"remote.localPortHost": "allInterfaces"
|
||||
}
|
||||
},
|
||||
"extensions": [
|
||||
"editorconfig.editorconfig",
|
||||
"esbenp.prettier-vscode",
|
||||
"dbaeumer.vscode-eslint",
|
||||
"davidanson.vscode-markdownlint",
|
||||
"bradlc.vscode-tailwindcss",
|
||||
"mikestead.dotenv",
|
||||
"davidanson.vscode-markdownlint",
|
||||
"ms-azuretools.vscode-docker"
|
||||
],
|
||||
"forwardPorts": [3000],
|
||||
"postAttachCommand": ["npm", "install"],
|
||||
]
|
||||
},
|
||||
"remoteUser": "node"
|
||||
}
|
||||
|
@ -6,3 +6,4 @@ services:
|
||||
volumes:
|
||||
- '..:/workspace:cached'
|
||||
command: 'sleep infinity'
|
||||
network_mode: 'host'
|
||||
|
@ -1,12 +1,4 @@
|
||||
.vscode
|
||||
.git
|
||||
.env
|
||||
build
|
||||
.next
|
||||
coverage
|
||||
node_modules
|
||||
tmp
|
||||
temp
|
||||
.DS_Store
|
||||
.lighthouseci
|
||||
.vercel
|
||||
|
@ -1,2 +1,2 @@
|
||||
COMPOSE_PROJECT_NAME=divlo.fr
|
||||
COMPOSE_PROJECT_NAME=theoludwig
|
||||
PORT=3000
|
||||
|
@ -4,13 +4,13 @@
|
||||
"parserOptions": {
|
||||
"project": "./tsconfig.json"
|
||||
},
|
||||
"env": {
|
||||
"node": true,
|
||||
"browser": true
|
||||
},
|
||||
"rules": {
|
||||
"prettier/prettier": "error",
|
||||
"unicorn/prefer-node-protocol": "error",
|
||||
"@next/next/no-img-element": "off"
|
||||
"prettier/prettier": "error"
|
||||
},
|
||||
"overrides": [
|
||||
{
|
||||
"files": ["*.ts", "*.tsx"],
|
||||
"parser": "@typescript-eslint/parser"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@ -1,6 +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. -->
|
||||
|
||||
## What changes this PR introduce?
|
||||
# What changes this PR introduce?
|
||||
|
||||
## List any relevant issue numbers
|
||||
|
||||
|
27
.github/workflows/analyze.yml
vendored
@ -1,27 +0,0 @@
|
||||
name: 'Analyze'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [develop]
|
||||
pull_request:
|
||||
branches: [master, develop]
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
runs-on: 'ubuntu-latest'
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: ['javascript']
|
||||
|
||||
steps:
|
||||
- uses: 'actions/checkout@v3.1.0'
|
||||
|
||||
- name: 'Initialize CodeQL'
|
||||
uses: 'github/codeql-action/init@v2'
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
|
||||
- name: 'Perform CodeQL Analysis'
|
||||
uses: 'github/codeql-action/analyze@v2'
|
10
.github/workflows/build.yml
vendored
@ -10,16 +10,16 @@ jobs:
|
||||
build:
|
||||
runs-on: 'ubuntu-latest'
|
||||
steps:
|
||||
- uses: 'actions/checkout@v3.1.0'
|
||||
- uses: 'actions/checkout@v3.5.3'
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: 'actions/setup-node@v3.5.1'
|
||||
- name: 'Setup Node.js'
|
||||
uses: 'actions/setup-node@v3.6.0'
|
||||
with:
|
||||
node-version: '18.x'
|
||||
cache: 'npm'
|
||||
|
||||
- name: 'Install'
|
||||
run: 'npm install'
|
||||
- name: 'Install dependencies'
|
||||
run: 'npm clean-install'
|
||||
|
||||
- name: 'Build'
|
||||
run: 'npm run build'
|
||||
|
19
.github/workflows/lint.yml
vendored
@ -10,16 +10,16 @@ jobs:
|
||||
lint:
|
||||
runs-on: 'ubuntu-latest'
|
||||
steps:
|
||||
- uses: 'actions/checkout@v3.1.0'
|
||||
- uses: 'actions/checkout@v3.5.3'
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: 'actions/setup-node@v3.5.1'
|
||||
- name: 'Setup Node.js'
|
||||
uses: 'actions/setup-node@v3.6.0'
|
||||
with:
|
||||
node-version: '18.x'
|
||||
cache: 'npm'
|
||||
|
||||
- name: 'Install'
|
||||
run: 'npm install'
|
||||
- name: 'Install dependencies'
|
||||
run: 'npm clean-install'
|
||||
|
||||
- name: 'lint:commit'
|
||||
run: 'npm run lint:commit -- --to "${{ github.sha }}"'
|
||||
@ -30,8 +30,8 @@ jobs:
|
||||
- name: 'lint:markdown'
|
||||
run: 'npm run lint:markdown'
|
||||
|
||||
- name: 'lint:typescript'
|
||||
run: 'npm run lint:typescript'
|
||||
- name: 'lint:eslint'
|
||||
run: 'npm run lint:eslint'
|
||||
|
||||
- name: 'lint:prettier'
|
||||
run: 'npm run lint:prettier'
|
||||
@ -40,8 +40,3 @@ jobs:
|
||||
uses: 'dotenv-linter/action-dotenv-linter@v2'
|
||||
with:
|
||||
github_token: ${{ secrets.github_token }}
|
||||
|
||||
- name: 'lint:docker'
|
||||
uses: 'hadolint/hadolint-action@v1.6.0'
|
||||
with:
|
||||
dockerfile: './Dockerfile'
|
||||
|
19
.github/workflows/release.yml
vendored
@ -8,26 +8,26 @@ jobs:
|
||||
release:
|
||||
runs-on: 'ubuntu-latest'
|
||||
steps:
|
||||
- uses: 'actions/checkout@v3.1.0'
|
||||
- uses: 'actions/checkout@v3.5.3'
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
|
||||
- name: 'Import GPG key'
|
||||
uses: 'crazy-max/ghaction-import-gpg@v4'
|
||||
uses: 'crazy-max/ghaction-import-gpg@v5.3.0'
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
git_user_signingkey: true
|
||||
git_commit_gpgsign: true
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: 'actions/setup-node@v3.5.1'
|
||||
- name: 'Setup Node.js'
|
||||
uses: 'actions/setup-node@v3.6.0'
|
||||
with:
|
||||
node-version: '18.x'
|
||||
cache: 'npm'
|
||||
|
||||
- name: 'Install'
|
||||
run: 'npm install'
|
||||
- name: 'Install dependencies'
|
||||
run: 'npm clean-install'
|
||||
|
||||
- name: 'Release'
|
||||
run: 'npm run release'
|
||||
@ -35,10 +35,3 @@ jobs:
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
GIT_COMMITTER_NAME: ${{ secrets.GIT_NAME }}
|
||||
GIT_COMMITTER_EMAIL: ${{ secrets.GIT_EMAIL }}
|
||||
|
||||
- name: 'Deploy to Vercel'
|
||||
run: 'npm run deploy -- --token="${VERCEL_TOKEN}" --prod'
|
||||
env:
|
||||
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
|
||||
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
|
||||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
|
||||
|
44
.github/workflows/test.yml
vendored
@ -10,33 +10,33 @@ jobs:
|
||||
test-unit:
|
||||
runs-on: 'ubuntu-latest'
|
||||
steps:
|
||||
- uses: 'actions/checkout@v3.1.0'
|
||||
- uses: 'actions/checkout@v3.5.3'
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: 'actions/setup-node@v3.5.1'
|
||||
- name: 'Setup Node.js'
|
||||
uses: 'actions/setup-node@v3.6.0'
|
||||
with:
|
||||
node-version: '18.x'
|
||||
cache: 'npm'
|
||||
|
||||
- name: 'Install'
|
||||
run: 'npm install'
|
||||
- name: 'Install dependencies'
|
||||
run: 'npm clean-install'
|
||||
|
||||
- name: 'Unit Test'
|
||||
run: 'npm run test:unit'
|
||||
|
||||
test-lighthouse:
|
||||
test-e2e:
|
||||
runs-on: 'ubuntu-latest'
|
||||
steps:
|
||||
- uses: 'actions/checkout@v3.1.0'
|
||||
- uses: 'actions/checkout@v3.5.3'
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: 'actions/setup-node@v3.5.1'
|
||||
- name: 'Setup Node.js'
|
||||
uses: 'actions/setup-node@v3.6.0'
|
||||
with:
|
||||
node-version: '18.x'
|
||||
cache: 'npm'
|
||||
|
||||
- name: 'Install'
|
||||
run: 'npm install'
|
||||
- name: 'Install dependencies'
|
||||
run: 'npm clean-install'
|
||||
|
||||
- name: 'Build'
|
||||
run: 'npm run build'
|
||||
@ -44,27 +44,5 @@ jobs:
|
||||
- name: 'html-w3c-validator'
|
||||
run: 'npm run test:html-w3c-validator'
|
||||
|
||||
- name: 'Lighthouse'
|
||||
run: 'npm run test:lighthouse'
|
||||
env:
|
||||
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
|
||||
|
||||
test-e2e:
|
||||
runs-on: 'ubuntu-latest'
|
||||
steps:
|
||||
- uses: 'actions/checkout@v3.1.0'
|
||||
|
||||
- name: 'Use Node.js'
|
||||
uses: 'actions/setup-node@v3.5.1'
|
||||
with:
|
||||
node-version: '18.x'
|
||||
cache: 'npm'
|
||||
|
||||
- name: 'Install'
|
||||
run: 'npm install'
|
||||
|
||||
- name: 'Build'
|
||||
run: 'npm run build'
|
||||
|
||||
- name: 'End To End (e2e) Test'
|
||||
run: 'npm run test:e2e'
|
||||
|
1
.gitignore
vendored
@ -48,7 +48,6 @@ npm-debug.log*
|
||||
# misc
|
||||
.DS_Store
|
||||
.lighthouseci
|
||||
.vercel
|
||||
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
|
@ -1,30 +0,0 @@
|
||||
{
|
||||
"ci": {
|
||||
"collect": {
|
||||
"startServerCommand": "npm run start",
|
||||
"startServerReadyPattern": "ready on",
|
||||
"startServerReadyTimeout": 20000,
|
||||
"url": [
|
||||
"http://127.0.0.1:3000/",
|
||||
"http://127.0.0.1:3000/blog",
|
||||
"http://127.0.0.1:3000/blog/hello-world"
|
||||
],
|
||||
"numberOfRuns": 1
|
||||
},
|
||||
"assert": {
|
||||
"preset": "lighthouse:recommended",
|
||||
"assertions": {
|
||||
"csp-xss": "warning",
|
||||
"non-composited-animations": "warning",
|
||||
"unused-javascript": "warning",
|
||||
"image-size-responsive": "warning",
|
||||
"unsized-images": "warning",
|
||||
"color-contrast": "warning"
|
||||
}
|
||||
},
|
||||
"upload": {
|
||||
"target": "temporary-public-storage"
|
||||
},
|
||||
"server": {}
|
||||
}
|
||||
}
|
@ -1,11 +1,12 @@
|
||||
{
|
||||
"config": {
|
||||
"default": true,
|
||||
"MD013": false,
|
||||
"relative-links": true,
|
||||
"extends": "markdownlint/style/prettier",
|
||||
"MD024": false,
|
||||
"MD033": false,
|
||||
"MD041": false
|
||||
"MD033": false
|
||||
},
|
||||
"globs": ["**/*.{md,mdx}"],
|
||||
"ignores": ["**/node_modules"]
|
||||
"ignores": ["**/node_modules"],
|
||||
"customRules": ["markdownlint-rule-relative-links"]
|
||||
}
|
||||
|
6
.vscode/settings.json
vendored
@ -6,5 +6,9 @@
|
||||
"editor.formatOnSave": true,
|
||||
"editor.codeActionsOnSave": {
|
||||
"source.fixAll": true
|
||||
}
|
||||
},
|
||||
"eslint.options": {
|
||||
"ignorePath": ".gitignore"
|
||||
},
|
||||
"prettier.ignorePath": ".gitignore"
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -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,43 +15,21 @@ 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 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
|
||||
|
||||
[](https://gitpod.io/#https://github.com/Divlo/Divlo)
|
||||
[](https://gitpod.io/#https://github.com/theoludwig/theoludwig)
|
||||
|
||||
### Prerequisites
|
||||
|
||||
@ -58,10 +40,10 @@ Scopes define what part of the code changed.
|
||||
|
||||
```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
|
||||
@ -86,4 +68,4 @@ docker compose up --build
|
||||
|
||||
### Services started
|
||||
|
||||
- website : `http://127.0.0.1:3000`
|
||||
- `website`: <http://127.0.0.1:3000>
|
||||
|
28
Dockerfile
@ -1,21 +1,21 @@
|
||||
FROM node:18.11.0 AS dependencies
|
||||
WORKDIR /usr/src/app
|
||||
FROM node:20.5.0 AS builder-dependencies
|
||||
WORKDIR /usr/src/application
|
||||
COPY ./package*.json ./
|
||||
RUN npm install
|
||||
RUN npm clean-install
|
||||
|
||||
FROM node:18.11.0 AS builder
|
||||
WORKDIR /usr/src/app
|
||||
FROM node:20.5.0 AS builder
|
||||
WORKDIR /usr/src/application
|
||||
COPY --from=builder-dependencies /usr/src/application/node_modules ./node_modules
|
||||
COPY ./ ./
|
||||
COPY --from=dependencies /usr/src/app/node_modules ./node_modules
|
||||
RUN npm run build
|
||||
|
||||
FROM node:18.11.0 AS runner
|
||||
WORKDIR /usr/src/app
|
||||
FROM gcr.io/distroless/nodejs18-debian11:latest AS runner
|
||||
WORKDIR /usr/src/application
|
||||
ENV NODE_ENV=production
|
||||
ENV NEXT_TELEMETRY_DISABLED=1
|
||||
COPY --from=builder /usr/src/app/.next/standalone ./
|
||||
COPY --from=builder /usr/src/app/.next/static ./.next/static
|
||||
COPY --from=builder /usr/src/app/public ./public
|
||||
COPY --from=builder /usr/src/app/locales ./locales
|
||||
COPY --from=builder /usr/src/app/next.config.js ./next.config.js
|
||||
CMD ["node", "server.js"]
|
||||
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/locales ./locales
|
||||
COPY --from=builder /usr/src/application/next.config.js ./next.config.js
|
||||
CMD ["./server.js"]
|
||||
|
2
LICENSE
@ -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
|
||||
|
46
README.md
@ -1,18 +1,18 @@
|
||||
<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 • Passionate about High-Tech</strong>
|
||||
<strong>Developer Full Stack • Open-Source enthusiast</strong>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<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 />
|
||||
@ -21,26 +21,16 @@
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "Divlo",
|
||||
"name": "Théo LUDWIG",
|
||||
"pronouns": "He/Him",
|
||||
"birthDate": "31/03/2003",
|
||||
"nationality": "Alsace, France",
|
||||
"interests": [
|
||||
"Developer Full Stack",
|
||||
"Passionate about High-Tech",
|
||||
"Open-Source enthusiast"
|
||||
],
|
||||
"interests": ["Open-Source enthusiast", "Passionate about High-Tech"],
|
||||
"skills": {
|
||||
"programmingLanguages": [
|
||||
"JavaScript",
|
||||
"TypeScript",
|
||||
"Python",
|
||||
"C/C++",
|
||||
"PHP"
|
||||
],
|
||||
"frontEnd": ["HTML", "CSS", "Tailwind CSS", "React.js (+ Next.js)"],
|
||||
"backEnd": ["Laravel", "Node.js", "Fastify", "Prisma", "PostgreSQL"],
|
||||
"tools": ["GNU/Linux", "Ubuntu", "Visual Studio Code", "Git", "Docker"]
|
||||
"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"]
|
||||
}
|
||||
}
|
||||
```
|
||||
@ -50,6 +40,6 @@
|
||||
## 📈 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,javascript&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>
|
||||
|
@ -11,7 +11,7 @@ export const Footer: React.FC<FooterProps> = (props) => {
|
||||
const { version } = props
|
||||
|
||||
const versionLink = useMemo(() => {
|
||||
return `https://github.com/Divlo/Divlo/releases/tag/v${version}`
|
||||
return `https://github.com/theoludwig/theoludwig/releases/tag/v${version}`
|
||||
}, [version])
|
||||
|
||||
return (
|
||||
@ -21,7 +21,7 @@ export const Footer: React.FC<FooterProps> = (props) => {
|
||||
href='/'
|
||||
className='text-yellow hover:underline dark:text-yellow-dark'
|
||||
>
|
||||
Divlo
|
||||
Théo LUDWIG
|
||||
</Link>{' '}
|
||||
| {t('common:all-rights-reserved')}
|
||||
</p>
|
||||
|
@ -9,10 +9,10 @@ interface HeadProps {
|
||||
|
||||
export const Head: React.FC<HeadProps> = (props) => {
|
||||
const {
|
||||
title = 'Divlo',
|
||||
image = 'https://divlo.fr/images/icons/icon-96x96.png',
|
||||
description = 'Divlo - Developer Full Stack • Passionate about High-Tech',
|
||||
url = 'https://divlo.fr/'
|
||||
title = 'Théo LUDWIG',
|
||||
image = 'https://theoludwig.fr/images/icon-96x96.png',
|
||||
description = 'Théo LUDWIG - Developer Full Stack • Passionate about High-Tech',
|
||||
url = 'https://theoludwig.fr/'
|
||||
} = props
|
||||
|
||||
return (
|
||||
@ -23,7 +23,7 @@ export const Head: React.FC<HeadProps> = (props) => {
|
||||
{/* 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='Language' content='fr-FR, en-US' />
|
||||
<meta name='theme-color' content='#ffd800' />
|
||||
|
||||
{/* Open Graph Metadata */}
|
||||
@ -32,7 +32,7 @@ export const Head: React.FC<HeadProps> = (props) => {
|
||||
<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:locale' content='fr-FR, en-US' />
|
||||
<meta property='og:site_name' content={title} />
|
||||
|
||||
{/* Twitter card Metadata */}
|
||||
@ -40,18 +40,6 @@ export const Head: React.FC<HeadProps> = (props) => {
|
||||
<meta name='twitter:description' content={description} />
|
||||
<meta name='twitter:title' content={title} />
|
||||
<meta name='twitter:image' 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>
|
||||
)
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ export const Language: React.FC = () => {
|
||||
}, [])
|
||||
|
||||
const handleLanguage = async (language: string): Promise<void> => {
|
||||
await setLanguage(language)
|
||||
await setLanguage(language, false)
|
||||
}
|
||||
|
||||
return (
|
||||
@ -55,7 +55,7 @@ export const Language: React.FC = () => {
|
||||
<ul
|
||||
data-cy='languages-list'
|
||||
className={classNames(
|
||||
'absolute top-14 z-10 mt-3 mr-4 flex w-24 list-none flex-col items-center justify-center rounded-lg bg-white p-0 shadow-lightFlag dark:bg-black dark:shadow-darkFlag',
|
||||
'absolute top-14 z-10 mr-4 mt-3 flex w-24 list-none flex-col items-center justify-center rounded-lg bg-white p-0 shadow-lightFlag dark:bg-black dark:shadow-darkFlag',
|
||||
{ hidden: hiddenMenu }
|
||||
)}
|
||||
>
|
||||
|
@ -29,7 +29,7 @@ export const SwitchTheme: React.FC = () => {
|
||||
<div
|
||||
data-cy='switch-theme-dark'
|
||||
className={classNames(
|
||||
'absolute top-0 bottom-0 left-[8px] mt-auto mb-auto h-[10px] w-[14px] leading-[0] transition-opacity duration-[250ms] ease-in-out',
|
||||
'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'
|
||||
@ -43,7 +43,7 @@ export const SwitchTheme: React.FC = () => {
|
||||
<div
|
||||
data-cy='switch-theme-light'
|
||||
className={classNames(
|
||||
'absolute right-[10px] top-0 bottom-0 mt-auto mb-auto h-[10px] w-[10px] leading-[0]',
|
||||
'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'
|
||||
|
@ -19,11 +19,12 @@ export const Header: React.FC<HeaderProps> = (props) => {
|
||||
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 hidden font-headline font-semibold text-yellow dark:text-yellow-dark xs:block'>
|
||||
Divlo
|
||||
Théo LUDWIG
|
||||
</strong>
|
||||
</div>
|
||||
</Link>
|
||||
@ -37,7 +38,7 @@ export const Header: React.FC<HeaderProps> = (props) => {
|
||||
Blog
|
||||
</Link>
|
||||
</div>
|
||||
{showLanguage && <Language />}
|
||||
{showLanguage ? <Language /> : null}
|
||||
<SwitchTheme />
|
||||
</div>
|
||||
</header>
|
||||
|
@ -10,7 +10,7 @@ export const InterestItem: React.FC<InterestItemProps> = (props) => {
|
||||
const { fontAwesomeIcon, title } = props
|
||||
|
||||
return (
|
||||
<li className='interest-item my-2 mx-2 h-8 w-8' title={title}>
|
||||
<li className='interest-item mx-2 my-2 h-8 w-8' title={title}>
|
||||
<FontAwesomeIcon
|
||||
className='block h-full w-full text-yellow dark:text-yellow-dark'
|
||||
icon={fontAwesomeIcon}
|
||||
|
@ -12,22 +12,22 @@ export const OpenSource: React.FC = () => {
|
||||
<Repository
|
||||
name='nodejs/node'
|
||||
description='Node.js JavaScript runtime 🐢🚀'
|
||||
href='https://github.com/nodejs/node/commits?author=Divlo'
|
||||
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=Divlo'
|
||||
href='https://github.com/standard/standard/commits?author=theoludwig'
|
||||
/>
|
||||
<Repository
|
||||
name='nrwl/nx'
|
||||
description='Smart, Extensible Build Framework'
|
||||
href='https://github.com/nrwl/nx/commits?author=Divlo'
|
||||
href='https://github.com/nrwl/nx/commits?author=theoludwig'
|
||||
/>
|
||||
<Repository
|
||||
name='vercel/next.js'
|
||||
description='The React Framework for Production'
|
||||
href='https://github.com/vercel/next.js/commits?author=Divlo'
|
||||
href='https://github.com/vercel/next.js/commits?author=theoludwig'
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -4,20 +4,20 @@ export const ProfileDescriptionBottom: React.FC = () => {
|
||||
const { t, lang } = useTranslation()
|
||||
|
||||
return (
|
||||
<p className='mt-8 mb-8 text-base font-normal text-gray dark:text-gray-dark'>
|
||||
<p className='mb-8 mt-8 text-base font-normal text-gray dark:text-gray-dark'>
|
||||
{t('home:about.description-bottom')}
|
||||
{lang === 'fr' && (
|
||||
{lang === 'fr' ? (
|
||||
<>
|
||||
<br />
|
||||
<br />
|
||||
<a
|
||||
href='/curriculum-vitae'
|
||||
href='/curriculum-vitae/index.html'
|
||||
className='text-yellow hover:underline dark:text-yellow-dark'
|
||||
>
|
||||
Curriculum vitæ
|
||||
</a>
|
||||
</>
|
||||
)}
|
||||
) : null}
|
||||
</p>
|
||||
)
|
||||
}
|
||||
|
@ -5,11 +5,8 @@ export const ProfileInformation: React.FC = () => {
|
||||
|
||||
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'>
|
||||
{t('home:about.i-am')}{' '}
|
||||
<strong className='font-semibold text-yellow dark:text-yellow-dark'>
|
||||
Divlo
|
||||
</strong>
|
||||
<h1 className='mb-2 text-4xl font-semibold text-yellow dark:text-yellow-dark'>
|
||||
Théo LUDWIG
|
||||
</h1>
|
||||
<h2 className='mb-3 text-base'>{t('home:about.description')}</h2>
|
||||
</div>
|
||||
|
@ -12,7 +12,7 @@ export const ProfileItem: React.FC<ProfileItemProps> = (props) => {
|
||||
<strong className='float-left block w-28 text-sm font-bold text-black dark:text-white'>
|
||||
{title}
|
||||
</strong>
|
||||
<span className='ml-0 mb-4 block text-sm font-normal text-gray dark:text-gray-dark sm:mb-0 sm:ml-32'>
|
||||
<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 hover:underline dark:text-gray-dark'
|
||||
|
@ -1,7 +1,7 @@
|
||||
import useTranslation from 'next-translate/useTranslation'
|
||||
import { useMemo } from 'react'
|
||||
|
||||
import { DIVLO_BIRTHDAY, DIVLO_BIRTHDAY_DATE, getAge } from 'utils/getAge'
|
||||
import { BIRTH_DATE, BIRTH_DATE_STRING, getAge } from 'utils/getAge'
|
||||
|
||||
import { ProfileItem } from './ProfileItem'
|
||||
|
||||
@ -9,21 +9,24 @@ export const ProfileList: React.FC = () => {
|
||||
const { t } = useTranslation('home')
|
||||
|
||||
const age = useMemo(() => {
|
||||
return getAge(DIVLO_BIRTHDAY)
|
||||
return getAge(BIRTH_DATE)
|
||||
}, [])
|
||||
|
||||
return (
|
||||
<ul className='m-0 list-none p-0'>
|
||||
<ProfileItem title={t('home:about.full-name')} value='Théo LUDWIG' />
|
||||
<ProfileItem
|
||||
title={t('home:about.pronouns')}
|
||||
value={t('home:about.pronouns-value')}
|
||||
/>
|
||||
<ProfileItem
|
||||
title={t('home:about.birth-date')}
|
||||
value={`${DIVLO_BIRTHDAY_DATE} (${age} ${t('home:about.years-old')})`}
|
||||
value={`${BIRTH_DATE_STRING} (${age} ${t('home:about.years-old')})`}
|
||||
/>
|
||||
<ProfileItem title={t('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>
|
||||
)
|
||||
|
@ -1,11 +1,11 @@
|
||||
import Image from 'next/image'
|
||||
|
||||
import DivloLogo from 'public/images/divlo_logo.png'
|
||||
import Logo from 'public/images/logo.png'
|
||||
|
||||
export const ProfileLogo: React.FC = () => {
|
||||
return (
|
||||
<div className='max-h-[370px] max-w-[370px] px-2 py-6'>
|
||||
<Image quality={100} src={DivloLogo} alt='Divlo' priority />
|
||||
<Image quality={100} src={Logo} alt='Théo LUDWIG' priority />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
@ -10,28 +10,34 @@ import { NPMIcon } from './SocialMediaIcons/NPMIcon'
|
||||
export const SocialMediaList: React.FC = () => {
|
||||
return (
|
||||
<ul className='social-media-list m-0 mt-2 list-none py-4 text-center'>
|
||||
<SocialMediaItem link='https://github.com/Divlo' ariaLabel='GitHub'>
|
||||
<SocialMediaItem link='https://github.com/theoludwig' ariaLabel='GitHub'>
|
||||
<GitHubIcon />
|
||||
</SocialMediaItem>
|
||||
<SocialMediaItem link='https://gitlab.com/Divlo' ariaLabel='GitLab'>
|
||||
<SocialMediaItem link='https://gitlab.com/theoludwig' ariaLabel='GitLab'>
|
||||
<GitLabIcon />
|
||||
</SocialMediaItem>
|
||||
<SocialMediaItem link='https://www.npmjs.com/~divlo' ariaLabel='NPM'>
|
||||
<SocialMediaItem link='https://www.npmjs.com/~theoludwig' ariaLabel='NPM'>
|
||||
<NPMIcon />
|
||||
</SocialMediaItem>
|
||||
<SocialMediaItem link='https://twitter.com/Divlo_FR' ariaLabel='Twitter'>
|
||||
<SocialMediaItem
|
||||
link='https://twitter.com/theoludwig_'
|
||||
ariaLabel='Twitter'
|
||||
>
|
||||
<TwitterIcon />
|
||||
</SocialMediaItem>
|
||||
<SocialMediaItem
|
||||
link='https://www.youtube.com/c/Divlo'
|
||||
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>
|
||||
|
@ -33,10 +33,10 @@ export const SkillComponent: React.FC<SkillComponentProps> = (props) => {
|
||||
>
|
||||
<div className='text-center'>
|
||||
<Image
|
||||
className='inline h-auto w-auto'
|
||||
className='inline h-16 w-16'
|
||||
quality={100}
|
||||
width={60}
|
||||
height={60}
|
||||
width={64}
|
||||
height={64}
|
||||
alt={skill}
|
||||
src={image}
|
||||
/>
|
||||
|
@ -9,31 +9,29 @@ export const Skills: React.FC = () => {
|
||||
return (
|
||||
<>
|
||||
<SkillsSection title={t('home:skills.languages')}>
|
||||
<SkillComponent skill='JavaScript' />
|
||||
<SkillComponent skill='TypeScript' />
|
||||
<SkillComponent skill='Python' />
|
||||
<SkillComponent skill='C/C++' />
|
||||
<SkillComponent skill='PHP' />
|
||||
</SkillsSection>
|
||||
|
||||
<SkillsSection title='Front-end'>
|
||||
<SkillsSection title='Frontend'>
|
||||
<SkillComponent skill='HTML' />
|
||||
<SkillComponent skill='CSS' />
|
||||
<SkillComponent skill='Tailwind CSS' />
|
||||
<SkillComponent skill='React.js (+ Next.js)' />
|
||||
</SkillsSection>
|
||||
|
||||
<SkillsSection title='Back-end'>
|
||||
<SkillsSection title='Backend'>
|
||||
<SkillComponent skill='Laravel' />
|
||||
<SkillComponent skill='Node.js' />
|
||||
<SkillComponent skill='Fastify' />
|
||||
<SkillComponent skill='Prisma' />
|
||||
<SkillComponent skill='PostgreSQL' />
|
||||
</SkillsSection>
|
||||
|
||||
<SkillsSection title={t('home:skills.software-tools')}>
|
||||
<SkillComponent skill='GNU/Linux' />
|
||||
<SkillComponent skill='Ubuntu' />
|
||||
<SkillComponent skill='Arch Linux' />
|
||||
<SkillComponent skill='Visual Studio Code' />
|
||||
<SkillComponent skill='Git' />
|
||||
<SkillComponent skill='Docker' />
|
||||
|
@ -88,20 +88,20 @@ 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'
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { useEffect, useRef } from 'react'
|
||||
|
||||
export const RevealFade: React.FC<React.PropsWithChildren<{}>> = (props) => {
|
||||
export const RevealFade: React.FC<React.PropsWithChildren> = (props) => {
|
||||
const { children } = props
|
||||
|
||||
const htmlElement = useRef<HTMLDivElement>(null)
|
||||
@ -8,13 +8,13 @@ export const RevealFade: React.FC<React.PropsWithChildren<{}>> = (props) => {
|
||||
useEffect(() => {
|
||||
const observer = new window.IntersectionObserver(
|
||||
(entries, observer) => {
|
||||
entries.forEach((entry) => {
|
||||
for (const entry of entries) {
|
||||
if (entry.isIntersecting) {
|
||||
entry.target.className =
|
||||
'opacity-100 visible translate-y-0 transition-all duration-700 ease-in-out'
|
||||
observer.unobserve(entry.target)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
{
|
||||
root: null,
|
||||
|
@ -4,7 +4,7 @@ export const SectionHeading: React.FC<SectionHeadingProps> = (props) => {
|
||||
const { children, ...rest } = props
|
||||
|
||||
return (
|
||||
<h2 {...rest} className='mt-1 mb-3 text-center text-4xl font-semibold'>
|
||||
<h2 {...rest} className='mb-3 mt-1 text-center text-4xl font-semibold'>
|
||||
{children}
|
||||
</h2>
|
||||
)
|
||||
|
@ -23,7 +23,9 @@ export const Section: React.FC<SectionProps> = (props) => {
|
||||
<div className='w-full px-3'>
|
||||
<ShadowContainer style={{ marginTop: 50 }}>
|
||||
<section {...rest}>
|
||||
{heading != null && <SectionHeading>{heading}</SectionHeading>}
|
||||
{heading != null ? (
|
||||
<SectionHeading>{heading}</SectionHeading>
|
||||
) : null}
|
||||
<div className='w-full px-3'>{children}</div>
|
||||
</section>
|
||||
</ShadowContainer>
|
||||
@ -34,7 +36,7 @@ export const Section: React.FC<SectionProps> = (props) => {
|
||||
if (withoutShadowContainer) {
|
||||
return (
|
||||
<section {...rest}>
|
||||
{heading != null && <SectionHeading>{heading}</SectionHeading>}
|
||||
{heading != null ? <SectionHeading>{heading}</SectionHeading> : null}
|
||||
<div className='w-full px-3'>{children}</div>
|
||||
</section>
|
||||
)
|
||||
@ -42,16 +44,18 @@ export const Section: React.FC<SectionProps> = (props) => {
|
||||
|
||||
return (
|
||||
<section {...rest}>
|
||||
{heading != null && (
|
||||
<SectionHeading style={{ ...(description != null && { margin: 0 }) }}>
|
||||
{heading != null ? (
|
||||
<SectionHeading
|
||||
style={{ ...(description != null ? { margin: 0 } : {}) }}
|
||||
>
|
||||
{heading}
|
||||
</SectionHeading>
|
||||
)}
|
||||
{description != null && (
|
||||
) : null}
|
||||
{description != null ? (
|
||||
<p style={{ marginTop: 7 }} className='text-center'>
|
||||
{description}
|
||||
</p>
|
||||
)}
|
||||
) : null}
|
||||
<div className='w-full px-3'>
|
||||
<ShadowContainer>
|
||||
<div className='w-full px-16 py-4 leading-8'>{children}</div>
|
||||
|
@ -1,16 +1,16 @@
|
||||
import { Footer } from 'components/Footer'
|
||||
import { Footer } from '@/components/Footer'
|
||||
|
||||
describe('<Footer />', () => {
|
||||
it('should render with appropriate link tag version', () => {
|
||||
const version = '1.0.0'
|
||||
cy.mount(<Footer version={version} />)
|
||||
cy.contains('Divlo')
|
||||
cy.contains('Théo LUDWIG')
|
||||
.get('[data-cy=version-link]')
|
||||
.should('have.text', version)
|
||||
.should(
|
||||
'have.attr',
|
||||
'href',
|
||||
`https://github.com/Divlo/Divlo/releases/tag/v${version}`
|
||||
`https://github.com/theoludwig/theoludwig/releases/tag/v${version}`
|
||||
)
|
||||
})
|
||||
})
|
@ -38,7 +38,7 @@ describe('Common > Header', () => {
|
||||
|
||||
describe('Switch Language', () => {
|
||||
it('should switch language from EN (default) to FR', () => {
|
||||
cy.get('h1').contains('I am Divlo')
|
||||
cy.get('h1').contains('Théo LUDWIG')
|
||||
cy.get('[data-cy=language-flag-text]').contains('EN')
|
||||
cy.get('[data-cy=languages-list]').should('not.be.visible')
|
||||
cy.get('[data-cy=language-click]').click()
|
||||
@ -46,7 +46,7 @@ describe('Common > Header', () => {
|
||||
cy.get('[data-cy=languages-list] > li:first-child').contains('FR').click()
|
||||
cy.get('[data-cy=languages-list]').should('not.be.visible')
|
||||
cy.get('[data-cy=language-flag-text]').contains('FR')
|
||||
cy.get('h1').contains('Je suis Divlo')
|
||||
cy.get('h1').contains('Théo LUDWIG')
|
||||
})
|
||||
|
||||
it('should close the language list menu when clicking outside', () => {
|
||||
|
@ -3,7 +3,7 @@ describe('Page /blog/[slug]', () => {
|
||||
cy.visit('/blog/hello-world')
|
||||
cy.get('[data-cy=language-flag-text]').should('not.exist')
|
||||
cy.get('h1').should('have.text', '👋 Hello, world!')
|
||||
cy.get('.prose a').should('have.attr', 'target', '_blank')
|
||||
cy.get('.prose a:visible').should('have.attr', 'target', '_blank')
|
||||
})
|
||||
|
||||
it("should redirect to /404 if the blog post doesn't exist", () => {
|
||||
|
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
@ -1,11 +1,12 @@
|
||||
services:
|
||||
divlo.fr:
|
||||
theoludwig:
|
||||
container_name: ${COMPOSE_PROJECT_NAME}
|
||||
image: 'divlo.fr'
|
||||
image: 'theoludwig'
|
||||
restart: 'unless-stopped'
|
||||
build:
|
||||
context: './'
|
||||
ports:
|
||||
- '${PORT-3000}:${PORT-3000}'
|
||||
environment:
|
||||
PORT: ${PORT-3000}
|
||||
env_file: './.env'
|
||||
env_file: '.env'
|
||||
|
@ -3,10 +3,10 @@ import fs from 'node:fs'
|
||||
|
||||
import { build } from 'vite'
|
||||
|
||||
const jsonResumeThemeCustom = new URL('../', import.meta.url)
|
||||
const jsonResumeThemeCustom = new URL('./', import.meta.url)
|
||||
const jsonResumeThemeCustomDist = new URL('./dist', jsonResumeThemeCustom)
|
||||
const publicResumeOutputURL = new URL(
|
||||
'../../public/curriculum-vitae',
|
||||
'../public/curriculum-vitae',
|
||||
import.meta.url
|
||||
)
|
||||
|
@ -1,11 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<!doctype html>
|
||||
<html lang="fr-FR">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title><%= locals.basics.name %></title>
|
||||
<link rel="icon" type="image/png" href="<%= locals.basics.image %>" />
|
||||
<link rel="stylesheet" href="./styles/global.css" />
|
||||
<script defer type="module" src="./scripts/main.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container-fluid">
|
||||
@ -26,12 +27,15 @@
|
||||
<strong><%= locals.basics.name %></strong>
|
||||
</h3>
|
||||
<h5 class="text-muted"><%= locals.basics.label %></h5>
|
||||
<h5 class="text-muted">
|
||||
<%= locals.basics.age %> (<span id="year-old"></span> ans)
|
||||
</h5>
|
||||
<h5 class="text-muted">
|
||||
<%= locals.basics.location.address %>
|
||||
</h5>
|
||||
</div>
|
||||
</div>
|
||||
<div class="contact-details clearfix">
|
||||
<div class="detail">
|
||||
<span class="info"><%= locals.basics.phone %></span>
|
||||
</div>
|
||||
<div class="detail">
|
||||
<span class="info">
|
||||
<a
|
||||
@ -70,44 +74,47 @@
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="detail" id="work-experience">
|
||||
<section class="section-separated">
|
||||
<div class="detail" id="education">
|
||||
<div class="icon">
|
||||
<img src="./images/building-columns.svg" alt="work" />
|
||||
<img src="./images/graduation-cap.svg" alt="graduation" />
|
||||
</div>
|
||||
<div class="info">
|
||||
<h4 class="title text-uppercase">Expériences</h4>
|
||||
<h4 class="title text-uppercase">Formations</h4>
|
||||
<div class="content">
|
||||
<ul class="list-unstyled clear-margin">
|
||||
<% locals.work.forEach((experience) => { %>
|
||||
<li class="card card-nested clearfix">
|
||||
<% locals.education.forEach((degree) => { %>
|
||||
<li class="card card-nested">
|
||||
<div class="content">
|
||||
<p class="clear-margin relative">
|
||||
<a href="<%= experience.website %>">
|
||||
<strong><%= experience.name %></strong>
|
||||
</a>
|
||||
<strong><%= degree.studyType %></strong>
|
||||
</p>
|
||||
<p class="clear-margin relative">
|
||||
<strong><%- experience.position %></strong>
|
||||
<strong><%= degree.score %></strong>
|
||||
</p>
|
||||
<p class="text-muted">
|
||||
<p class="text-muted clear-margin">
|
||||
<%= degree.institution %>
|
||||
</p>
|
||||
<p class="text-muted clear-margin">
|
||||
<small>
|
||||
<span class="space-right">
|
||||
<%= date.format(new Date(experience.startDate),
|
||||
'DD/MM/YYYY') %> - <%= date.format(new
|
||||
Date(experience.endDate), 'DD/MM/YYYY') %>
|
||||
</span>
|
||||
<%= degree.startDate %> <%= degree.endDate !=
|
||||
null ? " - " + degree.endDate : "" %>
|
||||
</small>
|
||||
</p>
|
||||
<div class="experience-description">
|
||||
<p><%- experience.summary %></p>
|
||||
</div>
|
||||
<% if (degree.courses != null) { %>
|
||||
<ul class="education-courses">
|
||||
<% degree.courses.forEach((course) => { %>
|
||||
<li><%= course %></li>
|
||||
<% }) %>
|
||||
</ul>
|
||||
<% } %>
|
||||
</div>
|
||||
</li>
|
||||
<% }) %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
</div>
|
||||
|
||||
<div class="detail" id="skills">
|
||||
<div class="icon">
|
||||
@ -133,44 +140,50 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="detail" id="education">
|
||||
<section class="section-separated">
|
||||
<div class="detail" id="work-experience">
|
||||
<div class="icon">
|
||||
<img src="./images/graduation-cap.svg" alt="graduation" />
|
||||
<img src="./images/building-columns.svg" alt="work" />
|
||||
</div>
|
||||
<div class="info">
|
||||
<h4 class="title text-uppercase">Éducation</h4>
|
||||
<div class="content">
|
||||
<h4 class="title text-uppercase">Expériences</h4>
|
||||
<ul class="list-unstyled clear-margin">
|
||||
<% locals.education.forEach((degree) => { %>
|
||||
<li class="card card-nested">
|
||||
<% locals.work.filter((experience) =>
|
||||
experience.description == null).forEach((experience) => {
|
||||
%>
|
||||
<li class="card card-nested clearfix">
|
||||
<div class="content">
|
||||
<p class="clear-margin relative">
|
||||
<strong><%= degree.studyType %></strong>
|
||||
<a href="<%= experience.website %>">
|
||||
<strong><%= experience.name %></strong>
|
||||
</a>
|
||||
</p>
|
||||
<p class="clear-margin relative">
|
||||
<strong><%= degree.score %></strong>
|
||||
<strong><%- experience.position %></strong>
|
||||
</p>
|
||||
<p class="text-muted clear-margin">
|
||||
<%= degree.institution %>
|
||||
</p>
|
||||
<p class="text-muted clear-margin">
|
||||
<p class="text-muted">
|
||||
<small>
|
||||
<%= degree.startDate %> <%= degree.endDate != null
|
||||
? " - " + degree.endDate : "" %>
|
||||
<span class="space-right">
|
||||
<%= date.format(new Date(experience.startDate),
|
||||
'DD/MM/YYYY') %> - <%= date.format(new
|
||||
Date(experience.endDate), 'DD/MM/YYYY') %> (<%=
|
||||
experience.duration %>)
|
||||
</span>
|
||||
</small>
|
||||
</p>
|
||||
<div class="experience-description">
|
||||
<p><%- experience.summary %></p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<% }) %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="detail" id="interests">
|
||||
<div class="icon">
|
||||
@ -186,9 +199,42 @@
|
||||
</li>
|
||||
<% }) %>
|
||||
</ul>
|
||||
|
||||
<ul class="list-unstyled clear-margin">
|
||||
<% locals.work.filter((experience) =>
|
||||
experience.description != null).forEach((experience) =>
|
||||
{ %>
|
||||
<li class="card card-nested clearfix">
|
||||
<div class="content">
|
||||
<p class="clear-margin relative">
|
||||
<a href="<%= experience.website %>">
|
||||
<strong><%= experience.name %></strong>
|
||||
</a>
|
||||
</p>
|
||||
<p class="clear-margin relative">
|
||||
<strong><%- experience.position %></strong>
|
||||
</p>
|
||||
<p class="text-muted">
|
||||
<small>
|
||||
<span class="space-right">
|
||||
<%= date.format(new
|
||||
Date(experience.startDate), 'DD/MM/YYYY') %> -
|
||||
<%= date.format(new Date(experience.endDate),
|
||||
'DD/MM/YYYY') %> (<%= experience.duration %>)
|
||||
</span>
|
||||
</small>
|
||||
</p>
|
||||
<div class="experience-description">
|
||||
<p><%- experience.summary %></p>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<% }) %>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
1959
jsonresume-theme-custom/package-lock.json
generated
@ -9,12 +9,13 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"modern-normalize": "1.1.0"
|
||||
"jsonc-parser": "3.2.0",
|
||||
"modern-normalize": "2.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "18.11.7",
|
||||
"date-and-time": "2.4.1",
|
||||
"vite": "3.2.0",
|
||||
"@types/node": "20.4.4",
|
||||
"date-and-time": "3.0.2",
|
||||
"vite": "4.4.6",
|
||||
"vite-plugin-html": "3.2.0"
|
||||
}
|
||||
}
|
||||
|
5
jsonresume-theme-custom/scripts/main.js
Normal file
@ -0,0 +1,5 @@
|
||||
import { BIRTH_DATE, getAge } from '../../utils/getAge.ts'
|
||||
|
||||
const yearOld = document.getElementById('year-old')
|
||||
|
||||
yearOld.textContent = getAge(BIRTH_DATE).toString()
|
@ -209,7 +209,6 @@ h5 {
|
||||
font-size: 75%;
|
||||
font-weight: 600;
|
||||
line-height: 1;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
vertical-align: baseline;
|
||||
@ -217,8 +216,6 @@ h5 {
|
||||
}
|
||||
.label-keyword {
|
||||
display: inline-block;
|
||||
background: #7eb0db;
|
||||
color: white;
|
||||
font-size: 0.9em;
|
||||
padding: 5px;
|
||||
border: 1px solid #357ebd;
|
||||
@ -227,3 +224,6 @@ h5 {
|
||||
.label-keyword p {
|
||||
margin: 0;
|
||||
}
|
||||
.section-separated {
|
||||
display: flex;
|
||||
}
|
||||
|
@ -1,16 +1,19 @@
|
||||
import fs from 'node:fs'
|
||||
|
||||
import { defineConfig } from 'vite'
|
||||
import { parse as JSONCParser } from 'jsonc-parser'
|
||||
import { createHtmlPlugin } from 'vite-plugin-html'
|
||||
import date from 'date-and-time'
|
||||
|
||||
const jsonResumeURL = new URL('../resume.json', import.meta.url)
|
||||
const jsonResumeURL = new URL('../resume.jsonc', import.meta.url)
|
||||
const dataResumeStringJSON = await fs.promises.readFile(jsonResumeURL, {
|
||||
encoding: 'utf-8'
|
||||
})
|
||||
const resume = JSON.parse(dataResumeStringJSON)
|
||||
const resume = JSONCParser(dataResumeStringJSON)
|
||||
|
||||
// https://vitejs.dev/config/
|
||||
/**
|
||||
* Documentation: <https://vitejs.dev/config/>
|
||||
*/
|
||||
export default defineConfig({
|
||||
build: {
|
||||
assetsDir: './'
|
||||
|
@ -1,12 +1,12 @@
|
||||
{
|
||||
"about": {
|
||||
"i-am": "I am",
|
||||
"description": "Developer Full Stack • Passionate about High-Tech",
|
||||
"full-name": "Full name",
|
||||
"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 self-taught in Computer Science by following online trainings and I am also a student at the university following the French training \"BUT Informatique\" (second year)."
|
||||
"description-bottom": "I am a student in computer science following the French training \"BUT Informatique\" and I am also a self-taught."
|
||||
},
|
||||
"interests": {
|
||||
"title": "Interests",
|
||||
@ -16,12 +16,12 @@
|
||||
"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."
|
||||
},
|
||||
{
|
||||
"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": "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": "Open-Source enthusiast",
|
||||
"description": "For me, everyone should work, solve problems, build things and think together. Long live open source, whenever you can share your work, do it! <br/> The website is open-source on <a class='text-yellow dark:text-yellow-dark hover:underline' href='https://github.com/Divlo/Divlo' 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."
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -34,22 +34,22 @@
|
||||
"title": "Portfolio",
|
||||
"items": [
|
||||
{
|
||||
"title": "function.divlo.fr",
|
||||
"description": "Learn programming through project-based alias function.",
|
||||
"link": "https://function.divlo.fr/",
|
||||
"image": "/images/portfolio/functiondivlofr.png"
|
||||
"title": "Carolo",
|
||||
"description": "Strategy board game similar to chess which allows grandiose moves (only available in French).",
|
||||
"link": "https://carolo.theoludwig.fr/",
|
||||
"image": "/images/portfolio/Carolo.png"
|
||||
},
|
||||
{
|
||||
"title": "thream.divlo.fr",
|
||||
"title": "Thream",
|
||||
"description": "Your open source platform to stay close with your friends and communities, talk, chat, collaborate, share and have fun.",
|
||||
"link": "https://thream.divlo.fr/",
|
||||
"image": "/images/portfolio/threamdivlofr.png"
|
||||
"link": "https://thream.theoludwig.fr/",
|
||||
"image": "/images/portfolio/Thream.png"
|
||||
},
|
||||
{
|
||||
"title": "Leon",
|
||||
"description": "Leon is your open-source personal assistant.",
|
||||
"link": "https://getleon.ai/",
|
||||
"image": "/images/portfolio/leon.png"
|
||||
"image": "/images/portfolio/Leon.png"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -1,12 +1,12 @@
|
||||
{
|
||||
"about": {
|
||||
"i-am": "Je suis",
|
||||
"description": "Développeur Full Stack • Passionné de High-Tech",
|
||||
"full-name": "Prénom NOM",
|
||||
"description": "Développeur Full Stack • Enthousiaste de l'Open-Source",
|
||||
"pronouns": "Pronoms",
|
||||
"pronouns-value": "Il/Lui",
|
||||
"birth-date": "Date de naissance",
|
||||
"years-old": "ans",
|
||||
"nationality": "Nationalité",
|
||||
"description-bottom": "Je me forme en autodidacte dans l'informatique en suivant des formations en ligne et je suis aussi un étudiant à l'université suivant la formation \"BUT Informatique\" (deuxième année)."
|
||||
"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."
|
||||
},
|
||||
"interests": {
|
||||
"title": "Intérêts",
|
||||
@ -16,12 +16,12 @@
|
||||
"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."
|
||||
},
|
||||
{
|
||||
"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."
|
||||
"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": "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. Longue vie à l'open-source, chaque fois que vous pouvez partagez votre travail, faites-le! <br/> Le site est open-source sur <a class='text-yellow dark:text-yellow-dark hover:underline' href='https://github.com/Divlo/Divlo' 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."
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -34,22 +34,22 @@
|
||||
"title": "Portfolio",
|
||||
"items": [
|
||||
{
|
||||
"title": "function.divlo.fr",
|
||||
"description": "Apprenez la programmation grâce à l'apprentissage par projet alias fonction.",
|
||||
"link": "https://function.divlo.fr/",
|
||||
"image": "/images/portfolio/functiondivlofr.png"
|
||||
"title": "Carolo",
|
||||
"description": "Jeu de plateau stratégique similaire aux échecs qui permet des coups grandioses, reposant sur des enchaînements remarquables.",
|
||||
"link": "https://carolo.theoludwig.fr/",
|
||||
"image": "/images/portfolio/Carolo.png"
|
||||
},
|
||||
{
|
||||
"title": "thream.divlo.fr",
|
||||
"title": "Thream",
|
||||
"description": "Votre plateforme open source pour rester proche de vos amis et communautés, parler, discuter, collaborer, partager et amusez-vous.",
|
||||
"link": "https://thream.divlo.fr/",
|
||||
"image": "/images/portfolio/threamdivlofr.png"
|
||||
"link": "https://thream.theoludwig.fr/",
|
||||
"image": "/images/portfolio/Thream.png"
|
||||
},
|
||||
{
|
||||
"title": "Leon",
|
||||
"description": "Leon est votre assistant personnel open source.",
|
||||
"link": "https://getleon.ai/",
|
||||
"image": "/images/portfolio/leon.png"
|
||||
"image": "/images/portfolio/Leon.png"
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -1,8 +1,4 @@
|
||||
const nextPWA = require('next-pwa')({
|
||||
disable: process.env.NODE_ENV !== 'production',
|
||||
dest: 'public'
|
||||
})
|
||||
const nextTranslate = require('next-translate')
|
||||
const nextTranslate = require('next-translate-plugin')
|
||||
|
||||
/** @type {import("next").NextConfig} */
|
||||
const nextConfig = {
|
||||
@ -10,4 +6,4 @@ const nextConfig = {
|
||||
output: 'standalone'
|
||||
}
|
||||
|
||||
module.exports = nextTranslate(nextPWA(nextConfig))
|
||||
module.exports = nextTranslate(nextConfig)
|
||||
|
36210
package-lock.json
generated
117
package.json
@ -1,10 +1,10 @@
|
||||
{
|
||||
"name": "divlo",
|
||||
"version": "2.5.0",
|
||||
"name": "theoludwig",
|
||||
"version": "2.13.0",
|
||||
"private": true,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Divlo/Divlo"
|
||||
"url": "https://github.com/theoludwig/theoludwig"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=16.0.0",
|
||||
@ -14,85 +14,86 @@
|
||||
"dev": "next dev",
|
||||
"start": "next start",
|
||||
"build": "npm run resume:build && next build",
|
||||
"export": "next export",
|
||||
"lint:commit": "commitlint",
|
||||
"lint:editorconfig": "editorconfig-checker",
|
||||
"lint:markdown": "markdownlint-cli2",
|
||||
"lint:typescript": "eslint \"**/*.{js,jsx,ts,tsx}\" --ignore-path \".gitignore\"",
|
||||
"lint:prettier": "prettier \".\" --check --ignore-path \".gitignore\"",
|
||||
"lint:eslint": "eslint . --max-warnings 0 --report-unused-disable-directives --ignore-path .gitignore",
|
||||
"lint:prettier": "prettier . --check",
|
||||
"lint:staged": "lint-staged",
|
||||
"test:unit": "cypress run --component",
|
||||
"test:html-w3c-validator": "start-server-and-test \"start\" \"http://127.0.0.1:3000\" \"html-w3c-validator\"",
|
||||
"test:lighthouse": "lhci autorun",
|
||||
"test:e2e": "start-server-and-test \"start\" \"http://127.0.0.1:3000\" \"cypress run\"",
|
||||
"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\"",
|
||||
"resume:build": "node ./jsonresume-theme-custom/scripts/build.js",
|
||||
"resume:build": "node ./jsonresume-theme-custom/build.js",
|
||||
"release": "semantic-release",
|
||||
"deploy": "vercel",
|
||||
"postinstall": "husky install"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fontsource/montserrat": "4.5.13",
|
||||
"@fortawesome/fontawesome-svg-core": "6.2.0",
|
||||
"@fortawesome/free-brands-svg-icons": "6.2.0",
|
||||
"@fortawesome/free-solid-svg-icons": "6.2.0",
|
||||
"@fontsource/montserrat": "5.0.5",
|
||||
"@fortawesome/fontawesome-svg-core": "6.4.0",
|
||||
"@fortawesome/free-brands-svg-icons": "6.4.0",
|
||||
"@fortawesome/free-solid-svg-icons": "6.4.0",
|
||||
"@fortawesome/react-fontawesome": "0.2.0",
|
||||
"@giscus/react": "2.2.0",
|
||||
"clsx": "1.2.1",
|
||||
"date-and-time": "2.4.1",
|
||||
"@giscus/react": "2.3.0",
|
||||
"clsx": "2.0.0",
|
||||
"date-and-time": "3.0.2",
|
||||
"gray-matter": "4.0.3",
|
||||
"html-react-parser": "3.0.4",
|
||||
"next": "13.0.0",
|
||||
"next-mdx-remote": "4.1.0",
|
||||
"next-pwa": "5.6.0",
|
||||
"html-react-parser": "4.2.0",
|
||||
"katex": "0.16.8",
|
||||
"next": "13.4.12",
|
||||
"next-mdx-remote": "4.4.1",
|
||||
"next-themes": "0.2.1",
|
||||
"next-translate": "1.6.0",
|
||||
"next-translate": "2.5.2",
|
||||
"react": "18.2.0",
|
||||
"react-dom": "18.2.0",
|
||||
"read-pkg": "7.1.0",
|
||||
"read-pkg": "8.0.0",
|
||||
"rehype-katex": "6.0.3",
|
||||
"rehype-raw": "6.1.1",
|
||||
"rehype-slug": "5.0.1",
|
||||
"rehype-slug": "5.1.0",
|
||||
"remark-gfm": "3.0.1",
|
||||
"sharp": "0.31.1",
|
||||
"shiki": "0.11.1",
|
||||
"remark-math": "5.1.1",
|
||||
"sharp": "0.32.4",
|
||||
"shiki": "0.14.3",
|
||||
"unified": "10.1.2",
|
||||
"unist-util-visit": "4.1.1",
|
||||
"unist-util-visit": "5.0.0",
|
||||
"universal-cookie": "4.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@commitlint/cli": "17.1.2",
|
||||
"@commitlint/config-conventional": "17.1.0",
|
||||
"@lhci/cli": "0.9.0",
|
||||
"@saithodev/semantic-release-backmerge": "2.1.2",
|
||||
"@commitlint/cli": "17.6.7",
|
||||
"@commitlint/config-conventional": "17.6.7",
|
||||
"@saithodev/semantic-release-backmerge": "3.2.0",
|
||||
"@semantic-release/git": "10.0.1",
|
||||
"@tailwindcss/typography": "0.5.7",
|
||||
"@types/node": "18.11.7",
|
||||
"@types/react": "18.0.24",
|
||||
"@types/unist": "2.0.6",
|
||||
"@typescript-eslint/eslint-plugin": "5.41.0",
|
||||
"autoprefixer": "10.4.12",
|
||||
"cypress": "10.11.0",
|
||||
"editorconfig-checker": "4.0.2",
|
||||
"eslint": "8.26.0",
|
||||
"eslint-config-conventions": "5.0.0",
|
||||
"eslint-config-next": "13.0.0",
|
||||
"eslint-config-prettier": "8.5.0",
|
||||
"eslint-plugin-import": "2.26.0",
|
||||
"eslint-plugin-prettier": "4.2.1",
|
||||
"@tailwindcss/typography": "0.5.9",
|
||||
"@tsconfig/strictest": "2.0.1",
|
||||
"@types/node": "20.4.4",
|
||||
"@types/react": "18.2.15",
|
||||
"@types/unist": "3.0.0",
|
||||
"@typescript-eslint/eslint-plugin": "6.1.0",
|
||||
"@typescript-eslint/parser": "6.1.0",
|
||||
"autoprefixer": "10.4.14",
|
||||
"cypress": "12.17.2",
|
||||
"editorconfig-checker": "5.1.1",
|
||||
"eslint": "8.45.0",
|
||||
"eslint-config-conventions": "11.0.1",
|
||||
"eslint-config-next": "13.4.12",
|
||||
"eslint-config-prettier": "8.8.0",
|
||||
"eslint-plugin-import": "2.27.5",
|
||||
"eslint-plugin-prettier": "5.0.0",
|
||||
"eslint-plugin-promise": "6.1.1",
|
||||
"eslint-plugin-unicorn": "44.0.2",
|
||||
"html-w3c-validator": "1.2.1",
|
||||
"husky": "8.0.1",
|
||||
"eslint-plugin-unicorn": "48.0.0",
|
||||
"html-w3c-validator": "1.4.0",
|
||||
"husky": "8.0.3",
|
||||
"jsonresume-theme-custom": "file:./jsonresume-theme-custom",
|
||||
"lint-staged": "13.0.3",
|
||||
"markdownlint-cli2": "0.5.1",
|
||||
"postcss": "8.4.18",
|
||||
"prettier": "2.7.1",
|
||||
"prettier-plugin-tailwindcss": "0.1.13",
|
||||
"semantic-release": "19.0.5",
|
||||
"start-server-and-test": "1.14.0",
|
||||
"tailwindcss": "3.2.1",
|
||||
"typescript": "4.8.4",
|
||||
"vercel": "28.4.12"
|
||||
"lint-staged": "13.2.3",
|
||||
"markdownlint-cli2": "0.8.1",
|
||||
"markdownlint-rule-relative-links": "2.1.0",
|
||||
"next-translate-plugin": "2.5.2",
|
||||
"postcss": "8.4.27",
|
||||
"prettier": "3.0.0",
|
||||
"prettier-plugin-tailwindcss": "0.4.1",
|
||||
"semantic-release": "21.0.7",
|
||||
"start-server-and-test": "2.0.0",
|
||||
"tailwindcss": "3.3.3",
|
||||
"typescript": "5.1.6"
|
||||
}
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ const Error404: NextPage<Error404Props> = (props) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head title='404 | Divlo' />
|
||||
<Head title='404 | Théo LUDWIG' />
|
||||
<ErrorPage
|
||||
statusCode={404}
|
||||
message={t('errors:not-found')}
|
||||
|
@ -13,7 +13,7 @@ const Error500: NextPage<Error500Props> = (props) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head title='500 | Divlo' />
|
||||
<Head title='500 | Théo LUDWIG' />
|
||||
<ErrorPage
|
||||
statusCode={500}
|
||||
message={t('errors:server-error')}
|
||||
|
@ -1,9 +1,15 @@
|
||||
import type { GetStaticProps, GetStaticPaths, NextPage } from 'next'
|
||||
import Link from 'next/link'
|
||||
import Image from 'next/image'
|
||||
import { MDXRemote } from 'next-mdx-remote'
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
|
||||
import { faLink } from '@fortawesome/free-solid-svg-icons'
|
||||
import date from 'date-and-time'
|
||||
import Giscus from '@giscus/react'
|
||||
import { useTheme } from 'next-themes'
|
||||
|
||||
import 'katex/dist/katex.min.css'
|
||||
|
||||
import { Head } from 'components/Head'
|
||||
import { Header } from 'components/Header'
|
||||
import type { FooterProps } from 'components/Footer'
|
||||
@ -14,6 +20,26 @@ interface BlogPostPageProps extends FooterProps {
|
||||
post: Post
|
||||
}
|
||||
|
||||
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>
|
||||
)
|
||||
}
|
||||
|
||||
const BlogPostPage: NextPage<BlogPostPageProps> = (props) => {
|
||||
const { version, post } = props
|
||||
|
||||
@ -22,30 +48,47 @@ const BlogPostPage: NextPage<BlogPostPageProps> = (props) => {
|
||||
return (
|
||||
<>
|
||||
<Head
|
||||
title={`${post.frontmatter.title} | Divlo`}
|
||||
title={`${post.frontmatter.title} | Théo LUDWIG`}
|
||||
description={post.frontmatter.description}
|
||||
/>
|
||||
|
||||
<Header />
|
||||
<main className='flex flex-1 flex-col flex-wrap items-center'>
|
||||
<div className='my-10 flex flex-col items-center'>
|
||||
<main className='break-wrap-words flex flex-1 flex-col flex-wrap items-center'>
|
||||
<div className='my-10 flex flex-col items-center text-center'>
|
||||
<h1 className='text-3xl font-semibold'>{post.frontmatter.title}</h1>
|
||||
<p className='mt-2' data-cy='blog-post-date'>
|
||||
{date.format(new Date(post.frontmatter.publishedOn), 'DD/MM/YYYY')}
|
||||
</p>
|
||||
</div>
|
||||
<div className='prose mb-10 px-8'>
|
||||
<div className='prose mb-10'>
|
||||
<div className='px-8'>
|
||||
<MDXRemote
|
||||
{...post.source}
|
||||
components={{
|
||||
h1: Heading,
|
||||
h2: Heading,
|
||||
h3: Heading,
|
||||
h4: Heading,
|
||||
h5: Heading,
|
||||
h6: Heading,
|
||||
img: (properties) => {
|
||||
const { src, alt, ...props } = properties
|
||||
let source = src
|
||||
source = src?.replace('../public/', '/')
|
||||
return <img src={source} alt={alt} {...props} />
|
||||
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) => {
|
||||
if (props.href?.startsWith('#') ?? false) {
|
||||
const { href = '' } = props
|
||||
if (href.startsWith('#')) {
|
||||
return <a {...props} />
|
||||
}
|
||||
return (
|
||||
@ -56,7 +99,7 @@ const BlogPostPage: NextPage<BlogPostPageProps> = (props) => {
|
||||
/>
|
||||
<Giscus
|
||||
id='comments'
|
||||
repo='Divlo/Divlo'
|
||||
repo='theoludwig/theoludwig'
|
||||
repoId='MDEwOlJlcG9zaXRvcnkzNTg5NDg1NDQ='
|
||||
category='General'
|
||||
categoryId='DIC_kwDOFWUewM4CQ_WK'
|
||||
@ -69,6 +112,7 @@ const BlogPostPage: NextPage<BlogPostPageProps> = (props) => {
|
||||
loading='lazy'
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<Footer version={version} />
|
||||
</>
|
||||
@ -78,7 +122,7 @@ const BlogPostPage: NextPage<BlogPostPageProps> = (props) => {
|
||||
export const getStaticProps: GetStaticProps<BlogPostPageProps> = async (
|
||||
context
|
||||
) => {
|
||||
const slug = context?.params?.slug
|
||||
const slug = context?.params?.['slug']
|
||||
const { getPostBySlug } = await import('utils/blog')
|
||||
const post = await getPostBySlug(slug)
|
||||
if (post == null || (post != null && !post.frontmatter.isPublished)) {
|
||||
|
@ -21,7 +21,7 @@ const BlogPage: NextPage<BlogPageProps> = (props) => {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Head title='Blog | Divlo' description={blogDescription} />
|
||||
<Head title='Blog | Théo LUDWIG' description={blogDescription} />
|
||||
|
||||
<Header />
|
||||
<main className='flex flex-1 flex-col flex-wrap items-center'>
|
||||
|
@ -77,8 +77,8 @@ setTimeout(restart, 86400000)
|
||||
##### Example (good way)
|
||||
|
||||
```typescript
|
||||
const MILLISECONDS_IN_A_DAY = 24 * 60 * 60 * 1000
|
||||
setTimeout(restart, MILLISECONDS_IN_A_DAY)
|
||||
const MILLISECONDS_IN_ONE_DAY = 24 * 60 * 60 * 1000
|
||||
setTimeout(restart, MILLISECONDS_IN_ONE_DAY)
|
||||
```
|
||||
|
||||
---
|
||||
@ -131,7 +131,9 @@ const printCar = (car: Car): void => {
|
||||
|
||||
---
|
||||
|
||||
#### Boolean names (Prefix: is, has, can)
|
||||
#### 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)
|
||||
|
||||
@ -171,7 +173,10 @@ We have to keep it as simple as possible, not to implement features that are not
|
||||
import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
|
||||
const createFile = async (name: string, isTemporary: boolean = false) => {
|
||||
const createFile = async (
|
||||
name: string,
|
||||
isTemporary: boolean = false
|
||||
): Promise<void> => {
|
||||
if (isTemporary) {
|
||||
return await fs.promises.writeFile(path.join('temporary', name), '')
|
||||
}
|
||||
@ -187,11 +192,11 @@ const createFile = async (name: string, isTemporary: boolean = false) => {
|
||||
import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
|
||||
const createFile = async (name: string) => {
|
||||
const createFile = async (name: string): Promise<void> => {
|
||||
await fs.promises.writeFile(name, '')
|
||||
}
|
||||
|
||||
const createTemporaryFile = async (name: string) => {
|
||||
const createTemporaryFile = async (name: string): Promise<void> => {
|
||||
await createFile(path.join('temporary', name))
|
||||
}
|
||||
```
|
||||
|
@ -21,7 +21,7 @@ Git was originally authored by [Linus Torvalds](https://en.wikipedia.org/wiki/Li
|
||||
|
||||
Git allows:
|
||||
|
||||
- to be able to work with several people on the same codebase.
|
||||
- to work with several people on the same codebase.
|
||||
- track changes to know who did what and when.
|
||||
- revert changes.
|
||||
|
||||
@ -122,6 +122,13 @@ git checkout <branch>
|
||||
# Merge a branch into the current branch
|
||||
git merge <branch>
|
||||
|
||||
# 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>
|
||||
@ -132,14 +139,11 @@ git fetch --prune
|
||||
# Revert a commit
|
||||
git revert <commit>
|
||||
|
||||
# Change several past commits (interactive rebase)
|
||||
# HEAD points to the current consulted commit.
|
||||
git rebase --interactive HEAD~<number-of-commits>
|
||||
|
||||
# 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>
|
||||
```
|
||||
|
||||
|
@ -13,11 +13,11 @@ This blog is here to document my journey of learning computer science, explainin
|
||||
|
||||
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/Divlo/Divlo) to correct them. 😊
|
||||
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: [@Divlo_FR](https://twitter.com/Divlo_FR).
|
||||
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
|
||||
|
||||
@ -33,20 +33,13 @@ I learn something new, because it solved a "real life" problem I had encountered
|
||||
|
||||
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/Divlo/Divlo), so you can see the code and contribute to it.
|
||||
|
||||
I decided to keep things simple, here are the 2 main features missing on my blog:
|
||||
|
||||
- Comments (you can interact with me on my Twitter account)
|
||||
- Views counter
|
||||
|
||||
That not mean that these features will never be implemented, but to avoid the need of a database now, I dropped out these features.
|
||||
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 SEO (Search Engine Optimization) than a SPA (Single Page Application).
|
||||
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/)
|
||||
|
||||
|
@ -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.divlo.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](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.divlo.fr), I could release a v1.0.0 without these features:
|
||||
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)
|
||||
@ -55,7 +55,7 @@ In my example for [Thream](https://thream.divlo.fr), I could release a v1.0.0 wi
|
||||
- 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.divlo.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](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**.
|
||||
|
||||
|
343
posts/programming-challenges.md
Normal 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)
|
||||
|
||||

|
||||
|
||||
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)
|
@ -7,13 +7,13 @@ publishedOn: '2022-04-11T10:24:55.206Z'
|
||||
|
||||
Hello! 👋
|
||||
|
||||
After months of hard work, [Thream v1.0.0](https://www.thream.divlo.fr/) has been released! 🎉
|
||||
After months of hard work, [Thream v1.0.0](https://thream.theoludwig.fr/) has been released! 🎉
|
||||
|
||||
[**Thream**](https://www.thream.divlo.fr/) is your open-source platform to stay close with your friends and communities, talk, chat, collaborate, share and have fun.
|
||||
[**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://www.thream.divlo.fr/) is a social network to stay close with your friends and communities to talk, chat, collaborate and share.
|
||||
[**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.
|
||||
|
||||
@ -23,15 +23,15 @@ The idea is that a user can create an account to authenticate with an email addr
|
||||
|
||||

|
||||
|
||||
[**Thream**](https://www.thream.divlo.fr/) is a website that works on any recent browser, accessible on [thream.divlo.fr](https://www.thream.divlo.fr/).
|
||||
[**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/Divlo_FR/status/1260638175246135296) by the creator: Divlo.
|
||||
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, with colors close to the image of Divlo.
|
||||
The development of the project begins under the name of **SocialProject**, on August 20, 2020.
|
||||
|
||||

|
||||
|
||||
@ -53,12 +53,7 @@ Since the project is mainly developed during free time (mainly on weekends), the
|
||||
|
||||
- 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.
|
||||
|
||||
<p className='flex flex-col items-center justify-center'>
|
||||
<img
|
||||
alt='HTTP Communication Schema'
|
||||
src='../public/images/posts/thream-v1-0-0/http-communication.png'
|
||||
/>
|
||||
</p>
|
||||

|
||||
|
||||
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.
|
||||
|
||||
@ -121,4 +116,4 @@ The other interest of the project is that it is completely **open-source**, and
|
||||
|
||||
Feel free to give feebacks and suggestions to improve the project, and to report any bug you find.
|
||||
|
||||
**Thream** is available: [**thream.divlo.fr**](https://www.thream.divlo.fr/).
|
||||
**Thream** is available: [**thream.theoludwig.fr**](https://thream.theoludwig.fr/).
|
||||
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 7.5 KiB After Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 92 KiB After Width: | Height: | Size: 92 KiB |
BIN
public/images/portfolio/Carolo.png
Normal file
After Width: | Height: | Size: 96 KiB |
Before Width: | Height: | Size: 110 KiB After Width: | Height: | Size: 110 KiB |
Before Width: | Height: | Size: 189 KiB After Width: | Height: | Size: 189 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 26 KiB |
BIN
public/images/skills/ArchLinux.png
Normal file
After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@ -1,51 +0,0 @@
|
||||
{
|
||||
"name": "Divlo",
|
||||
"short_name": "Divlo",
|
||||
"icons": [
|
||||
{
|
||||
"src": "images/icons/icon-72x72.png",
|
||||
"sizes": "72x72",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "images/icons/icon-96x96.png",
|
||||
"sizes": "96x96",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "images/icons/icon-128x128.png",
|
||||
"sizes": "128x128",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "images/icons/icon-144x144.png",
|
||||
"sizes": "144x144",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "images/icons/icon-152x152.png",
|
||||
"sizes": "152x152",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "images/icons/icon-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "maskable"
|
||||
},
|
||||
{
|
||||
"src": "images/icons/icon-384x384.png",
|
||||
"sizes": "384x384",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "images/icons/icon-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#ffd800",
|
||||
"background_color": "#181818",
|
||||
"start_url": "/",
|
||||
"display": "standalone"
|
||||
}
|
118
resume.json
@ -1,118 +0,0 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
|
||||
"meta": {
|
||||
"theme": "custom"
|
||||
},
|
||||
"basics": {
|
||||
"name": "Théo LUDWIG",
|
||||
"label": "Développeur Full Stack • Passionné de High-Tech",
|
||||
"image": "https://divlo.fr/images/logo_orange.png",
|
||||
"email": "contact@divlo.fr",
|
||||
"location": {},
|
||||
"url": "https://divlo.fr",
|
||||
"summary": "Je me forme en autodidacte dans l'informatique en suivant des formations en ligne et je suis aussi un étudiant à l'université suivant la formation \"BUT Informatique\" (deuxième année). <br/> Je mets en pratique tout ce que j'apprends et réalise de nombreux projets."
|
||||
},
|
||||
"education": [
|
||||
{
|
||||
"startDate": "2022",
|
||||
"studyType": "Diplôme du Bachelor Universitaire de Technologie (BUT) Informatique",
|
||||
"institution": "IUT Robert Schuman à Illkirch-Graffenstaden",
|
||||
"score": "En cours"
|
||||
},
|
||||
{
|
||||
"startDate": "2019",
|
||||
"endDate": "2021",
|
||||
"studyType": "Diplôme du Baccalauréat Général (Mathématiques et Numériques Sciences Informatiques)",
|
||||
"institution": "Lycée Heinrich Nessel à Haguenau",
|
||||
"score": "Mention Assez Bien"
|
||||
},
|
||||
{
|
||||
"startDate": "2014",
|
||||
"endDate": "2018",
|
||||
"studyType": "Diplôme national du brevet",
|
||||
"institution": "Collège Gustave Doré à Hochfelden",
|
||||
"score": "Mention Bien"
|
||||
}
|
||||
],
|
||||
"work": [
|
||||
{
|
||||
"summary": "Développement site web en React.js et Strapi afin de répondre <a href=\"https://www.nuitdelinfo.com/nuitinfo/_media/infos:la_nuit_de_l_info_2021_-_sujet.pdf\">au sujet de la Nuit de l'Info 2021</a>.<br /> TOP 1 France: Défi de l'entreprise <a href=\"https://www.nuitdelinfo.com/inscription/defis/300\">ToolPad</a>.",
|
||||
"website": "https://www.nuitdelinfo.com/",
|
||||
"name": "La Nuit de l'info 2021",
|
||||
"position": "Participation avec l'équipe <a href=\"https://www.nuitdelinfo.com/inscription/equipes/46\">Who are We</a>",
|
||||
"startDate": "2021-12-02",
|
||||
"endDate": "2021-12-03"
|
||||
},
|
||||
{
|
||||
"summary": "Agent administratif en vue de faire face au sucroît temporaire d'activités liés à la numérisation des plans des postes sources <br /> actuellement sous format papier calque suite à la libération des locaux des archives.",
|
||||
"website": "https://www.es.fr/",
|
||||
"name": "ÉS (Électricité de Strasbourg)",
|
||||
"location": "5 Rue André Marie Ampère, 67450 Mundolsheim",
|
||||
"position": "Emploi d'été en qualité d'agent administratif",
|
||||
"startDate": "2021-07-07",
|
||||
"endDate": "2021-07-30"
|
||||
},
|
||||
{
|
||||
"summary": "Hackathon développement d'une landing page et web scraping.",
|
||||
"website": "https://www.wildcodeschool.fr/",
|
||||
"name": "Wild Code School",
|
||||
"location": "32 Rue du Bass. d'Austerlitz, 67100 Strasbourg",
|
||||
"position": "Stage initiation métier développeur web",
|
||||
"startDate": "2019-06-24",
|
||||
"endDate": "2019-06-28"
|
||||
},
|
||||
{
|
||||
"summary": "Développement d'un site web pour trouver un restaurant à la pause repas.",
|
||||
"website": "https://www.itpartners.fr/",
|
||||
"name": "Tribe | IT Partners",
|
||||
"location": "16 Rue du Parc, 67205 Oberhausbergen",
|
||||
"position": "Stage initiation métier développeur web",
|
||||
"startDate": "2019-06-17",
|
||||
"endDate": "2019-06-21"
|
||||
},
|
||||
{
|
||||
"summary": "Apprentissage du métier \"Chargé de communication\" et des logiciels de graphisme tels que \"Adobe Photoshop\".",
|
||||
"website": "https://www.es.fr/",
|
||||
"name": "ÉS (Électricité de Strasbourg)",
|
||||
"location": "26 Bd du Président-Wilson, 67000 Strasbourg",
|
||||
"position": "Stage de découverte (3ème)",
|
||||
"startDate": "2018-02-19",
|
||||
"endDate": "2018-02-23"
|
||||
}
|
||||
],
|
||||
"interests": [
|
||||
{
|
||||
"name": "Développeur Full Stack"
|
||||
},
|
||||
{
|
||||
"name": "Passionné de High-Tech"
|
||||
},
|
||||
{
|
||||
"name": "Enthousiaste de l'Open-Source"
|
||||
}
|
||||
],
|
||||
"skills": [
|
||||
{
|
||||
"keywords": ["JavaScript", "TypeScript", "Python", "C/C++", "PHP"],
|
||||
"name": "Langages de programmation"
|
||||
},
|
||||
{
|
||||
"keywords": ["HTML", "CSS", "Tailwind CSS", "React.js (+ Next.js)"],
|
||||
"name": "Front-end"
|
||||
},
|
||||
{
|
||||
"keywords": ["Laravel", "Node.js", "Fastify", "PostgreSQL"],
|
||||
"name": "Back-end"
|
||||
},
|
||||
{
|
||||
"keywords": [
|
||||
"GNU/Linux",
|
||||
"Ubuntu",
|
||||
"Visual Studio Code",
|
||||
"git",
|
||||
"Docker"
|
||||
],
|
||||
"name": "Logiciels et outils"
|
||||
}
|
||||
]
|
||||
}
|
160
resume.jsonc
Normal file
@ -0,0 +1,160 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/jsonresume/resume-schema/v1.0.0/schema.json",
|
||||
"meta": {
|
||||
"theme": "custom"
|
||||
},
|
||||
"basics": {
|
||||
"name": "Théo LUDWIG",
|
||||
"label": "Développeur Full Stack • Étudiant",
|
||||
"image": "https://theoludwig.fr/images/logo_orange.png",
|
||||
"email": "contact@theoludwig.fr",
|
||||
"age": "31/03/2003",
|
||||
"location": {
|
||||
"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>)."
|
||||
},
|
||||
"education": [
|
||||
{
|
||||
"startDate": "2022",
|
||||
"endDate": "2023",
|
||||
"studyType": "Bachelor Universitaire de Technologie (BUT) Informatique",
|
||||
"institution": "IUT Robert Schuman à Illkirch-Graffenstaden",
|
||||
"score": "2ème année",
|
||||
"courses": [
|
||||
"Développement Web avec le framework Laravel en PHP",
|
||||
"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",
|
||||
"Projet développement d'une application web en React.js en équipe de 3 personnes pendant 3 mois"
|
||||
]
|
||||
},
|
||||
{
|
||||
"startDate": "2021",
|
||||
"endDate": "2022",
|
||||
"studyType": "Bachelor Universitaire de Technologie (BUT) Informatique",
|
||||
"institution": "IUT Robert Schuman à Illkirch-Graffenstaden",
|
||||
"score": "1ère année",
|
||||
"courses": [
|
||||
"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"
|
||||
]
|
||||
},
|
||||
{
|
||||
"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"
|
||||
}
|
||||
// {
|
||||
// "startDate": "2014",
|
||||
// "endDate": "2018",
|
||||
// "studyType": "Diplôme national du brevet",
|
||||
// "institution": "Collège Gustave Doré à Hochfelden",
|
||||
// "score": "Mention Bien"
|
||||
// }
|
||||
],
|
||||
"work": [
|
||||
{
|
||||
"summary": "Développement d'un outil GED (Gestion Électronique de Documents) en React.js, Laravel et GraphQL.",
|
||||
"website": "https://numerize.com/",
|
||||
"name": "Numerize",
|
||||
"location": "4 Rue Sophie Germain, 67720 Hœrdt",
|
||||
"position": "Stagiaire Développeur Web",
|
||||
"startDate": "2023-04-11",
|
||||
"endDate": "2023-07-26",
|
||||
"duration": "4 mois"
|
||||
},
|
||||
{
|
||||
"summary": "Agent administratif - Numérisation et archivage des plans électriques initialement sous format papier calque.",
|
||||
"website": "https://www.es.fr/",
|
||||
"name": "ÉS (Électricité de Strasbourg)",
|
||||
"location": "5 Rue André Marie Ampère, 67450 Mundolsheim",
|
||||
"position": "Emploi d'été en qualité d'agent administratif",
|
||||
"startDate": "2021-07-07",
|
||||
"endDate": "2021-07-30",
|
||||
"duration": "1 mois"
|
||||
},
|
||||
{
|
||||
"summary": "Développement d'un site web pour trouver un restaurant à la pause repas.",
|
||||
"website": "https://www.itpartners.fr/",
|
||||
"name": "Tribe | IT Partners",
|
||||
"location": "16 Rue du Parc, 67205 Oberhausbergen",
|
||||
"position": "Stage initiation métier développeur web",
|
||||
"startDate": "2019-06-17",
|
||||
"endDate": "2019-06-21",
|
||||
"duration": "1 semaine"
|
||||
},
|
||||
{
|
||||
"description": "interests",
|
||||
"summary": "Développement site web en React.js et Strapi.<br /> Classé n°1 en France sur le Défi de l'entreprise <a href=\"https://www.toolpad.fr/\">ToolPad</a>.",
|
||||
"website": "https://www.nuitdelinfo.com/",
|
||||
"name": "La Nuit de l'info 2021",
|
||||
"position": "Participation en équipe de 5 personnes",
|
||||
"startDate": "2021-12-02",
|
||||
"endDate": "2021-12-03",
|
||||
"duration": "1 semaine"
|
||||
},
|
||||
{
|
||||
"description": "interests",
|
||||
"summary": "Hackathon développement d'une landing page et web scraping.",
|
||||
"website": "https://www.wildcodeschool.fr/",
|
||||
"name": "Wild Code School",
|
||||
"location": "32 Rue du Bass. d'Austerlitz, 67100 Strasbourg",
|
||||
"position": "Initiation métier Développeur web",
|
||||
"startDate": "2019-06-24",
|
||||
"endDate": "2019-06-28",
|
||||
"duration": "1 semaine"
|
||||
}
|
||||
// {
|
||||
// "summary": "Apprentissage du métier \"Chargé de communication\" et des logiciels de graphisme tels que \"Adobe Photoshop\".",
|
||||
// "website": "https://www.es.fr/",
|
||||
// "name": "ÉS (Électricité de Strasbourg)",
|
||||
// "location": "26 Bd du Président-Wilson, 67000 Strasbourg",
|
||||
// "position": "Stage de découverte (3ème)",
|
||||
// "startDate": "2018-02-19",
|
||||
// "endDate": "2018-02-23",
|
||||
// "duration": "1 semaine"
|
||||
// }
|
||||
],
|
||||
"interests": [
|
||||
{
|
||||
"name": "Enthousiaste de l'Open-Source"
|
||||
},
|
||||
{
|
||||
"name": "Passionné de High-Tech"
|
||||
}
|
||||
],
|
||||
"skills": [
|
||||
{
|
||||
"keywords": ["JavaScript/TypeScript", "Python", "C/C++", "PHP"],
|
||||
"name": "Langages de programmation"
|
||||
},
|
||||
{
|
||||
"keywords": ["HTML", "CSS", "Tailwind CSS", "React.js/Next.js"],
|
||||
"name": "Frontend"
|
||||
},
|
||||
{
|
||||
"keywords": ["Laravel", "Node.js", "Fastify", "PostgreSQL"],
|
||||
"name": "Backend"
|
||||
},
|
||||
{
|
||||
"keywords": [
|
||||
"GNU/Linux",
|
||||
"Arch Linux",
|
||||
"Visual Studio Code",
|
||||
"Git",
|
||||
"Docker"
|
||||
],
|
||||
"name": "Logiciels et outils"
|
||||
},
|
||||
{
|
||||
"keywords": ["Permis B", "Anglais"],
|
||||
"name": "Autres"
|
||||
}
|
||||
]
|
||||
}
|
@ -2,8 +2,25 @@
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
.break-wrap-words {
|
||||
word-wrap: break-word;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.prose {
|
||||
@apply !max-w-4xl text-gray dark:text-gray-300;
|
||||
@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,
|
||||
@ -28,8 +45,6 @@
|
||||
}
|
||||
.shiki {
|
||||
white-space: pre-wrap !important;
|
||||
word-break: break-word !important;
|
||||
word-wrap: normal;
|
||||
}
|
||||
code {
|
||||
counter-reset: step;
|
||||
@ -43,4 +58,12 @@ code .line::before {
|
||||
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;
|
||||
}
|
||||
|
@ -1,25 +1,24 @@
|
||||
{
|
||||
"extends": "@tsconfig/strictest/tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"target": "ESNext",
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "node",
|
||||
"lib": ["dom", "dom.iterable", "ESNext"],
|
||||
"allowJs": true,
|
||||
"checkJs": true,
|
||||
"jsx": "preserve",
|
||||
"sourceMap": true,
|
||||
"removeComments": true,
|
||||
"noEmit": true,
|
||||
"strict": true,
|
||||
"types": ["cypress"],
|
||||
"baseUrl": ".",
|
||||
"esModuleInterop": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"skipLibCheck": true,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"incremental": true
|
||||
"paths": {
|
||||
"@/*": ["./*"]
|
||||
},
|
||||
"exclude": ["dist", ".next", "out", "next.config.js"],
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"]
|
||||
"types": ["cypress"],
|
||||
"noEmit": true,
|
||||
"moduleResolution": "node",
|
||||
"resolveJsonModule": true,
|
||||
"jsx": "preserve",
|
||||
"incremental": true,
|
||||
"exactOptionalPropertyTypes": false,
|
||||
"verbatimModuleSyntax": false,
|
||||
"isolatedModules": true
|
||||
},
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
|
||||
"exclude": ["node_modules"]
|
||||
}
|
||||
|
@ -7,6 +7,8 @@ import rehypeRaw from 'rehype-raw'
|
||||
import { serialize } from 'next-mdx-remote/serialize'
|
||||
import remarkGfm from 'remark-gfm'
|
||||
import rehypeSlug from 'rehype-slug'
|
||||
import remarkMath from 'remark-math'
|
||||
import rehypeKatex from 'rehype-katex'
|
||||
import matter from 'gray-matter'
|
||||
import { getHighlighter } from 'shiki'
|
||||
|
||||
@ -38,11 +40,17 @@ export const getPosts = async (): Promise<PostMetadata[]> => {
|
||||
const postsWithTime = await Promise.all(
|
||||
posts.map(async (postFilename) => {
|
||||
const [slug, extension] = postFilename.split('.')
|
||||
if (slug == null || extension == null) {
|
||||
throw new Error('Invalid postFilename.')
|
||||
}
|
||||
const blogPostPath = path.join(POSTS_PATH, `${slug}.${extension}`)
|
||||
const blogPostContent = await fs.promises.readFile(blogPostPath, {
|
||||
encoding: 'utf8'
|
||||
})
|
||||
const { data, content } = matter(blogPostContent) as any
|
||||
const { data, content } = matter(blogPostContent) as unknown as {
|
||||
data: FrontMatter
|
||||
content: string
|
||||
}
|
||||
const date = new Date(data.publishedOn)
|
||||
return {
|
||||
slug,
|
||||
@ -78,12 +86,14 @@ export const getPostBySlug = async (
|
||||
const source = await serialize(post.content, {
|
||||
mdxOptions: {
|
||||
remarkPlugins: [
|
||||
remarkGfm as any,
|
||||
[remarkSyntaxHighlightingPlugin, { highlighter }]
|
||||
remarkGfm,
|
||||
[remarkSyntaxHighlightingPlugin, { highlighter }],
|
||||
remarkMath
|
||||
],
|
||||
rehypePlugins: [
|
||||
rehypeSlug as any,
|
||||
[rehypeRaw, { passThrough: nodeTypes }]
|
||||
rehypeSlug,
|
||||
[rehypeRaw, { passThrough: nodeTypes }],
|
||||
rehypeKatex
|
||||
]
|
||||
}
|
||||
})
|
||||
|
@ -1,11 +1,11 @@
|
||||
export const DIVLO_BIRTHDAY_DAY = '31' as const
|
||||
export const DIVLO_BIRTHDAY_MONTH = '03' as const
|
||||
export const DIVLO_BIRTHDAY_YEAR = '2003' as const
|
||||
export const DIVLO_BIRTHDAY_DATE =
|
||||
`${DIVLO_BIRTHDAY_DAY}/${DIVLO_BIRTHDAY_MONTH}/${DIVLO_BIRTHDAY_YEAR}` as const
|
||||
export const DIVLO_BIRTHDAY_DATE_ISO_8061 =
|
||||
`${DIVLO_BIRTHDAY_YEAR}-${DIVLO_BIRTHDAY_MONTH}-${DIVLO_BIRTHDAY_DAY}` as const
|
||||
export const DIVLO_BIRTHDAY = new Date(DIVLO_BIRTHDAY_DATE_ISO_8061)
|
||||
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_STRING =
|
||||
`${BIRTH_DATE_DAY}/${BIRTH_DATE_MONTH}/${BIRTH_DATE_YEAR}` as const
|
||||
export const BIRTH_DATE_ISO_8601 =
|
||||
`${BIRTH_DATE_YEAR}-${BIRTH_DATE_MONTH}-${BIRTH_DATE_DAY}` as const
|
||||
export const BIRTH_DATE = new Date(BIRTH_DATE_ISO_8601)
|
||||
|
||||
/**
|
||||
* Calculates the age of a person based on their birth date
|
||||
|
@ -1,5 +1,5 @@
|
||||
import type { Plugin, Transformer } from 'unified'
|
||||
import type { Literal } from 'unist'
|
||||
import type { Literal, Node } from 'unist'
|
||||
import { visit } from 'unist-util-visit'
|
||||
import type { Highlighter } from 'shiki'
|
||||
|
||||
@ -7,15 +7,17 @@ export interface RemarkSyntaxHighlightingPluginOptions {
|
||||
highlighter: Highlighter
|
||||
}
|
||||
|
||||
export type RemarkSyntaxHighlightingNode = Literal<string> & {
|
||||
export interface RemarkSyntaxHighlightingNode extends Node {
|
||||
lang: string
|
||||
meta: string
|
||||
children: undefined
|
||||
value: string
|
||||
data: Record<string, unknown>
|
||||
}
|
||||
|
||||
export const remarkSyntaxHighlightingPlugin: Plugin<
|
||||
[RemarkSyntaxHighlightingPluginOptions],
|
||||
Literal<string, RemarkSyntaxHighlightingNode>
|
||||
Literal
|
||||
> = (options) => {
|
||||
const transformer: Transformer<RemarkSyntaxHighlightingNode> = (tree) => {
|
||||
visit<RemarkSyntaxHighlightingNode, string>(tree, 'code', (node) => {
|
||||
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"$schema": "https://openapi.vercel.sh/vercel.json",
|
||||
"github": {
|
||||
"enabled": false
|
||||
},
|
||||
"cleanUrls": true
|
||||
}
|