Add GitHub repo and homepage links to project cards (fixes #37)#46
Add GitHub repo and homepage links to project cards (fixes #37)#46
Conversation
- Modified showRepo() function to include dedicated GitHub and homepage links - Added CSS styling for .repo__link, .repo__link--github, and .repo__link--homepage - Updated click handler to prevent navigation when clicking on link buttons - Projects with homepages show both GitHub and Homepage buttons - Projects without homepages show only GitHub button - Preserves existing card click behavior as fallback Co-authored-by: roblarsen <361421+roblarsen@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR adds dedicated GitHub and homepage link buttons to project cards, enhancing user navigation by providing direct access to both source code repositories and project websites.
Key changes:
- Added styled link buttons within each project card for GitHub repository and homepage URLs
- Modified click handling to prevent card navigation when clicking on the new link buttons
- Enhanced CSS styling with hover states and proper accessibility features
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| assets/style.css | Added CSS styling for .repo__links container and .repo__link buttons with hover states and color variants |
| assets/app.js | Compiled JavaScript output with new link generation logic and updated click handling |
| assets/app.babel.js | Source JavaScript with enhanced showRepo() function to generate dedicated link buttons and prevent card navigation conflicts |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| const linksHtml = `<div class="repo__links">${githubLink}${homepageLink}</div>`; | ||
|
|
||
| const $item = $( | ||
| `<div class="unit-1-3 repo="> |
There was a problem hiding this comment.
The HTML attribute repo= is missing a value. This should either be repo="" or have a proper value assigned.
| `<div class="unit-1-3 repo="> | |
| `<div class="unit-1-3 repo"> |
|
@copilot address my review comments |
Co-authored-by: roblarsen <361421+roblarsen@users.noreply.github.com>
I've addressed your review comments in commit 723105e. The app.babel.js file now uses ES6+ syntax throughout: ✅ Template literals: Converted the last remaining string concatenation in The transpiled app.js file has been updated accordingly using the existing Babel build process. |
constandletinstead ofvarAll code now uses modern ES6+ syntax throughout:
constandletdeclarations instead ofvar💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.