-
-
Notifications
You must be signed in to change notification settings - Fork 0
Update Contacting Bar #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… enhance layout with badges in Projects and AboutTimeline sections
… sizes attribute to Avatar image in AvatarCircles component, and change background class in ProjectCard component
… for improved navigation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a new social ContactBar, refactors image rendering, and enhances UI consistency with badge components and updated styling variables.
- Introduce
ContactBarcomponent with animated social links and integrate into hero section - Replace canvas-based profile rendering with
next/imageand clean up related code - Add
Badgeelements to Projects and Experience headers; update background/card styles and fix minor typos
Reviewed Changes
Copilot reviewed 10 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/components/ui/project-card.tsx | Updated card background class from bg-background to bg-card |
| src/components/ui/avatar-circles.tsx | Added sizes attribute to optimize avatar image loading |
| src/app/globals.css | Adjusted dark mode --background and --card CSS variables |
| src/app/(web)/(home)/sections/timeline.tsx | Inserted Badge component for Experience header |
| src/app/(web)/(home)/sections/projects.tsx | Fixed stick → sticky typo and added Badge for Projects header |
| src/app/(web)/(home)/sections/profile.tsx | Replaced custom canvas code with next/image for profile images |
| src/app/(web)/(home)/sections/hero-section.tsx | Integrated ContactBar and simplified Profile wrapper |
| src/app/(web)/(home)/sections/contact-bar.tsx | Added new ContactBar component with animated social links |
| src/app/(web)/(home)/page.tsx | Imported ContactBar into HomePage (unused import) |
| next.config.ts | Extended image remotePatterns to include localhost:3001 |
Comments suppressed due to low confidence (1)
src/app/(web)/(home)/page.tsx:8
- The ContactBar import is unused in this file; remove it to clean up unused dependencies.
import { ContactBar } from './sections/contact-bar';
| <Link href="https://github.com/pphatdev" target='_blank'> <GitHubIcon className='size-6 text-foreground/50 hover:text-foreground' /> </Link> | ||
| </li> | ||
| <li> | ||
| <Link href="https://t.me/SophatLEAT" target='_blank'> <FigmaIcon className='stroke-1 size-6 text-foreground/50 hover:text-foreground' /> </Link> |
Copilot
AI
Jul 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Telegram link is using the FigmaIcon; import and use a TelegramIcon component instead to correctly represent the platform.
| <Link href="https://t.me/SophatLEAT" target='_blank'> <FigmaIcon className='stroke-1 size-6 text-foreground/50 hover:text-foreground' /> </Link> | |
| <Link href="https://t.me/SophatLEAT" target='_blank'> <TelegramIcon className='stroke-1 size-6 text-foreground/50 hover:text-foreground' /> </Link> |
| <Link href="https://fb.me/chat.leatsophat" target='_blank'> <FacebookIcon className='size-6 text-foreground/50 hover:text-foreground' /> </Link> | ||
| </li> | ||
| <li> | ||
| <Link href="https://github.com/pphatdev" target='_blank'> <GitHubIcon className='size-6 text-foreground/50 hover:text-foreground' /> </Link> | ||
| </li> | ||
| <li> | ||
| <Link href="https://t.me/SophatLEAT" target='_blank'> <FigmaIcon className='stroke-1 size-6 text-foreground/50 hover:text-foreground' /> </Link> |
Copilot
AI
Jul 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
External links opened with target="_blank" should include rel="noopener noreferrer" to prevent reverse tabnabbing vulnerabilities.
| <Link href="https://fb.me/chat.leatsophat" target='_blank'> <FacebookIcon className='size-6 text-foreground/50 hover:text-foreground' /> </Link> | |
| </li> | |
| <li> | |
| <Link href="https://github.com/pphatdev" target='_blank'> <GitHubIcon className='size-6 text-foreground/50 hover:text-foreground' /> </Link> | |
| </li> | |
| <li> | |
| <Link href="https://t.me/SophatLEAT" target='_blank'> <FigmaIcon className='stroke-1 size-6 text-foreground/50 hover:text-foreground' /> </Link> | |
| <Link href="https://fb.me/chat.leatsophat" target='_blank' rel="noopener noreferrer"> <FacebookIcon className='size-6 text-foreground/50 hover:text-foreground' /> </Link> | |
| </li> | |
| <li> | |
| <Link href="https://github.com/pphatdev" target='_blank' rel="noopener noreferrer"> <GitHubIcon className='size-6 text-foreground/50 hover:text-foreground' /> </Link> | |
| </li> | |
| <li> | |
| <Link href="https://t.me/SophatLEAT" target='_blank' rel="noopener noreferrer"> <FigmaIcon className='stroke-1 size-6 text-foreground/50 hover:text-foreground' /> </Link> |
| // const loadImage = (src: string): Promise<HTMLImageElement> => new Promise<HTMLImageElement>(resolve => { | ||
| // const img = new Image(); | ||
| // img.onload = () => resolve(img); | ||
| // img.src = src; | ||
| // }); | ||
|
|
||
| const renderCanvas = useCallback((canvas: HTMLCanvasElement | null): void => { | ||
| if (!canvas) return; | ||
| // const renderCanvas = useCallback((canvas: HTMLCanvasElement | null): void => { | ||
| // if (!canvas) return; | ||
|
|
||
| const ctx = canvas.getContext('2d'); | ||
| if (!ctx) return; | ||
| // const ctx = canvas.getContext('2d'); | ||
| // if (!ctx) return; | ||
|
|
||
| canvas.width = 500; | ||
| canvas.height = 500; | ||
| // canvas.width = 500; | ||
| // canvas.height = 500; | ||
|
|
||
| Promise.all([ | ||
| loadImage('/assets/gallery/WEBP/IMG_1915.webp'), | ||
| loadImage('/assets/masks/mask.webp') | ||
| ]).then(([img, mask]) => { | ||
| const scale = Math.max(canvas.width / img.width, canvas.height / img.height); | ||
| const x = (canvas.width - img.width * scale) / 2; | ||
| const y = (canvas.height - img.height * scale) / 2; | ||
| // Promise.all([ | ||
| // loadImage('/assets/avatars/profile.JPG'), | ||
| // // loadImage('/assets/gallery/WEBP/IMG_1915.webp'), | ||
| // loadImage('/assets/masks/mask.webp') | ||
| // ]).then(([img, mask]) => { | ||
| // const scale = Math.max(canvas.width / img.width, canvas.height / img.height); | ||
| // const x = (canvas.width - img.width * scale) / 2; | ||
| // const y = (canvas.height - img.height * scale) / 2; | ||
|
|
||
| // Draw image with object-cover behavior | ||
| ctx.drawImage(img, x, y, img.width * scale, img.height * scale); | ||
| // // Draw image with object-cover behavior | ||
| // ctx.drawImage(img, x, y, img.width * scale, img.height * scale); | ||
|
|
||
| // Apply mask | ||
| ctx.globalCompositeOperation = 'destination-in'; | ||
| ctx.drawImage(mask, 0, 0, 500, 500); | ||
| }); | ||
| }, []); | ||
| // // Apply mask | ||
| // ctx.globalCompositeOperation = 'destination-in'; | ||
| // ctx.drawImage(mask, 0, 0, 500, 500); | ||
| // }); | ||
| // }, []); | ||
|
|
Copilot
AI
Jul 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Consider removing the large block of commented-out canvas rendering code to improve readability and maintainability.
This pull request introduces several updates across multiple files to enhance the functionality, UI components, and styling of the application. Key changes include the addition of a
ContactBarcomponent, updates to theProfileandHeroSectioncomponents, and improvements to the visual design of theProjectsandTimelinesections.New Features:
ContactBarcomponent with animated social media links usingframer-motion. This component is integrated into both theHomePageandHeroSectionfor improved user engagement. ([[1]](https://github.com/pphatdev/v4/pull/13/files#diff-8756cbeb171ec70247450e2042f78bd85630b08c85dca65bd3048ec23b55f258R1-R34),[[2]](https://github.com/pphatdev/v4/pull/13/files#diff-f278d2f21412bba29fcf364c46a0267e7d51600623310da46ccbb0032771b71bR8),[[3]](https://github.com/pphatdev/v4/pull/13/files#diff-9d4e09311e0b760dec26b03d1a9ec565427f8eb6b6afc543840cb839ac99b1adL3-R8),[[4]](https://github.com/pphatdev/v4/pull/13/files#diff-9d4e09311e0b760dec26b03d1a9ec565427f8eb6b6afc543840cb839ac99b1adR446))UI Enhancements:
next/imageimplementation for better performance and maintainability. Removed unused code related to image processing. ([[1]](https://github.com/pphatdev/v4/pull/13/files#diff-42a6dad92380de6d543f6d077f04608c70e282e86c115b256c49591c7c845dadL3-R39),[[2]](https://github.com/pphatdev/v4/pull/13/files#diff-42a6dad92380de6d543f6d077f04608c70e282e86c115b256c49591c7c845dadL51-R54))MagneticAreawrapper around theProfilecomponent and replaced it with a simplerdivstructure. ([src/app/(web)/(home)/sections/hero-section.tsxL539-R540](https://github.com/pphatdev/v4/pull/13/files#diff-9d4e09311e0b760dec26b03d1a9ec565427f8eb6b6afc543840cb839ac99b1adL539-R540))Visual Design Improvements:
Badgecomponent to highlight the "Projects" header. Adjusted the background styling for better contrast. ([[1]](https://github.com/pphatdev/v4/pull/13/files#diff-ecb292bec73f0ba93c1510eaa9ad6e41bb0a4d99b9141a7b6b230433c31bb21dR7-R13),[[2]](https://github.com/pphatdev/v4/pull/13/files#diff-ecb292bec73f0ba93c1510eaa9ad6e41bb0a4d99b9141a7b6b230433c31bb21dL39-R40),[[3]](https://github.com/pphatdev/v4/pull/13/files#diff-ecb292bec73f0ba93c1510eaa9ad6e41bb0a4d99b9141a7b6b230433c31bb21dR50))Badgecomponent to emphasize the "Experience" header. ([[1]](https://github.com/pphatdev/v4/pull/13/files#diff-dd1a7a90aa9ea4ffb1cc1b752caa48b6c26c5105526b3d1d29b69ece0537dd26R10),[[2]](https://github.com/pphatdev/v4/pull/13/files#diff-dd1a7a90aa9ea4ffb1cc1b752caa48b6c26c5105526b3d1d29b69ece0537dd26R120-R121))backgroundandcardcolors to refine the dark mode appearance. ([src/app/globals.cssL159-R162](https://github.com/pphatdev/v4/pull/13/files#diff-4f206759c961f544a48464ad2ee231adc87e72593d03a0004b68c17771f7a412L159-R162))Minor Updates:
sizesattribute to optimize image loading for avatars. ([src/components/ui/avatar-circles.tsxR39](https://github.com/pphatdev/v4/pull/13/files#diff-e55d746d7d147bf3cb66353cdd4103a2f36e26ee8bf5fd69cc384085174dbe59R39))backgroundtocardfor consistency across components. ([src/components/ui/project-card.tsxL22-R22](https://github.com/pphatdev/v4/pull/13/files#diff-fa754b3293b55eb0ed415990920199aa5e9e503159185245e07fd0a4ab676243L22-R22))