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

Add member count to homepage #136

Merged
merged 3 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions src/components/Leaderboard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ import {
sortMembersByDevs, DEV_GROUP_BOUNDS
} from '../members.ts';

const members = await getMembers();
const members = filterInactiveMembers(await getMembers());
---

{grouped ? <div>
{groupMembers(filterInactiveMembers(members)).map((groupMembers, idx) => groupMembers.length > 0 && <div>
{groupMembers(members).map((groupMembers, idx) => groupMembers.length > 0 && <div>
<h2>{formatDevGroupBounds(DEV_GROUP_BOUNDS[idx])}</h2>
<table class="table--lrr table--40-30-30">
<thead>
Expand Down Expand Up @@ -57,7 +57,7 @@ const members = await getMembers();
</tr>
</thead>
<tbody>
{sortMembersByDevs(filterInactiveMembers(members)).map((member) => <tr>
{sortMembersByDevs(members).map((member) => <tr>
<LeaderboardMember member={member}></LeaderboardMember>
</tr>)}
</tbody>
Expand Down
24 changes: 11 additions & 13 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ import Button from "../components/Button.astro";
import Layout from "../layouts/Layout.astro";
import MiniLeaderboard from "../components/MiniLeaderboard.astro";
import TextButton from "../components/TextButton.astro";
import {
getMembers, filterInactiveMembers,
} from '../members.ts';

const members = filterInactiveMembers(await getMembers());
---

<Layout>
Expand Down Expand Up @@ -36,11 +41,10 @@ import TextButton from "../components/TextButton.astro";
</div>
</div>
<p
>Whether you're a CEO, CFO, CTO, or just a dev, your company surely depends on Open Source software. It's time to pay the maintainers.</p
>
<Button href="/join"
>Join the Pledge</Button
>Whether you're a CEO, CFO, CTO, or just a dev, your company surely depends on Open Source software. It's
time to pay the maintainers.</p
>
<Button href="/join">Join the Pledge</Button>
</div>
</section>

Expand All @@ -54,9 +58,7 @@ import TextButton from "../components/TextButton.astro";

<div class="highlight-box highlight-box--circled">
<h3><div><span class="circled">2</span></div><span>Self-report annually</span></h3>
<p
>Each year, publish a blog post outlining your payments to maintainers.</p
>
<p>Each year, publish a blog post outlining your payments to maintainers.</p>
</div>
</section>

Expand All @@ -69,9 +71,7 @@ import TextButton from "../components/TextButton.astro";
<MiniLeaderboard></MiniLeaderboard>

<div class="text-center">
<TextButton href="/members"
>Explore all members</TextButton
>
<TextButton href="/members">Explore all {members.length} members</TextButton>
</div>
</div>
</section>
Expand All @@ -83,9 +83,7 @@ import TextButton from "../components/TextButton.astro";
</div>

<div class="text-center">
<Button href="/join"
>Join the Pledge</TextButton
>
<Button href="/join">Join the Pledge</TextButton>
</div>
</div>
</section>
Expand Down