-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
[Proposal] Equal height for all pinned repositories #2900
Comments
@razonyang, thanks for your bug report. This is the intended behaviour since we want the card to resize to the repository description automatically, and users are expected to handle the card height themselves using the HTML So I think I prefer to close this issue. However, if @qwerty541 and @anuraghazra think this behaviour is not intended, we can change the minimum size of the <a href="https://github.com/anuraghazra/github-readme-stats">
<img height="140" align="center" src="https://github-readme-stats.vercel.app/api/pin/?username=anuraghazra&repo=github-readme-stats" />
</a>
<a href="https://github.com/anuraghazra/convoychat">
<img align="center" src="https://github-readme-stats.vercel.app/api/pin/?username=rickstaa&repo=github-emoji-picker" />
</a> |
@rickstaa Thanks for the code snippet, but the fixed height doesn't look good, equal width and height looks better. The font-size are also smaller than others. It may better that if the description can take 2 rows, fill up with whitespace if not enough. Please feel free to close it if it's not possible or reasonable. I've solved it by modifying the descriptions. |
Thanks for your feedback. We have the card_width option to change the card width. One way to improve this behaviour is to add a |
It looks like my previous comment was incorrect 🤔. The |
I re-opened this issue so that @qwerty541 and @anuraghazra can give their opinion. |
@rickstaa Maybe this behavior is good one to be improved but i think i will be very hard to do working with pure SVG. We can return to this after #1633 will be implemented. |
I agree let's keep this open for now 👍🏻. |
@rickstaa can i do this task and can uh set it for hacktoberfest |
@airwakz of course. Thanks for choosing us for the Hacktoberfest! You can implement the |
ig thanks for the detailed response. I successfully replicated the issue you mentioned. It seems to stem from the use of the HTML height property, causing the SVG image to scale and the fonts to enlarge. I'm thinking we could introduce a card_height argument, ensuring that it maintains the minimum height required for displaying the text 🤔. Any thoughts on this, @anuraghazra or @qwerty541? Open to better ideas! Without height property ` ` With Height properly ` <style> .repository-card { width: 300px; /* Set the desired width for each card */ height: 200px; /* Set the desired height for each card */ margin: 10px; /* Add margin between cards if needed */ } </style>` |
@rickstaa do uh want me to make any changes to |
@airwakz, your conclusion is correct (see #3159 (comment)). The same problem occurs with the other cards in #3159. Adding the I already assigned @anmolchhabra21 to solve this problem for the cards. I just asked if he is still working on that issue. In the meantime, you can add the |
@rickstaa can uh tell me in which file i need to make changes as i am unable to make changes in the file and a pr need a change of html code or a file |
Yea, no problem. To implement the |
@airwakz I just noticed that the contributing guide is outdated and created a pull request -> https://github.com/anuraghazra/github-readme-stats/pull/3358/files. You can use the steps in this pull request. |
`/ Import the card_width logic from the "stats card" // ... (Existing code) // Define your own minCardWidth and defaultCardWidth for the "repo card" /**
// ... (Existing code) /**
// ... (Remaining code)` |
@airwakz Thank you spending time on this, I'm curious how it look likes in the case of multiple rows. i.e. the GitHub example below, the |
@razonyang yah i kept original 6 in mind before solving this issue as we can select max 6 repos |
@airwakz Can you maybe create a pull request? This will make it a lot easier for me to review your code. |
I think the width and height should be handled by the user through the |
Now, users can specify the card_width and card_height when using the renderRepoCard function to control the dimensions of the repository card. If not provided, it falls back to default value and can uh tell me its default value |
@rickstaa opened a pr just check it out |
@qwerty541 @rickstaa #3359 i have raised a pull request kindly merge it |
Restores the original 'top-languages-card' code since it is not part of \anuraghazra#2900.
Restores the original 'top-languages-card' code since it is not part of \anuraghazra#2900.
Restores the original 'top-languages-card' code since it is not part of \anuraghazra#2900.
Pull request #3453 was merged, now equal height for different repositories cards can be achieved by the following way: Before:<div align="center">
<a href="https://github.com/anuraghazra/github-readme-stats">
<img src="https://github-readme-stats.vercel.app/api/pin/?username=rjyo&repo=Air-Test"/>
</a>
<a href="https://github.com/anuraghazra/github-readme-stats">
<img src="https://github-readme-stats.vercel.app/api/pin/?username=meako689&repo=FortyTwoTestTask"/>
</a>
</div> After (
|
Is your feature request related to a problem? Please describe.
Hi, I found that the pinned repos are not equal height.
Describe the solution you'd like
GitHub built-in:
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: