This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
FunctionProject/website/pages/about.jsx

69 lines
1.8 KiB
React
Raw Permalink Normal View History

import axios from 'axios'
2020-08-03 12:04:07 +02:00
import ReactMarkdown from 'react-markdown/with-html'
import HeadTag from '../components/HeadTag'
const About = props => {
2020-08-03 12:04:07 +02:00
return (
<>
<HeadTag
title='À-propos - FunctionProject'
description='À-propos de FunctionProject.'
/>
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>
<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-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'
transformLinkUri={uri => {
2020-08-03 12:04:07 +02:00
if (uri.startsWith('./')) {
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-08-03 12:04:07 +02:00
export async function getServerSideProps (_context) {
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-08-03 12:04:07 +02:00
export default About