mirror of
				https://github.com/r-freeman/portfolio.git
				synced 2025-11-04 00:51:12 +00:00 
			
		
		
		
	Replace icons on projects page
This commit is contained in:
		
							parent
							
								
									5d8884bd5c
								
							
						
					
					
						commit
						1f68a7f8df
					
				@ -1,10 +0,0 @@
 | 
				
			|||||||
import type {Props} from '@/types'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export function ForkIcon(props: Props) {
 | 
					 | 
				
			||||||
    return (
 | 
					 | 
				
			||||||
        <svg viewBox="0 0 16 16" aria-label="forks" data-view-component="true" {...props}>
 | 
					 | 
				
			||||||
            <path fillRule="evenodd"
 | 
					 | 
				
			||||||
                  d="M5 3.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm0 2.122a2.25 2.25 0 1 0-1.5 0v.878A2.25 2.25 0 0 0 5.75 8.5h1.5v2.128a2.251 2.251 0 1 0 1.5 0V8.5h1.5a2.25 2.25 0 0 0 2.25-2.25v-.878a2.25 2.25 0 1 0-1.5 0v.878a.75.75 0 0 1-.75.75h-4.5A.75.75 0 0 1 5 6.25v-.878zm3.75 7.378a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm3-8.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5z"/>
 | 
					 | 
				
			||||||
        </svg>
 | 
					 | 
				
			||||||
    )
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
							
								
								
									
										11
									
								
								components/icons/ShareIcon.tsx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								components/icons/ShareIcon.tsx
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,11 @@
 | 
				
			|||||||
 | 
					import {Props} from '@/types'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export function ShareIcon(props: Props) {
 | 
				
			||||||
 | 
					    return (
 | 
				
			||||||
 | 
					        <svg fill="none" stroke="currentColor" strokeWidth={1.5} viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"
 | 
				
			||||||
 | 
					             aria-hidden="true" {...props}>
 | 
				
			||||||
 | 
					            <path strokeLinecap="round" strokeLinejoin="round"
 | 
				
			||||||
 | 
					                  d="M7.217 10.907a2.25 2.25 0 100 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186l9.566-5.314m-9.566 7.5l9.566 5.314m0 0a2.25 2.25 0 103.935 2.186 2.25 2.25 0 00-3.935-2.186zm0-12.814a2.25 2.25 0 103.933-2.185 2.25 2.25 0 00-3.933 2.185z"/>
 | 
				
			||||||
 | 
					        </svg>
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										11
									
								
								components/icons/SparklesIcon.tsx
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								components/icons/SparklesIcon.tsx
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,11 @@
 | 
				
			|||||||
 | 
					import {Props} from '@/types'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export function SparklesIcon(props: Props) {
 | 
				
			||||||
 | 
					    return (
 | 
				
			||||||
 | 
					        <svg fill="none" stroke="currentColor" strokeWidth={1.5} viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"
 | 
				
			||||||
 | 
					             aria-hidden="true" {...props}>
 | 
				
			||||||
 | 
					            <path strokeLinecap="round" strokeLinejoin="round"
 | 
				
			||||||
 | 
					                  d="M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 00-2.456 2.456zM16.894 20.567L16.5 21.75l-.394-1.183a2.25 2.25 0 00-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 001.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 001.423 1.423l1.183.394-1.183.394a2.25 2.25 0 00-1.423 1.423z"/>
 | 
				
			||||||
 | 
					        </svg>
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@ -1,10 +0,0 @@
 | 
				
			|||||||
import {Props} from '@/types'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
export function StarIcon(props: Props) {
 | 
					 | 
				
			||||||
    return (
 | 
					 | 
				
			||||||
        <svg viewBox="0 0 16 16" aria-label="stars" data-view-component="true" {...props}>
 | 
					 | 
				
			||||||
            <path fillRule="evenodd"
 | 
					 | 
				
			||||||
                  d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.75.75 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694v.001z"/>
 | 
					 | 
				
			||||||
        </svg>
 | 
					 | 
				
			||||||
    )
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
@ -2,8 +2,8 @@ import {GetStaticProps} from 'next'
 | 
				
			|||||||
import Head from 'next/head'
 | 
					import Head from 'next/head'
 | 
				
			||||||
import {Card} from '@/components/Card'
 | 
					import {Card} from '@/components/Card'
 | 
				
			||||||
import {SimpleLayout} from '@/components/layouts/SimpleLayout'
 | 
					import {SimpleLayout} from '@/components/layouts/SimpleLayout'
 | 
				
			||||||
import {StarIcon} from '@/components/icons/StarIcon'
 | 
					import {SparklesIcon} from '@/components/icons/SparklesIcon'
 | 
				
			||||||
import {ForkIcon} from '@/components/icons/ForkIcon'
 | 
					import {ShareIcon} from '@/components/icons/ShareIcon'
 | 
				
			||||||
import {getPinnedRepos} from '@/lib/github'
 | 
					import {getPinnedRepos} from '@/lib/github'
 | 
				
			||||||
import {numberFormat} from '@/lib/numberFormat'
 | 
					import {numberFormat} from '@/lib/numberFormat'
 | 
				
			||||||
import type {Repo} from '@/types'
 | 
					import type {Repo} from '@/types'
 | 
				
			||||||
@ -53,11 +53,12 @@ export default function Projects({pinnedRepos}: { pinnedRepos: Repo[] }) {
 | 
				
			|||||||
                                <div className="flex space-x-6">
 | 
					                                <div className="flex space-x-6">
 | 
				
			||||||
                                    <p className="flex items-center">
 | 
					                                    <p className="flex items-center">
 | 
				
			||||||
                                        {numberFormat(repo.stargazerCount)}
 | 
					                                        {numberFormat(repo.stargazerCount)}
 | 
				
			||||||
                                        <StarIcon className="order-first mr-2 w-5 h-5 fill-zinc-400 dark:fill-zinc-500"/>
 | 
					                                        <SparklesIcon className="order-first mr-2 w-5 h-5 fill-zinc-400 dark:fill-zinc-500"/>
 | 
				
			||||||
                                    </p>
 | 
					                                    </p>
 | 
				
			||||||
                                    <p className="flex items-center">
 | 
					                                    <p className="flex items-center">
 | 
				
			||||||
                                        {numberFormat(repo.forkCount)}
 | 
					                                        {numberFormat(repo.forkCount)}
 | 
				
			||||||
                                        <ForkIcon className="order-first mr-2 w-5 h-5 fill-zinc-400 dark:fill-zinc-500"/>
 | 
					                                        <ShareIcon
 | 
				
			||||||
 | 
					                                            className="order-first mr-2 w-5 h-5 fill-zinc-400 dark:fill-zinc-500 -rotate-90"/>
 | 
				
			||||||
                                    </p>
 | 
					                                    </p>
 | 
				
			||||||
                                </div>
 | 
					                                </div>
 | 
				
			||||||
                            </div>
 | 
					                            </div>
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user