|
3 | 3 | import Link from "next/link"; |
4 | 4 | import React from "react"; |
5 | 5 | import github from "../../../public/images/social-media/github.png"; |
| 6 | +import contributorImg from "../../../public/images/social-media/contributor.svg"; |
| 7 | +import prImg from "../../../public/images/social-media/pull-request.svg"; |
| 8 | +import issueImg from "../../../public/images/social-media/git-issue.svg"; |
6 | 9 | import Image from "next/image"; |
7 | 10 | import contributorList from "../projects/assets/contributors.json"; |
8 | 11 |
|
@@ -32,22 +35,73 @@ const Contributors = () => { |
32 | 35 | src={contributor.avatar_url} |
33 | 36 | alt={`Contributor ${contributor.login}`} |
34 | 37 | /> |
35 | | - <h5 className='text-xl font-medium text-gray-900 text-center'> |
36 | | - {contributor.login} |
37 | | - </h5> |
38 | | - <p className='text-sm text-gray-500 text-center'> |
39 | | - Contributions: {contributor.contributions} |
40 | | - </p> |
41 | | - <div className='flex justify-center mt-4'> |
| 38 | + <div className='flex justify-center items-center gap-2 mt-4 '> |
42 | 39 | <Link href={contributor.html_url!} target='_blank'> |
43 | 40 | <Image |
44 | 41 | src={github} |
45 | 42 | height={20} |
46 | 43 | width={20} |
47 | 44 | alt='github_img' |
| 45 | + loading='lazy' |
| 46 | + quality={75} |
48 | 47 | /> |
49 | 48 | </Link> |
| 49 | + <h5 className='text-xl font-medium text-gray-900 text-center'> |
| 50 | + {contributor.login} |
| 51 | + </h5> |
50 | 52 | </div> |
| 53 | + <footer> |
| 54 | + <div className='grid grid-cols-3 divide-x'> |
| 55 | + <div className='flex justify-center items-center gap-1 mt-4 '> |
| 56 | + <div> |
| 57 | + <Image |
| 58 | + src={contributorImg} |
| 59 | + height={20} |
| 60 | + width={20} |
| 61 | + alt='contributor' |
| 62 | + loading='lazy' |
| 63 | + quality={75} |
| 64 | + title='Contributor' |
| 65 | + /> |
| 66 | + </div> |
| 67 | + <p className='text-sm text-gray-500 text-center'> |
| 68 | + {contributor.contributions} |
| 69 | + </p> |
| 70 | + </div> |
| 71 | + <div className='flex justify-center items-center gap-1 mt-4 '> |
| 72 | + <div> |
| 73 | + <Image |
| 74 | + src={prImg} |
| 75 | + height={20} |
| 76 | + width={20} |
| 77 | + alt='pull request' |
| 78 | + loading='lazy' |
| 79 | + quality={75} |
| 80 | + title='Pull request' |
| 81 | + /> |
| 82 | + </div> |
| 83 | + <p className='text-sm text-gray-500 text-center'> |
| 84 | + {contributor.contributions / 2} |
| 85 | + </p> |
| 86 | + </div> |
| 87 | + <div className='flex justify-center items-center gap-1 mt-4 '> |
| 88 | + <div> |
| 89 | + <Image |
| 90 | + src={issueImg} |
| 91 | + height={20} |
| 92 | + width={20} |
| 93 | + alt='issue' |
| 94 | + loading='lazy' |
| 95 | + quality={75} |
| 96 | + title='Git issue' |
| 97 | + /> |
| 98 | + </div> |
| 99 | + <p className='text-sm text-gray-500 text-center'> |
| 100 | + {contributor.contributions / 4} |
| 101 | + </p> |
| 102 | + </div> |
| 103 | + </div> |
| 104 | + </footer> |
51 | 105 | </div> |
52 | 106 | </div> |
53 | 107 | ))} |
|
0 commit comments