generated from theodorusclarence/ts-nextjs-tailwind-starter
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
349 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
'use client'; | ||
|
||
import { Inter } from 'next/font/google'; | ||
import React from 'react'; | ||
|
||
const font = Inter({ subsets: ['latin'] }); | ||
|
||
import Link from 'next/link'; | ||
|
||
import clsxm from '@/lib/clsxm'; | ||
|
||
import RecentProjectCard from '@/components/organisms/home/RecentProjectCard'; | ||
|
||
import { Project } from '@/types/Project'; | ||
|
||
interface ProjectsProps { | ||
projects: Project[]; | ||
} | ||
|
||
const Projects = ({ projects }: ProjectsProps) => { | ||
return ( | ||
<div className='flex flex-col'> | ||
<div className='tracking-widest text-sm font-semibold text-slate-500 mb-5'> | ||
RECENT PROJECTS | ||
</div> | ||
<div | ||
className={clsxm('flex flex-col gap-6 w-full', font.className)} | ||
style={font.style} | ||
> | ||
<RecentProjectCard project={projects[0]} reverse /> | ||
<RecentProjectCard project={projects[2]} /> | ||
<RecentProjectCard project={projects[6]} reverse /> | ||
</div> | ||
|
||
<div className='text-lg text-blue-950 dark:text-blue-200'> | ||
Check out more of my projects{' '} | ||
<Link | ||
href='/projects' | ||
className='animated-underline-2 dark:animated-underline font-semibold' | ||
> | ||
here | ||
</Link> | ||
! 👀 | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Projects; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
import Image from 'next/image'; | ||
import { useTheme } from 'next-themes'; | ||
import * as React from 'react'; | ||
import { useEffect, useState } from 'react'; | ||
import { IconContext } from 'react-icons'; | ||
import { AiFillGithub } from 'react-icons/ai'; | ||
import ReactMarkdown from 'react-markdown'; | ||
import rehypeRaw from 'rehype-raw'; | ||
|
||
import clsxm from '@/lib/clsxm'; | ||
|
||
import ButtonLink from '@/components/atoms/links/ButtonLink'; | ||
import { toolIconMapping } from '@/components/organisms/projects/Icons'; | ||
|
||
import { Project } from '@/types/Project'; | ||
|
||
interface RecentProjectCardProps { | ||
project: Project; | ||
reverse?: boolean; | ||
} | ||
|
||
const RecentProjectCard = ({ | ||
project, | ||
reverse = false, | ||
}: RecentProjectCardProps) => { | ||
const flexClass = reverse ? 'md:flex-row-reverse' : 'md:flex-row'; | ||
|
||
const { theme } = useTheme(); | ||
|
||
const [iconColor, setIconColor] = useState<string>(''); | ||
|
||
useEffect(() => { | ||
setIconColor(theme === 'dark' ? '#e1e7f2' : '#15295F'); | ||
}, [theme]); | ||
|
||
return ( | ||
<div className={clsxm('flex flex-col gap-6 w-full mb-10', flexClass)}> | ||
<div className='rounded-xl drop-shadow-lg w-full md:1/2 lg:w-1/3'> | ||
<Image | ||
className='rounded-lg drop-shadow-lg' | ||
src={project.image.url} | ||
alt={project.image.name} | ||
width={400} | ||
height={0} | ||
/> | ||
</div> | ||
<div className='flex flex-col w-full md:1/2 lg:w-2/3'> | ||
<h4>{project.title}</h4> | ||
|
||
<ReactMarkdown rehypePlugins={[rehypeRaw]}> | ||
{project.mediumDescription ?? project.longDescription} | ||
</ReactMarkdown> | ||
|
||
<div className='flex flex-row justify-between mt-3'> | ||
<div className='flex flex-row'> | ||
<IconContext.Provider value={{ color: iconColor, size: '1.5em' }}> | ||
{project.tools.map((tool: string) => { | ||
const IconComponent = toolIconMapping[tool]; | ||
return ( | ||
IconComponent && ( | ||
<span key={tool} className='me-1' aria-label={tool}> | ||
<IconComponent /> | ||
</span> | ||
) | ||
); | ||
})} | ||
</IconContext.Provider> | ||
</div> | ||
|
||
{project.links.github && ( | ||
<div className='flex flex-row h-8 items-center px-2'> | ||
<ButtonLink | ||
href={project.links.github} | ||
className='flex gap-1.5' | ||
variant={theme === 'dark' ? 'dark' : 'light'} | ||
> | ||
<AiFillGithub size={24} /> | ||
Check it out | ||
</ButtonLink> | ||
</div> | ||
)} | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default RecentProjectCard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
'use client'; | ||
|
||
import { Inter } from 'next/font/google'; | ||
import React from 'react'; | ||
|
||
const font = Inter({ subsets: ['latin'] }); | ||
|
||
import Image from 'next/image'; | ||
import ReactMarkdown from 'react-markdown'; | ||
import rehypeRaw from 'rehype-raw'; | ||
|
||
import clsxm from '@/lib/clsxm'; | ||
|
||
// interface ProjectsProps { | ||
// projects: Project[]; | ||
// } | ||
|
||
const Updates = () => { | ||
return ( | ||
<div className='flex flex-col'> | ||
<div className='tracking-widest text-sm font-semibold text-slate-500 mb-5 text-end'> | ||
UPDATES | ||
</div> | ||
<div | ||
className={clsxm( | ||
'flex md:flex-row flex-col-reverse gap-6 w-full', | ||
font.className, | ||
)} | ||
> | ||
<div className='md:w-1/4 flex items-center justify-center lg:bg-amber-100/75 dark:bg-transparent rounded-3xl'> | ||
<Image | ||
src='https://res.cloudinary.com/dwrurydlt/image/upload/v1710444087/full-stack-developer.png' | ||
height={0} | ||
width={375} | ||
alt='full-stack development' | ||
/> | ||
</div> | ||
<div className='text-lg antialiased md:w-3/4'> | ||
<ReactMarkdown className='mb-4' rehypePlugins={[rehypeRaw]}> | ||
{homePage.skills.fullStack} | ||
</ReactMarkdown> | ||
|
||
<ReactMarkdown className='mb-4' rehypePlugins={[rehypeRaw]}> | ||
{homePage.skills.languages} | ||
</ReactMarkdown> | ||
|
||
<ReactMarkdown className='mb-4' rehypePlugins={[rehypeRaw]}> | ||
{homePage.skills.latest} | ||
</ReactMarkdown> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Updates; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.