diff --git a/public/jobs.json b/public/jobs.json index 42b2f7c..9ceac57 100644 --- a/public/jobs.json +++ b/public/jobs.json @@ -3,7 +3,7 @@ "name": "Czech Quests", "started": "July 2024", "ended": "today", - "description": "Custom project, where I make an addon, for World of Warcraft game, to show Czech translation for in-game quests. The translations are made via AI (DeepL and GPT). Texts are formated for player and quest giver gender. Also it keeps original names of other NPCs, items or places. I also create a web application where i am able to manage translations", + "description": "Custom project, where I make an addon for World of Warcraft game, which show Czech translation for in-game quests. The translations are made via AI (DeepL and GPT). Text is formated for player and quest giver gender. Keep original names of other NPCs, items or places. I also create a web application where i am able to manage translations", "tags": [ "Typescript", "React", @@ -63,7 +63,7 @@ "tags": [ "Typescript", "React", - "GraphQL", + "Graphql", "REST", "Mui", "Azure DevOps" diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..344c613 --- /dev/null +++ b/renovate.json @@ -0,0 +1,3 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json" +} diff --git a/src/app/components/AboutMe.tsx b/src/app/components/AboutMe.tsx index eb8984c..bc94642 100644 --- a/src/app/components/AboutMe.tsx +++ b/src/app/components/AboutMe.tsx @@ -1,4 +1,4 @@ -import {Kbd} from "../../components/Kbd"; +import {Card} from "../../components/Card"; export const AboutMe = () => { const age = Math.floor( @@ -13,9 +13,9 @@ export const AboutMe = () => { <>

- Hello, my name is Roman Jaroš. I am {age}. {work} years working as software engineer. + 👋, my name is Roman Jaroš. I am {age}. {work} years working as software engineer. I have been programming since I was 15 years old and still love to learn new technologies. - Outside of the programming world, I maintain servers with around 80 docker containers. + Outside of the programming world, I maintain servers with about 120 docker containers. Outside of the IT world, I enjoy reading self improvement books, meditating, alternative medicine and model painting or playing video games.

@@ -24,11 +24,9 @@ export const AboutMe = () => { I am contractor and currently only for full remote jobs.


-
- #uidesign - #webdevelopment - #automationtesting - #devops +
+ +
diff --git a/src/app/components/Contact.tsx b/src/app/components/Contact.tsx index 8a5307c..b8087e3 100644 --- a/src/app/components/Contact.tsx +++ b/src/app/components/Contact.tsx @@ -1,4 +1,4 @@ -import {GithubIcon, LinkedinIcon, MailIcon, ScrollTextIcon} from "lucide-react"; +import {GithubIcon, InfoIcon, LinkedinIcon, MailIcon} from "lucide-react"; export const Contact = () => { return ( @@ -8,19 +8,12 @@ export const Contact = () => { - Hire me - - - Download CV + className="flex gap-2 focus:outline-none text-white bg-yellow-400 hover:bg-yellow-500 focus:ring-4 focus:ring-yellow-300 font-medium rounded-lg px-5 py-2.5 me-2 mb-2 dark:text-slate-600 dark:focus:ring-yellow-900"> + Send e-mail

- + { - const {jobs, filter} = useJobs() +type JobsProps = { + jobs: Job[] | undefined +} + +export const Jobs: FC = ({jobs}) => { return ( <>

    - {jobs - ?.filter(notNil) - .filter(({tags}) => filter != undefined ? tags.includes(filter) : true) - .map(({name, started, ended, description, tags, link}, index) => ( -
  1. + {jobs?.filter(notNil).map(({name, started, ended, description, tags, link}, index) => ( +
  2. -

    - {name} -

    - -

    - {description} +

    + {name} +

    + +

    + {description} +

    + {link != undefined && +

    + + Visit website + +

    - {link != undefined && -

    - - Visit website - - -

    - } -

    - {tags.sort().map((name) => ( - + } +

    + {tags.sort().map((name) => ( + {name} - ))} -

    -
  3. - ))} + ))} +

    + + ))}
diff --git a/src/app/components/Skills.tsx b/src/app/components/Skills.tsx index 8bb5d7e..e4b8771 100644 --- a/src/app/components/Skills.tsx +++ b/src/app/components/Skills.tsx @@ -1,53 +1,40 @@ -"use client" - -import {notNil} from "../../utils/notNil"; +import {notNil} from "../../utils"; import {StarIcon} from "lucide-react"; import {FC} from "react"; -import {useJobs} from "../context/useJobs"; +import {Job} from "../type"; -export const Skills: FC = () => { - const {jobs, filterJobs, filter} = useJobs() - const skills = new Set(jobs.filter(notNil).flatMap(({tags}) => tags).sort()); +type SkillsProps = { + jobs: Job[] | undefined +} + +export const Skills: FC = ({jobs}) => { + + const skills = new Set(jobs?.filter(notNil).flatMap(({tags}) => tags).sort()); return ( <>
-

Czech, native

- - - +

Czech

-

English, B1

+

English 

- - -
-
-
- {Array.from(skills)?.map((name) => ( - filterJobs(name)} - className={[ - "cursor-pointer text-xs font-medium me-2 px-2.5 py-0.5 rounded-full select-none", - filter === name - ? "bg-red-100 text-red-800 dark:bg-red-900 dark:text-red-300" - : "bg-indigo-100 text-indigo-800 dark:bg-indigo-900 dark:text-indigo-300" - ].join(" ")}> - {name} - - ))} -
-

Psss, you can click on pill to filter.

+
+ {Array.from(skills)?.map((name) => ( + + {name} + + ))}
) diff --git a/src/app/components/Title.tsx b/src/app/components/Title.tsx index 781f042..b8f4afa 100644 --- a/src/app/components/Title.tsx +++ b/src/app/components/Title.tsx @@ -1,9 +1,12 @@ export const Title = () => { return ( -
+
+ <

- Roman Jaroš + Just + Roman

+  />
) } \ No newline at end of file diff --git a/src/app/context/JobsContext.tsx b/src/app/context/JobsContext.tsx deleted file mode 100644 index f974658..0000000 --- a/src/app/context/JobsContext.tsx +++ /dev/null @@ -1,25 +0,0 @@ -"use client" - -import {createContext, ReactNode, FC, useState, Dispatch, SetStateAction} from "react"; -import {Job} from "../type"; - -type JobsContextPayload = { - data: Job[] - filter?: string - setFilter: Dispatch> -} | undefined - -export const JobsContext = createContext(undefined); - -type JobsContextProviderProps = { - jobs: Job[] - children: ReactNode[] -} - -export const JobsProvider: FC = ({children, jobs: data}) => { - const [filter, setFilter] = useState() - - return ( - {children} - ) -} \ No newline at end of file diff --git a/src/app/context/useJobs.ts b/src/app/context/useJobs.ts deleted file mode 100644 index c4b27b9..0000000 --- a/src/app/context/useJobs.ts +++ /dev/null @@ -1,25 +0,0 @@ -"use client" - -import {useContext} from "react"; -import {JobsContext} from "./JobsContext"; - -export const useJobs = () => { - const context = useContext(JobsContext) - if (!context) { - throw new Error('useJobs must be used within a JobsProvider!'); - } - - const handleFilterJob = (name: string) => { - if (name === context.filter) { - context.setFilter(undefined) - } else { - context.setFilter(name) - } - } - - return { - jobs: context.data, - filter: context?.filter, - filterJobs: handleFilterJob, - } -} \ No newline at end of file diff --git a/src/app/fetch.ts b/src/app/fetch.ts deleted file mode 100644 index b3343d9..0000000 --- a/src/app/fetch.ts +++ /dev/null @@ -1,6 +0,0 @@ -import {Job} from "./type"; - -export const fetchJobs = async (): Promise => { - const res = await fetch(`${process.env.NEXT_PUBLIC_SITE_URL}/jobs.json`, {cache: "no-store"}) - return await res?.json(); -} \ No newline at end of file diff --git a/src/app/layout.tsx b/src/app/layout.tsx index c744b8a..5669178 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -8,16 +8,13 @@ export default function AppLayout({ }) { return ( - - - Roman Jaroš - - - - -
{children}
- - - ) + + + + + +
{children}
+ + + ) } \ No newline at end of file diff --git a/src/app/page.tsx b/src/app/page.tsx index 0282764..4af9bd5 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -4,24 +4,21 @@ import {Contact} from "./components/Contact"; import {Footer} from "./components/Footer"; import {Jobs} from "./components/Jobs"; import {Skills} from "./components/Skills"; -import {fetchJobs} from "./fetch"; -import {JobsProvider} from "./context/JobsContext"; -import {use} from "react"; +import {Job} from "./type"; -export default function Page() { +export default async function Page() { - const jobs = use(fetchJobs()) + const res = await fetch(`${process.env.NEXT_PUBLIC_SITE_URL}/jobs.json`, {cache: "no-store"}) + const data: Job[] | undefined = await res?.json(); return ( <> -
+
<AboutMe /> <Contact /> - <JobsProvider jobs={jobs ?? []}> - <Skills /> - <Jobs /> - </JobsProvider> + <Skills jobs={data} /> + <Jobs jobs={data} /> <Footer /> </div> </> diff --git a/src/components/Card.tsx b/src/components/Card.tsx new file mode 100644 index 0000000..b436f24 --- /dev/null +++ b/src/components/Card.tsx @@ -0,0 +1,17 @@ +import {FC} from "react"; + +type CardProps = { + title: string; + description: string; +} + +export const Card: FC<CardProps> = ({title, description}) => { + return ( + <div + className="w-full md:w-80 block p-6 bg-white border border-gray-200 rounded-lg shadow dark:bg-gray-800 dark:border-gray-700" + > + <h5 className="mb-2 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">{title}</h5> + <p className="font-normal text-gray-700 dark:text-gray-400">{description}</p> + </div> + ) +} \ No newline at end of file diff --git a/src/components/Kbd.tsx b/src/components/Kbd.tsx deleted file mode 100644 index 4a93b45..0000000 --- a/src/components/Kbd.tsx +++ /dev/null @@ -1,14 +0,0 @@ -import {FC} from "react"; - -type KbdProps = { - children: string -} - -export const Kbd: FC<KbdProps> = ({children}) => { - return ( - <kbd - className="px-2 py-1.5 text-xs font-semibold text-gray-800 bg-gray-100 border border-gray-200 rounded-lg dark:bg-gray-600 dark:text-gray-100 dark:border-gray-500"> - {children} - </kbd> - ) -} \ No newline at end of file diff --git a/src/utils/notNil.ts b/src/utils.ts similarity index 100% rename from src/utils/notNil.ts rename to src/utils.ts