Skip to content

Commit

Permalink
Add social links
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasleidemer committed Dec 30, 2020
1 parent d812e42 commit 7dbbd91
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion pages/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
import hydrate from 'next-mdx-remote/hydrate'
import {
FaLastfm,
FaGithub,
FaLinkedinIn,
FaTwitter,
FaRegEnvelope,
} from 'react-icons/fa'

import HomeLayout from '@/components/HomeLayout'
import { getFileBySlug } from '@/lib/mdx'
Expand All @@ -8,11 +15,45 @@ const Home = ({ mdxSource }) => {

return (
<HomeLayout>
<div className="prose md:prose-lg dark:prose-dark">{content}</div>
<div className="prose md:prose-lg dark:prose-dark mb-12 md:mb-20">
{content}
</div>
<div className="flex justify-center text-gray-700 dark:text-gray-300 mx-auto">
<div className="flex justify-evenly w-full md:w-1/2">
<SocialLink
Icon={FaGithub}
href="https://github.com/matiasleidemer"
/>
<SocialLink
Icon={FaTwitter}
href="https://twitter.com/matiasleidemer"
/>
<SocialLink
Icon={FaLinkedinIn}
href="https://linkedin.com/matiasleidemer"
/>
<SocialLink
Icon={FaLastfm}
href="https://www.last.fm/user/sergiovalente"
/>
<SocialLink
Icon={FaRegEnvelope}
href="mailto:[email protected]"
/>
</div>
</div>
</HomeLayout>
)
}

const SocialLink = ({ Icon, href, ...props }) => {
return (
<a href={href} target="_blank">
<Icon className="w-4 h-4 md:w-5 md:h-5" />
</a>
)
}

export async function getStaticProps() {
const post = await getFileBySlug('index')

Expand Down

1 comment on commit 7dbbd91

@vercel
Copy link

@vercel vercel bot commented on 7dbbd91 Dec 30, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.