From d9bf8a09e941f54976b96b5c8c2f25f6ae280e77 Mon Sep 17 00:00:00 2001 From: Vojtech Mares Date: Mon, 1 Jan 2024 13:15:14 +0100 Subject: [PATCH 01/10] refactor(vojtechmares.com): fix homepage test and change email iam@vojtechmares.com to jsem@... Signed-off-by: Vojtech Mares --- .../components/homepage/CallToAction.tsx | 2 +- apps/vojtechmares.com/components/homepage/Hero.tsx | 2 +- .../components/homepage/Services.tsx | 4 ++-- apps/vojtechmares.com/components/layout/Footer.tsx | 4 ++-- apps/vojtechmares.com/components/layout/Header.tsx | 2 +- .../components/layout/Navigation.tsx | 2 +- .../components/trainingpage/TrainingLayout.tsx | 2 +- .../tests/{Home.test.tsx => Homepage.test.tsx} | 12 ++++++------ 8 files changed, 15 insertions(+), 15 deletions(-) rename apps/vojtechmares.com/tests/{Home.test.tsx => Homepage.test.tsx} (83%) diff --git a/apps/vojtechmares.com/components/homepage/CallToAction.tsx b/apps/vojtechmares.com/components/homepage/CallToAction.tsx index dcd1906..01fe852 100644 --- a/apps/vojtechmares.com/components/homepage/CallToAction.tsx +++ b/apps/vojtechmares.com/components/homepage/CallToAction.tsx @@ -16,7 +16,7 @@ export function CallToAction() { Je na čase pozvednout Vaši infrastrukturu na dnešní standardy. Infrastruktura má ukázat Vaši aplikaci světu, ne ji držet při zemi.

diff --git a/apps/vojtechmares.com/tests/Home.test.tsx b/apps/vojtechmares.com/tests/Homepage.test.tsx similarity index 83% rename from apps/vojtechmares.com/tests/Home.test.tsx rename to apps/vojtechmares.com/tests/Homepage.test.tsx index f91e49b..57df845 100644 --- a/apps/vojtechmares.com/tests/Home.test.tsx +++ b/apps/vojtechmares.com/tests/Homepage.test.tsx @@ -1,9 +1,9 @@ import { expect, test } from "vitest"; import { render, screen, within } from "@testing-library/react"; -import Home from "../pages"; +import Page from "../app/page"; -test("home", () => { - render(); +test("homepage", () => { + render(); const main = within(screen.getByRole("main")); expect( main.getByRole("heading", { @@ -19,18 +19,18 @@ test("home", () => { if (element instanceof HTMLSpanElement) { const parent = element.closest("a"); expect(parent?.getAttribute("href")).toBe( - "mailto:iam@vojtechmares.com" + "mailto:jsem@vojtechmares.com" ) return; } expect(element.getAttribute("href")).toBe( - "mailto:iam@vojtechmares.com" + "mailto:jsem@vojtechmares.com" ) }); - expect(writeMe).toHaveLength(6); + expect(writeMe).toHaveLength(4); // const footer = within(screen.getByRole('contentinfo')) // const link = within(footer.getByRole('link')) From bad9247c07b756435a5cde286d5f52ee353deacd Mon Sep 17 00:00:00 2001 From: Vojtech Mares Date: Mon, 1 Jan 2024 13:16:21 +0100 Subject: [PATCH 02/10] chore: bump node to 20.x Signed-off-by: Vojtech Mares --- apps/og/package.json | 2 +- apps/vojtechmares.com/package.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/og/package.json b/apps/og/package.json index 4083d3c..2d8b5f4 100644 --- a/apps/og/package.json +++ b/apps/og/package.json @@ -30,7 +30,7 @@ "typescript": "^5.2.2" }, "engines": { - "node": "18.x" + "node": "20.x" }, "packageManager": "pnpm@8.8.0" } diff --git a/apps/vojtechmares.com/package.json b/apps/vojtechmares.com/package.json index 12cfee0..9660a64 100644 --- a/apps/vojtechmares.com/package.json +++ b/apps/vojtechmares.com/package.json @@ -45,7 +45,7 @@ "vitest": "^0.34.6" }, "engines": { - "node": "18.x" + "node": "20.x" }, "packageManager": "pnpm@8.8.0" } diff --git a/package.json b/package.json index 30fe912..68ae8c4 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,7 @@ "turbo": "^1.10.12" }, "engines": { - "node": "18.x" + "node": "20.x" }, "packageManager": "pnpm@8.8.0" } From 754f01c68177e08f30caa658edc5eed10444a47a Mon Sep 17 00:00:00 2001 From: Vojtech Mares Date: Mon, 1 Jan 2024 13:22:37 +0100 Subject: [PATCH 03/10] refactor(vojtechmares.com): hide service price Signed-off-by: Vojtech Mares --- apps/vojtechmares.com/components/homepage/Services.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/vojtechmares.com/components/homepage/Services.tsx b/apps/vojtechmares.com/components/homepage/Services.tsx index 20e2f78..a2d5a9d 100644 --- a/apps/vojtechmares.com/components/homepage/Services.tsx +++ b/apps/vojtechmares.com/components/homepage/Services.tsx @@ -49,9 +49,9 @@ function Service({ )} >

{name}

-

+ {/*

{price} -

+

*/}

Date: Mon, 1 Jan 2024 13:23:21 +0100 Subject: [PATCH 04/10] refactor(vojtechmares.com): use map to iterate over nav links Signed-off-by: Vojtech Mares --- .../components/layout/Navigation.tsx | 40 +++++++++++++------ 1 file changed, 27 insertions(+), 13 deletions(-) diff --git a/apps/vojtechmares.com/components/layout/Navigation.tsx b/apps/vojtechmares.com/components/layout/Navigation.tsx index a20f0c2..fc5a4e7 100644 --- a/apps/vojtechmares.com/components/layout/Navigation.tsx +++ b/apps/vojtechmares.com/components/layout/Navigation.tsx @@ -2,6 +2,22 @@ import Link from "next/link"; import { Container } from "@/components/Container"; import { Button } from "@/components/Button"; +import { link } from "fs"; + +const links = [ + { + name: "Školení", + href: "/#skoleni", + }, + { + name: "Blog", + href: "https://vojtechmares.blog/", + }, + // { + // name: "Případové studie", + // href: "/pripadove-studie", + // }, +]; export function Navigation() { return ( @@ -14,19 +30,17 @@ export function Navigation() { Vojtěch Mareš

- - Školení - - {/* Případové studie */} - - Blog - + {links.map((link) => + ( + + {link.name} + + ) + )}
From 6787927df84e35221f95698ebba96dbc21d3395e Mon Sep 17 00:00:00 2001 From: Vojtech Mares Date: Mon, 1 Jan 2024 13:24:28 +0100 Subject: [PATCH 05/10] refactor(vojtechmares.com): footer items, spacing Signed-off-by: Vojtech Mares --- apps/vojtechmares.com/components/layout/Footer.tsx | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/apps/vojtechmares.com/components/layout/Footer.tsx b/apps/vojtechmares.com/components/layout/Footer.tsx index b3c716a..a80ee57 100644 --- a/apps/vojtechmares.com/components/layout/Footer.tsx +++ b/apps/vojtechmares.com/components/layout/Footer.tsx @@ -9,7 +9,7 @@ export function Footer() {