📖 DOC: Ajout de la page /about + numéro version
This commit is contained in:
52
website/pages/about.js
Normal file
52
website/pages/about.js
Normal file
@ -0,0 +1,52 @@
|
||||
import { Fragment } from 'react';
|
||||
import axios from 'axios'
|
||||
import ReactMarkdown from 'react-markdown/with-html';
|
||||
import HeadTag from '../components/HeadTag';
|
||||
|
||||
const About = (props) => {
|
||||
|
||||
console.log(props);
|
||||
|
||||
return (
|
||||
<Fragment>
|
||||
<HeadTag
|
||||
title="À-propos - FunctionProject"
|
||||
description="À-propos de FunctionProject."
|
||||
/>
|
||||
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div style={{ marginBottom: '30px' }} className="row">
|
||||
<div className="col-24">
|
||||
<ReactMarkdown
|
||||
source={props.data}
|
||||
escapeHtml={false}
|
||||
linkTarget="_blank"
|
||||
transformLinkUri={(uri) => {
|
||||
if (uri.startsWith('./')) {
|
||||
return `https://github.com/Divlo/FunctionProject/blob/master/${uri.slice(2)}`;
|
||||
}
|
||||
return uri;
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
export async function getServerSideProps(_context) {
|
||||
const { data } = await axios.get('https://raw.githubusercontent.com/Divlo/FunctionProject/master/README.md');
|
||||
return {
|
||||
props: { data }
|
||||
};
|
||||
}
|
||||
|
||||
export default About;
|
@ -29,7 +29,12 @@ const Home = () => {
|
||||
<div className="col-24">
|
||||
<h1 className="title-important">FunctionProject</h1>
|
||||
<p className="Home__description">
|
||||
Apprenez la programmation grâce à l'apprentissage par projet alias fonction (en <span className="important">JavaScript</span>).<br/>
|
||||
Apprenez la programmation grâce à l'apprentissage par projet alias fonction (en <span className="important">JavaScript</span>).
|
||||
<br/>
|
||||
<Link href={"/about"}>
|
||||
<a>En savoir plus ? (à-propos)</a>
|
||||
</Link>
|
||||
<br/>
|
||||
Découvrez la liste des fonctions disponibles :
|
||||
</p>
|
||||
</div>
|
||||
@ -51,7 +56,7 @@ const Home = () => {
|
||||
</p>
|
||||
</div>
|
||||
<div className="col-24">
|
||||
<a target="_blank" rel="noopener noreferrer" href="https://github.com/Divlo/FunctionProject"> <img className="Home__image-width" src="/images/GitHub.png" alt="GitHub"/> </a>
|
||||
<a target="_blank" rel="noopener noreferrer" href="https://github.com/Divlo/FunctionProject"><img className="Home__image-width" src="/images/GitHub.png" alt="GitHub" /></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user