Skip to content
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

fix: contributor avatar layout #433

Merged
merged 2 commits into from
Sep 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions www/src/components/blog/avatarList.astro
Original file line number Diff line number Diff line change
Expand Up @@ -69,21 +69,15 @@ const recentContributors = unique.slice(0, 3); // only show avatars for the 3 mo
const additionalContributors = unique.length - recentContributors.length; // list the rest of them as # of extra contributors
---

<div class="flex flex-col items-center justify-center py-3">
<span class="py-2">Recent Contributers To This Page</span>
<ul
class={`grid grid-cols-${recentContributors.length} gap-2 sm:gap-4 sm:grid-cols-${recentContributors.length}`}
>
<div class="flex flex-col gap-2 items-center justify-center py-3">
<span class="py-2">Recent Contributors To This Page</span>
<ul class="flex gap-4">
{
recentContributors.map((item, i) => (
recentContributors.map((item) => (
<li>
<a href={`https://github.com/${item.login}`}>
<img
class={
i === 0
? `rounded-full w-8 h-8 sm:w-10 sm:h-10`
: `rounded-full w-8 h-8 sm:w-10 sm:h-10 -translate-x-3 sm:-translate-x-5`
}
class="rounded-full w-8 h-8 sm:w-10 sm:h-10"
alt={`Contributor ${item.login}`}
title={`Contributor ${item.login}`}
width="64"
Expand Down