Browse Source

Restructure header to make it more responsive

master
Dejvino 11 months ago
parent
commit
59677e3d7f
4 changed files with 24 additions and 14 deletions
  1. +3
    -8
      src/app/components/AboutBrief.tsx
  2. +5
    -4
      src/app/components/Contacts.tsx
  3. +8
    -0
      src/app/components/Photo.tsx
  4. +8
    -2
      src/app/page.tsx

+ 3
- 8
src/app/components/AboutBrief.tsx View File

@@ -7,14 +7,9 @@ import { Col, Row } from 'react-bootstrap';
export default function AboutBrief() {
const person = usePersonContext()
return (
<Container className='about-brief' fluid>
<Row>
<Col><Image alt='Photograph of the person' rounded fluid src='photo.png'></Image></Col>
<Col xs={7} sm={'auto'} lg={8}>
<h1>{person.name}</h1>
<p className='brief'>{person.brief}</p>
</Col>
</Row>
<Container className='about-brief' fluid>
<h1>{person.name}</h1>
<p className='brief'>{person.brief}</p>
</Container>
)
}

+ 5
- 4
src/app/components/Contacts.tsx View File

@@ -22,9 +22,8 @@ export function Contact(props: {icon?: string, text: string}) {
textElement = <a href={url} className='contact-link' target='_blank'>{props.text}</a>
}
return (
<Col className='contact'>
<i className={'bi-' + props.icon}> </i>
{textElement}
<Col className='contact' xs={'auto'}>
<i className={'bi-' + props.icon}></i>&nbsp;{textElement}
</Col>
)
}
@@ -34,7 +33,9 @@ export function Contacts() {
const focus = useAutoFocus<HTMLDivElement>('contacts')
return (
<Container ref={focus} className='contacts' fluid>
<h2>Contacts</h2>
<Row>
<h2>Contacts</h2>
</Row>
<Row>
{person.contacts.map((contact, index) => (
<Contact key={index} {...contact} />


+ 8
- 0
src/app/components/Photo.tsx View File

@@ -0,0 +1,8 @@
import React from 'react';
import Image from 'react-bootstrap/Image'

export default function Photo() {
return (
<Image alt='Photograph of the person' rounded fluid src='photo.png'></Image>
)
}

+ 8
- 2
src/app/page.tsx View File

@@ -8,14 +8,20 @@ import WorkExperience from './components/WorkExperience';
import Education from './components/Education';
import { Col, Row } from 'react-bootstrap';
import Footer from './components/Footer';
import Photo from './components/Photo';

export default function Home() {
return (

<Container className='main-container' fluid='xxl'>
<Row>
<Col md={12} lg={8}><AboutBrief /></Col>
<Col md={12} lg={4}><Contacts /></Col>
<Col xs={'auto'} sm={4} lg={2}><Photo /></Col>
<Col>
<Row>
<Col xs={'auto'} lg={6}><AboutBrief /></Col>
<Col xs={'auto'} lg={6}><Contacts /></Col>
</Row>
</Col>
</Row>
<Row><WorkExperience /></Row>
<Row><Education /></Row>


Loading…
Cancel
Save