Skip to content

Commit

Permalink
fix: contributors grid
Browse files Browse the repository at this point in the history
  • Loading branch information
rochacbruno committed Oct 24, 2024
1 parent 77ed9d1 commit 4ebdf5c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
12 changes: 6 additions & 6 deletions .github/contributors.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@

with open(filename, "w") as file:
file.write("# Contributors\n\n")

file.write('<div class="grid" style="display: flex;flex-flow:wrap;">\n')
for i, contributor in enumerate(contributors_sorted):
# Start a new grid after every 5 contributors
if i % 5 == 0:
if i != 0:
file.write("</div>\n")
file.write('<div class="grid" style="display: flex;">\n')
# # Start a new grid after every 5 contributors
# if i % 5 == 0:
# if i != 0:
# file.write("</div>\n")
# file.write('<div class="grid" style="display: flex;">\n')

username = contributor["login"]
profile_url = contributor["html_url"]
Expand Down
8 changes: 3 additions & 5 deletions example/content/contributors.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Contributors

<div class="grid" style="display: flex;">
<div class="grid" style="display: flex;flex-flow:wrap;">
<article style="width: 250px;text-align: center;">
<header style="text-align: center;"><a href="https://github.com/rochacbruno" target="_blank">rochacbruno</a></header>
<a href="https://github.com/rochacbruno" target="_blank"><img src="https://avatars.githubusercontent.com/u/458654?v=4" style="width: 100px;"></a>
<footer style="text-align: center;">63 commits</footer>
<footer style="text-align: center;">66 commits</footer>
</article>
<article style="width: 250px;text-align: center;">
<header style="text-align: center;"><a href="https://github.com/scovl" target="_blank">scovl</a></header>
Expand All @@ -14,7 +14,7 @@
<article style="width: 250px;text-align: center;">
<header style="text-align: center;"><a href="https://github.com/karlamagueta" target="_blank">karlamagueta</a></header>
<a href="https://github.com/karlamagueta" target="_blank"><img src="https://avatars.githubusercontent.com/u/64945344?v=4" style="width: 100px;"></a>
<footer style="text-align: center;">3 commits</footer>
<footer style="text-align: center;">4 commits</footer>
</article>
<article style="width: 250px;text-align: center;">
<header style="text-align: center;"><a href="https://github.com/rdenadai" target="_blank">rdenadai</a></header>
Expand All @@ -26,8 +26,6 @@
<a href="https://github.com/SkySingh04" target="_blank"><img src="https://avatars.githubusercontent.com/u/114267538?v=4" style="width: 100px;"></a>
<footer style="text-align: center;">1 commits</footer>
</article>
</div>
<div class="grid" style="display: flex;">
<article style="width: 250px;text-align: center;">
<header style="text-align: center;"><a href="https://github.com/zokaibr" target="_blank">zokaibr</a></header>
<a href="https://github.com/zokaibr" target="_blank"><img src="https://avatars.githubusercontent.com/u/8548385?v=4" style="width: 100px;"></a>
Expand Down

0 comments on commit 4ebdf5c

Please sign in to comment.