Fix repo card heigth for different repo descriptions (#2525)
Hello! I had this minor issue on my website and I saw few other people using this template and having the same issue. **Brief** if two repo's in the same row has different number of lines for the descriptions, heights of the cards will not be the same if we don't force the number of lines to be displayed. **Solution** By looking at [This issue](https://github.com/anuraghazra/github-readme-stats/issues/2900) I could see that they solved it by adding an new option, `description_lines_count`. This was used on the API request in order to fix the issue. --- ## Issue reproduced:  --- ## Issue fixed after the commit: 
This commit is contained in:
parent
fefa2470b4
commit
f4a6e184a9
|
|
@ -2,11 +2,13 @@ github_users:
|
||||||
- torvalds
|
- torvalds
|
||||||
- alshedivat
|
- alshedivat
|
||||||
|
|
||||||
|
repo_description_lines_max: 2
|
||||||
|
|
||||||
github_repos:
|
github_repos:
|
||||||
- alshedivat/al-folio
|
- alshedivat/al-folio
|
||||||
- twbs/bootstrap
|
|
||||||
- jekyll/jekyll
|
- jekyll/jekyll
|
||||||
|
- twbs/bootstrap
|
||||||
- jquery/jquery
|
- jquery/jquery
|
||||||
- FortAwesome/Font-Awesome
|
- FortAwesome/Font-Awesome
|
||||||
- jpswalsh/academicons
|
|
||||||
- mathjax/MathJax
|
- mathjax/MathJax
|
||||||
|
- jpswalsh/academicons
|
||||||
|
|
|
||||||
|
|
@ -5,17 +5,23 @@
|
||||||
{% assign show_owner = true %}
|
{% assign show_owner = true %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if site.data.repositories.repo_description_lines_max %}
|
||||||
|
{% assign max_lines = site.data.repositories.repo_description_lines_max %}
|
||||||
|
{% else %}
|
||||||
|
{% assign max_lines = 2 %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<div class="repo p-2 text-center">
|
<div class="repo p-2 text-center">
|
||||||
<a href="https://github.com/{{ include.repository }}">
|
<a href="https://github.com/{{ include.repository }}">
|
||||||
<img
|
<img
|
||||||
class="repo-img-light w-100"
|
class="repo-img-light w-100"
|
||||||
alt="{{ include.repository }}"
|
alt="{{ include.repository }}"
|
||||||
src="https://github-readme-stats.vercel.app/api/pin/?username={{ repo_url[0] }}&repo={{ repo_url[1] }}&theme={{ site.repo_theme_light }}&show_owner={{ show_owner }}"
|
src="https://github-readme-stats.vercel.app/api/pin/?username={{ repo_url[0] }}&repo={{ repo_url[1] }}&theme={{ site.repo_theme_light }}&show_owner={{ show_owner }}&description_lines_count={{ max_lines }}"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
class="repo-img-dark w-100"
|
class="repo-img-dark w-100"
|
||||||
alt="{{ include.repository }}"
|
alt="{{ include.repository }}"
|
||||||
src="https://github-readme-stats.vercel.app/api/pin/?username={{ repo_url[0] }}&repo={{ repo_url[1] }}&theme={{ site.repo_theme_dark }}&show_owner={{ show_owner }}"
|
src="https://github-readme-stats.vercel.app/api/pin/?username={{ repo_url[0] }}&repo={{ repo_url[1] }}&theme={{ site.repo_theme_dark }}&show_owner={{ show_owner }}&description_lines_count={{ max_lines }}"
|
||||||
>
|
>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue