diff --git a/public/photo.png b/public/photo.png new file mode 100644 index 0000000..790a3af Binary files /dev/null and b/public/photo.png differ diff --git a/src/Person.ts b/src/Person.ts new file mode 100644 index 0000000..2a8ef8f --- /dev/null +++ b/src/Person.ts @@ -0,0 +1,4 @@ +export const Person = { + name: "David Hrdina Němeček", + brief: "Software developer, people manager." +}; diff --git a/src/app/components/AboutBrief.tsx b/src/app/components/AboutBrief.tsx new file mode 100644 index 0000000..d682605 --- /dev/null +++ b/src/app/components/AboutBrief.tsx @@ -0,0 +1,15 @@ +import React, { useContext } from 'react'; +import Container from 'react-bootstrap/Container'; +import Image from 'react-bootstrap/Image' +import { PersonContext } from './PersonContext'; + +export default function AboutBrief() { + const person = useContext(PersonContext) + return ( + + Photograph of the person +

{person.name}

+

{person.brief}

+
+ ) +} diff --git a/src/app/components/PersonContext.tsx b/src/app/components/PersonContext.tsx new file mode 100644 index 0000000..5c14173 --- /dev/null +++ b/src/app/components/PersonContext.tsx @@ -0,0 +1,14 @@ +'use client' +import React from 'react'; +import { createContext } from 'react'; +import { Person } from '../../Person'; + +export const PersonContext = createContext(Person); + +export function PersonProvider({ children }) { + return ( + + {children} + + ) +} \ No newline at end of file diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 2fe81d3..0e341da 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -2,11 +2,12 @@ import React from 'react' import { Inter } from 'next/font/google' import './globals.css' +import { PersonProvider } from './components/PersonContext' const inter = Inter({ subsets: ['latin'] }) export const metadata = { - title: 'David Hrdina Němeček | CV', + title: 'David Hrdina Němeček | CV.', description: 'Curriculum Vitae', } @@ -17,7 +18,11 @@ export default function RootLayout({ }) { return ( - {children} + + + {children} + + ) } diff --git a/src/app/page.tsx b/src/app/page.tsx index 3cd426f..5f855ea 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -2,10 +2,13 @@ import React from 'react'; import Container from 'react-bootstrap/Container'; import JobsHistory from './components/JobsHistory'; +import AboutBrief from './components/AboutBrief'; export default function Home() { return ( + + )