Add basic GitHub acc. info on about page

This commit is contained in:
Paul W. 2022-09-10 02:43:46 -04:00
parent bc2db8a657
commit cf7e85fa6d
No known key found for this signature in database
GPG Key ID: 88ACDB8F70C2C41E

View File

@ -3,7 +3,13 @@ import ReadmeMd from '../README.md';
import License from '../LICENSE.txt'; import License from '../LICENSE.txt';
import Layout from '../components/layout'; import Layout from '../components/layout';
function AboutPage() { function AboutPage({usr}: any) {
const styUsr = {
fontFamily: 'monospace',
backgroundColor: '#333333',
fontSize: '.8rem',
padding: '.1rem .5rem',
};
return ( return (
<Layout name='About' title='About PaulW.XYZ'> <Layout name='About' title='About PaulW.XYZ'>
<section className='block'> <section className='block'>
@ -29,8 +35,42 @@ function AboutPage() {
<h2>LICENSE</h2> <h2>LICENSE</h2>
<pre>{License}</pre> <pre>{License}</pre>
</section> </section>
{/* make this a pretty component with more info */}
<section className='block'>
<table>
<th><td>Github Profile</td></th>
<tr>
<td>Name</td>
<td style={styUsr}>{usr.login}</td>
</tr>
<tr>
<td>Link</td>
<td style={styUsr}>{usr.html_url}</td>
</tr>
<tr>
<td>Location</td>
<td style={styUsr}>{usr.location}</td>
</tr>
<tr>
<td>About</td>
<td style={styUsr}>{usr.bio}</td>
</tr>
</table>
</section>
</Layout> </Layout>
); );
} }
export async function getStaticProps() {
const res = await fetch('https://api.github.com/users/lambdapaul');
const usr = await res.json();
return {
props: { usr }
};
}
export default AboutPage; export default AboutPage;