Added basic About page with social links

This commit is contained in:
James Purser 2022-12-11 15:20:27 +11:00
parent 876fd0a071
commit 8e0f582d3f
3 changed files with 50 additions and 1 deletions

View file

@ -17,6 +17,9 @@ const NavBar = (props, sections) => {
<Nav className="m-auto"> <Nav className="m-auto">
<NavLink href="/">Home</NavLink> <NavLink href="/">Home</NavLink>
</Nav> </Nav>
<Nav className="m-auto">
<NavLink href="/about">About</NavLink>
</Nav>
<NavItem className="m-auto"> <NavItem className="m-auto">
<NavLink href="/news">News and such</NavLink> <NavLink href="/news">News and such</NavLink>
</NavItem> </NavItem>

View file

@ -20,4 +20,4 @@ module.exports = {
publicRuntimeConfig: { publicRuntimeConfig: {
analytics_code: process.env.GTAG analytics_code: process.env.GTAG
} }
} }

46
pages/about.js Normal file
View file

@ -0,0 +1,46 @@
import "../components/main"
import getConfig from 'next/config'
import Layout from "../components/main"
import Link from 'next/link'
export async function getServerSideProps(context) {
const { serverRuntimeConfig } = getConfig()
const secres = await fetch(serverRuntimeConfig.base_path + `/api/sections`)
const secdata = await secres.json()
const pagedata = {'title': 'About Angry Beanie'}
return {
props: { sections : secdata, pagedata }, // will be passed to the page component as props
}
}
function About({sections, pagedata}) {
return <Layout sections={sections} pagedata={pagedata}>
<h1 className="page_title col-sm-12">About Angry Beanie</h1>
<div className="col-sm-12 article_body">
Welcome to Angry Beanie. A place where I stick stuff that I make, whether it's blog posts, podcasts, videos, photos, whatever. If I make it I put it here.
</div>
<div className="col-sm-6 article_body">
<h2>Contact me</h2>
If you want to get a hold of me regarding anything I put up here, you can get me on the socials.
<div>
Mastodon: <a href="https://aus.social/@purserj" rel="me">https://aus.social/@purserj</a>
</div>
<div>
Twitter: <Link href="https://twitter.com/purserj">https://twitter.com/purserj</Link>
</div>
<div>
Instagram: <Link href="https://www.instagram.com/purserj/">https://www.instagram.com/purserj/</Link>
</div>
<div>
Pixelfed: <Link href="https://pixelfed.au/purserj">https://pixelfed.au/purserj</Link>
</div>
</div>
</Layout>
}
export default About