Skip to content

Commit

Permalink
Merge pull request #20 from andostronaut/develop
Browse files Browse the repository at this point in the history
feat: install sharp and use keyof icons from lucide for icon
  • Loading branch information
andostronaut authored Jul 22, 2024
2 parents 66e23d4 + b3b95a9 commit 1f87176
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 7 deletions.
1 change: 0 additions & 1 deletion app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import Markdown from 'react-markdown'
import BlurFade from '@/components/magicui/blur-fade'
import BlurFadeText from '@/components/magicui/blur-fade-text'
import { ProjectCard } from '@/components/project-card'
import { Badge } from '@/components/ui/badge'

import { DATA } from '@/data/resume'

Expand Down
Binary file modified bun.lockb
Binary file not shown.
13 changes: 11 additions & 2 deletions components/project-card.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Image from 'next/image'
import Link from 'next/link'
import Markdown from 'react-markdown'
import { icons } from 'lucide-react'

import { Badge } from '@/components/ui/badge'
import {
Expand All @@ -10,6 +11,7 @@ import {
CardHeader,
CardTitle,
} from '@/components/ui/card'
import { Icon } from '@/components/ui/icon'

import { cn } from '@/lib/utils'

Expand Down Expand Up @@ -105,8 +107,15 @@ export function ProjectCard({
<div className="flex flex-row flex-wrap items-start gap-1">
{links?.map((link, idx) => (
<Link href={link?.href} key={idx} target="_blank">
<Badge key={idx} className="flex gap-2 px-2 py-1 text-[10px]">
{link.icon}
<Badge
key={idx}
className="flex items-center gap-2 px-2 py-1 text-[10px]"
>
<Icon
name={link.icon as keyof typeof icons}
size={14}
color="hsl(var(--secondary))"
/>
{link.type}
</Badge>
</Link>
Expand Down
17 changes: 17 additions & 0 deletions components/ui/icon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { icons } from 'lucide-react'

export const Icon = ({
name,
color,
size,
className,
}: {
name: keyof typeof icons
color: string
size: number
className?: string
}) => {
const LucideIcon = icons[name as keyof typeof icons]

return <LucideIcon color={color} size={size} className={className} />
}
8 changes: 4 additions & 4 deletions data/resume.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const DATA = {
{
type: 'Source',
href: 'https://github.com/kinotio/gelda',
icon: <Icons.github className="size-3" />,
icon: 'Github',
},
],
image: '/gelda.png',
Expand All @@ -96,7 +96,7 @@ export const DATA = {
{
type: 'Source',
href: 'https://github.com/kinotio/drowser-studio',
icon: <Icons.github className="size-3" />,
icon: 'Github',
},
],
image: '/drowser-studio.png',
Expand All @@ -114,7 +114,7 @@ export const DATA = {
{
type: 'Source',
href: 'https://github.com/andostronaut/drowser',
icon: <Icons.github className="size-3" />,
icon: 'Github',
},
],
image: '/drowser.png',
Expand All @@ -132,7 +132,7 @@ export const DATA = {
{
type: 'Source',
href: 'https://github.com/andostronaut/cocli',
icon: <Icons.github className="size-3" />,
icon: 'Github',
},
],
image: '/cocli.gif',
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
"rehype-stringify": "^10.0.0",
"remark-parse": "^11.0.0",
"remark-rehype": "^11.1.0",
"sharp": "^0.33.4",
"shiki": "^1.7.0",
"tailwind-merge": "^2.3.0",
"tailwindcss-animate": "^1.0.7",
Expand Down

0 comments on commit 1f87176

Please sign in to comment.