1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2024-10-05 13:06:10 +02:00

Compare commits

..

No commits in common. "8a59e9034fa825b0baa5699788652a8478cb963c" and "5f3dfad9886a03e00e2d1e67be6e7759b623f52b" have entirely different histories.

13 changed files with 1344 additions and 2843 deletions

1
.devcontainer/Dockerfile Normal file
View File

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

View File

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

View File

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

View File

@ -3,9 +3,13 @@
"extends": [ "extends": [
"conventions", "conventions",
"next/core-web-vitals", "next/core-web-vitals",
"plugin:tailwindcss/recommended" "plugin:tailwindcss/recommended",
"prettier"
], ],
"plugins": ["import", "promise", "unicorn"], "plugins": ["prettier"],
"parserOptions": {
"project": "./tsconfig.json"
},
"settings": { "settings": {
"tailwindcss": { "tailwindcss": {
"callees": ["classNames"] "callees": ["classNames"]
@ -15,6 +19,7 @@
} }
}, },
"rules": { "rules": {
"prettier/prettier": "error",
"react/self-closing-comp": [ "react/self-closing-comp": [
"error", "error",
{ {
@ -28,11 +33,7 @@
"overrides": [ "overrides": [
{ {
"files": ["*.ts", "*.tsx"], "files": ["*.ts", "*.tsx"],
"parser": "@typescript-eslint/parser", "parser": "@typescript-eslint/parser"
"plugins": ["@typescript-eslint"],
"parserOptions": {
"project": "./tsconfig.json"
}
} }
] ]
} }

10
.gitpod.yml Normal file
View File

@ -0,0 +1,10 @@
image: "gitpod/workspace-full"
tasks:
- before: "cp .env.example .env"
init: "npm clean-install"
command: "npm run dev"
ports:
- port: 3000
onOpen: "open-preview"

View File

@ -29,6 +29,8 @@ The commit message guidelines adheres to [Conventional Commits](https://www.conv
## Getting Started ## Getting Started
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/theoludwig/theoludwig)
### Prerequisites ### Prerequisites
- [Node.js](https://nodejs.org/) >= 20.0.0 - [Node.js](https://nodejs.org/) >= 20.0.0
@ -64,6 +66,6 @@ npm run dev
docker compose up --build docker compose up --build
``` ```
### Service started ### Services started
`website`: <http://127.0.0.1:3000> - `website`: <http://127.0.0.1:3000>

View File

@ -26,14 +26,14 @@ const Heading = (
): JSX.Element => { ): JSX.Element => {
const { children, id = "" } = props const { children, id = "" } = props
return ( return (
<h2 {...props}> <h2 {...props} className="group">
<Link href={`#${id}`} className="group relative hover:no-underline"> <Link
<FontAwesomeIcon href={`#${id}`}
className="absolute bottom-2 left-[-26px] mr-2 hidden size-4 !text-black group-hover:inline dark:!text-white" className="invisible !text-black group-hover:visible dark:!text-white"
icon={faLink} >
/> <FontAwesomeIcon className="mr-2 inline size-4" icon={faLink} />
{children}
</Link> </Link>
{children}
</h2> </h2>
) )
} }

View File

@ -58,7 +58,7 @@ export const SwitchTheme = (props: SwitchThemeProps): JSX.Element => {
</div> </div>
<div <div
className={classNames( className={classNames(
"absolute top-px box-border size-[22px] rounded-[50%] bg-[#fafafa] text-white transition-all duration-[250ms] ease-in-out", "absolute top-[1px] box-border size-[22px] rounded-[50%] bg-[#fafafa] text-white transition-all duration-[250ms] ease-in-out",
{ {
"left-[27px]": theme === "dark", "left-[27px]": theme === "dark",
"left-0": theme === "light", "left-0": theme === "light",
@ -70,7 +70,7 @@ export const SwitchTheme = (props: SwitchThemeProps): JSX.Element => {
data-cy="switch-theme-input" data-cy="switch-theme-input"
type="checkbox" type="checkbox"
aria-label="Dark mode toggle" aria-label="Dark mode toggle"
className="absolute -m-px hidden size-px overflow-hidden border-0 p-0" className="absolute m-[-1px] hidden size-[1px] overflow-hidden border-0 p-0"
defaultChecked defaultChecked
/> />
</div> </div>

View File

@ -12,9 +12,9 @@
"modern-normalize": "2.0.0" "modern-normalize": "2.0.0"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "20.12.12", "@types/node": "20.12.7",
"date-and-time": "3.3.0", "date-and-time": "3.1.1",
"vite": "5.2.11", "vite": "5.2.8",
"vite-plugin-html": "3.2.2" "vite-plugin-html": "3.2.2"
} }
}, },
@ -694,11 +694,10 @@
"dev": true "dev": true
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.12.12", "version": "20.12.7",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.12.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.12.7.tgz",
"integrity": "sha512-eWLDGF/FOSPtAvEqeRAQ4C8LSA7M1I7i0ky1I8U7kD1J5ITyW3AsRhQrKVoWf5pFKZ2kILsEGJhsI9r93PYnOw==", "integrity": "sha512-wq0cICSkRLVaf3UGLMGItu/PtdY7oaXaI/RVU+xliKVOtRna3PRY57ZDfztpDL0n11vfymMUnXv8QwYCO7L1wg==",
"dev": true, "dev": true,
"license": "MIT",
"dependencies": { "dependencies": {
"undici-types": "~5.26.4" "undici-types": "~5.26.4"
} }
@ -897,11 +896,10 @@
} }
}, },
"node_modules/date-and-time": { "node_modules/date-and-time": {
"version": "3.3.0", "version": "3.1.1",
"resolved": "https://registry.npmjs.org/date-and-time/-/date-and-time-3.3.0.tgz", "resolved": "https://registry.npmjs.org/date-and-time/-/date-and-time-3.1.1.tgz",
"integrity": "sha512-UguWfh9LkUecVrGSE0B7SpAnGRMPATmpwSoSij24/lDnwET3A641abfDBD/TdL0T+E04f8NWlbMkD9BscVvIZg==", "integrity": "sha512-N9kstidT3P0VUk1iKOFilOZ6251r6iTUNx9M9kvgL2jqOk9mljWZUq5CjAtYwCnppWHbERk5YFQUrSbY7FQOpA==",
"dev": true, "dev": true
"license": "MIT"
}, },
"node_modules/dom-serializer": { "node_modules/dom-serializer": {
"version": "1.4.1", "version": "1.4.1",
@ -1644,11 +1642,10 @@
} }
}, },
"node_modules/vite": { "node_modules/vite": {
"version": "5.2.11", "version": "5.2.8",
"resolved": "https://registry.npmjs.org/vite/-/vite-5.2.11.tgz", "resolved": "https://registry.npmjs.org/vite/-/vite-5.2.8.tgz",
"integrity": "sha512-HndV31LWW05i1BLPMUCE1B9E9GFbOu1MbenhS58FuK6owSO5qHm7GiCotrNY1YE5rMeQSFBGmT5ZaLEjFizgiQ==", "integrity": "sha512-OyZR+c1CE8yeHw5V5t59aXsUPPVTHMDjEZz8MgguLL/Q7NblxhZUlTu9xSPqlsUO/y+X7dlU05jdhvyycD55DA==",
"dev": true, "dev": true,
"license": "MIT",
"dependencies": { "dependencies": {
"esbuild": "^0.20.1", "esbuild": "^0.20.1",
"postcss": "^8.4.38", "postcss": "^8.4.38",

View File

@ -13,9 +13,9 @@
"modern-normalize": "2.0.0" "modern-normalize": "2.0.0"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "20.12.12", "@types/node": "20.12.7",
"date-and-time": "3.3.0", "date-and-time": "3.1.1",
"vite": "5.2.11", "vite": "5.2.8",
"vite-plugin-html": "3.2.2" "vite-plugin-html": "3.2.2"
} }
} }

View File

@ -3,6 +3,7 @@ describe("Page /blog/[slug]", () => {
cy.visit("/blog/hello-world") cy.visit("/blog/hello-world")
cy.get("[data-cy=locale-flag-text]").should("not.exist") cy.get("[data-cy=locale-flag-text]").should("not.exist")
cy.get("main h1").should("have.text", "👋 Hello, world!") cy.get("main h1").should("have.text", "👋 Hello, world!")
cy.get(".prose a:visible").should("have.attr", "target", "_blank")
}) })
it("should redirect to /404 if the blog post doesn't exist", () => { it("should redirect to /404 if the blog post doesn't exist", () => {

4020
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{ {
"name": "theoludwig", "name": "theoludwig",
"version": "3.2.6", "version": "3.2.5",
"private": true, "private": true,
"repository": { "repository": {
"type": "git", "type": "git",
@ -29,61 +29,63 @@
"postinstall": "husky" "postinstall": "husky"
}, },
"dependencies": { "dependencies": {
"@fontsource/montserrat": "5.0.18", "@fontsource/montserrat": "5.0.17",
"@formatjs/intl-localematcher": "0.5.4", "@formatjs/intl-localematcher": "0.5.4",
"@fortawesome/fontawesome-svg-core": "6.5.2", "@fortawesome/fontawesome-svg-core": "6.5.2",
"@fortawesome/free-brands-svg-icons": "6.5.2", "@fortawesome/free-brands-svg-icons": "6.5.2",
"@fortawesome/free-solid-svg-icons": "6.5.2", "@fortawesome/free-solid-svg-icons": "6.5.2",
"@fortawesome/react-fontawesome": "0.2.1", "@fortawesome/react-fontawesome": "0.2.0",
"@giscus/react": "3.0.0", "@giscus/react": "3.0.0",
"clsx": "2.1.1", "clsx": "2.1.0",
"date-and-time": "3.3.0", "date-and-time": "3.1.1",
"gray-matter": "4.0.3", "gray-matter": "4.0.3",
"html-react-parser": "5.1.10", "html-react-parser": "5.1.10",
"i18n-js": "4.4.3", "i18n-js": "4.3.2",
"katex": "0.16.10", "katex": "0.16.10",
"negotiator": "0.6.3", "negotiator": "0.6.3",
"next": "14.1.0", "next": "14.1.0",
"next-mdx-remote": "4.4.1", "next-mdx-remote": "4.4.1",
"react": "18.3.1", "react": "18.2.0",
"react-dom": "18.3.1", "react-dom": "18.2.0",
"read-pkg": "9.0.1", "read-pkg": "9.0.1",
"rehype-katex": "6.0.3", "rehype-katex": "6.0.3",
"rehype-raw": "6.1.1", "rehype-raw": "6.1.1",
"rehype-slug": "5.1.0", "rehype-slug": "5.1.0",
"remark-gfm": "3.0.1", "remark-gfm": "3.0.1",
"remark-math": "5.1.1", "remark-math": "5.1.1",
"sharp": "0.33.4", "sharp": "0.33.3",
"shiki": "0.14.7", "shiki": "0.14.7",
"unified": "10.1.2", "unified": "10.1.2",
"unist-util-visit": "5.0.0", "unist-util-visit": "5.0.0",
"universal-cookie": "7.1.4" "universal-cookie": "7.1.4"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "19.2.2", "@commitlint/cli": "19.1.0",
"@commitlint/config-conventional": "19.2.2", "@commitlint/config-conventional": "19.1.0",
"@saithodev/semantic-release-backmerge": "4.0.1", "@saithodev/semantic-release-backmerge": "4.0.1",
"@semantic-release/git": "10.0.1", "@semantic-release/git": "10.0.1",
"@tailwindcss/typography": "0.5.13", "@tailwindcss/typography": "0.5.12",
"@total-typescript/ts-reset": "0.5.1", "@total-typescript/ts-reset": "0.5.1",
"@tsconfig/strictest": "2.0.5", "@tsconfig/strictest": "2.0.5",
"@types/negotiator": "0.6.3", "@types/negotiator": "0.6.3",
"@types/node": "20.12.12", "@types/node": "20.12.7",
"@types/react": "18.3.2", "@types/react": "18.2.78",
"@types/unist": "3.0.2", "@types/unist": "3.0.2",
"@typescript-eslint/eslint-plugin": "7.10.0", "@typescript-eslint/eslint-plugin": "7.6.0",
"@typescript-eslint/parser": "7.10.0", "@typescript-eslint/parser": "7.6.0",
"autoprefixer": "10.4.19", "autoprefixer": "10.4.19",
"curriculum-vitae": "file:./curriculum-vitae", "curriculum-vitae": "file:./curriculum-vitae",
"cypress": "13.9.0", "cypress": "13.7.3",
"editorconfig-checker": "5.1.5", "editorconfig-checker": "5.1.5",
"eslint": "8.57.0", "eslint": "8.56.0",
"eslint-config-conventions": "14.2.0", "eslint-config-conventions": "14.1.0",
"eslint-config-next": "14.1.0", "eslint-config-next": "14.1.0",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-import": "2.29.1", "eslint-plugin-import": "2.29.1",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-promise": "6.1.1", "eslint-plugin-promise": "6.1.1",
"eslint-plugin-tailwindcss": "3.15.2", "eslint-plugin-tailwindcss": "3.14.2",
"eslint-plugin-unicorn": "53.0.0", "eslint-plugin-unicorn": "51.0.1",
"html-w3c-validator": "1.6.1", "html-w3c-validator": "1.6.1",
"husky": "9.0.11", "husky": "9.0.11",
"lint-staged": "15.2.2", "lint-staged": "15.2.2",
@ -91,8 +93,8 @@
"markdownlint-rule-relative-links": "2.3.2", "markdownlint-rule-relative-links": "2.3.2",
"postcss": "8.4.38", "postcss": "8.4.38",
"prettier": "3.2.5", "prettier": "3.2.5",
"prettier-plugin-tailwindcss": "0.5.14", "prettier-plugin-tailwindcss": "0.5.13",
"semantic-release": "23.1.1", "semantic-release": "23.0.8",
"start-server-and-test": "2.0.3", "start-server-and-test": "2.0.3",
"tailwindcss": "3.4.3", "tailwindcss": "3.4.3",
"typescript": "5.4.5" "typescript": "5.4.5"