2020-05-04 15:32:44 +02:00
|
|
|
import axios from 'axios'
|
2020-08-03 12:04:07 +02:00
|
|
|
import ReactMarkdown from 'react-markdown/with-html'
|
|
|
|
import HeadTag from '../components/HeadTag'
|
2020-05-04 15:32:44 +02:00
|
|
|
|
2020-08-03 14:37:05 +02:00
|
|
|
const About = props => {
|
2020-08-03 12:04:07 +02:00
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<HeadTag
|
|
|
|
title='À-propos - FunctionProject'
|
|
|
|
description='À-propos de FunctionProject.'
|
|
|
|
/>
|
2020-05-04 15:32:44 +02:00
|
|
|
|
2020-08-03 12:04:07 +02:00
|
|
|
<div className='container'>
|
|
|
|
<div className='row justify-content-center'>
|
|
|
|
<div className='col-24 text-center'>
|
|
|
|
<h1 style={{ marginBottom: 0, paddingTop: '20px' }}>À-propos</h1>
|
2020-08-03 14:37:05 +02:00
|
|
|
<p
|
|
|
|
style={{
|
|
|
|
marginTop: '5px',
|
|
|
|
borderBottom: '1px solid var(--important)',
|
|
|
|
paddingBottom: '30px'
|
|
|
|
}}
|
|
|
|
>
|
|
|
|
(README.md du{' '}
|
|
|
|
<a
|
|
|
|
target='_blank'
|
|
|
|
rel='noopener noreferrer'
|
|
|
|
href='https://github.com/Divlo/FunctionProject'
|
|
|
|
>
|
|
|
|
GitHub
|
|
|
|
</a>
|
|
|
|
)
|
|
|
|
</p>
|
2020-08-03 12:04:07 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-05-04 15:32:44 +02:00
|
|
|
|
2020-08-03 12:04:07 +02:00
|
|
|
<div style={{ marginBottom: '30px' }} className='row'>
|
|
|
|
<div className='col-24'>
|
|
|
|
<ReactMarkdown
|
|
|
|
source={props.data}
|
|
|
|
escapeHtml={false}
|
|
|
|
linkTarget='_blank'
|
2020-08-03 14:37:05 +02:00
|
|
|
transformLinkUri={uri => {
|
2020-08-03 12:04:07 +02:00
|
|
|
if (uri.startsWith('./')) {
|
2020-08-03 14:37:05 +02:00
|
|
|
return `https://github.com/Divlo/FunctionProject/blob/master/${uri.slice(
|
|
|
|
2
|
|
|
|
)}`
|
2020-08-03 12:04:07 +02:00
|
|
|
}
|
|
|
|
return uri
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</>
|
|
|
|
)
|
2020-05-04 15:32:44 +02:00
|
|
|
}
|
|
|
|
|
2020-08-03 12:04:07 +02:00
|
|
|
export async function getServerSideProps (_context) {
|
2020-08-03 14:37:05 +02:00
|
|
|
const { data } = await axios.get(
|
|
|
|
'https://raw.githubusercontent.com/Divlo/FunctionProject/master/README.md'
|
|
|
|
)
|
2020-08-03 12:04:07 +02:00
|
|
|
return {
|
|
|
|
props: { data }
|
|
|
|
}
|
2020-05-04 15:32:44 +02:00
|
|
|
}
|
|
|
|
|
2020-08-03 12:04:07 +02:00
|
|
|
export default About
|