Add Resume component

This commit is contained in:
LordMathis 2019-11-10 15:23:14 +01:00
parent adb56df67f
commit fa568fb48f
No known key found for this signature in database
GPG Key ID: 575849FD91CE470C
2 changed files with 53 additions and 0 deletions

40
src/components/Resume.js Normal file
View File

@ -0,0 +1,40 @@
import PropTypes from 'prop-types'
import React, { Component } from 'react'
import { Spinner, Header } from '.'
import '../stylesheets/globals.scss'
import contentStyle from '../stylesheets/content.scss'
import style from './Resume.scss'
import MarkdownIt from 'markdown-it'
export default class About extends Component {
static propTypes = {
isLoading: PropTypes.bool.isRequired,
resume: PropTypes.string.isRequired
}
render () {
const md = MarkdownIt()
const result = md.render(this.props.about)
if (this.props.isLoading) {
return (
<div className={contentStyle.content}>
<Spinner/>
</div>
)
}
return (
<div>
<Navbar config={this.props.config} />
<Wrapper>
<div className={`${contentStyle.content} ${style.column}`}>
<Header header={title} role="heading" aria-level="2" />
<div className={style.content} dangerouslySetInnerHTML={{ __html: result }} role="article">
</div>
</div>
</Wrapper>
</div>
)
}
}

View File

@ -0,0 +1,13 @@
@import "../stylesheets/variables.scss";
.content {
clear: both;
h1,h2,h2,h4,h5,h6 {
color: $black;
}
}
.column {
box-sizing: border-box;
margin: 20px;
}