-
Notifications
You must be signed in to change notification settings - Fork 138
Pull in latest JSR posts to homepage #496
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
Merged
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
d98f543
Wire up homepage updates
josh-collinsworth efb1fa8
Remove unused import
josh-collinsworth 09b5ca5
Add some additional error handling and checking
josh-collinsworth a2f1c49
ugh
josh-collinsworth 76dcca1
Improved error handling
josh-collinsworth e093f79
Check for ok on fetch
josh-collinsworth 20800d3
Fix typo
josh-collinsworth da1ed33
Fix broken link url
josh-collinsworth File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// Copyright 2024 the JSR authors. All rights reserved. MIT license. | ||
export function NewsCard({ | ||
title, | ||
description, | ||
image, | ||
url, | ||
}: { | ||
title: string; | ||
description: string; | ||
image: string; | ||
url: string; | ||
}) { | ||
return ( | ||
<li class="group border-1.5 border-jsr-cyan-950 rounded list-none overflow-hidden hover:border-jsr-cyan-400 focus-within:border-jsr-cyan-400 transition-colors duration-150"> | ||
<a | ||
href={url} | ||
class="h-full flex flex-col justify-stretch cursor-pointer" | ||
tabIndex={0} | ||
> | ||
<img | ||
src={image} | ||
crossOrigin={"anonymous"} | ||
alt="" | ||
class="w-full h-48 object-cover border-b-1.5 border-jsr-cyan-950 group-hover:border-jsr-cyan-400 group-focus-within:border-jsr-cyan-400 transition-colors duration-150" | ||
/> | ||
<div class="p-4 flex flex-grow flex-col gap-4"> | ||
<h3 class="text-xl lg:text-2xl font-semibold !leading-tight text-balance"> | ||
{title} | ||
</h3> | ||
<p class="text-sm"> | ||
{description} | ||
</p> | ||
</div> | ||
</a> | ||
</li> | ||
); | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This seems to be undefined. I can't actually click on the cards 😅
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.
Whoops, we call it
link
on dotcom, noturl
. Fixed now. 👍