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

docs/filter-contributors-list #2207

Merged
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
4 changes: 2 additions & 2 deletions sites/skeleton.dev/src/routes/+page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import type { PageLoad } from './$types';
export const load: PageLoad = async ({ fetch }) => {
const getContributors = async () => {
if (!browser) return []; // only fetch on the browser
const res = await fetch('https://api.github.com/repos/skeletonlabs/skeleton/contributors');
const res = await fetch('https://api.github.com/repos/skeletonlabs/skeleton/contributors?per_page=102');
if (!res.ok) return []; // return an empty list
const body = (await res.json()) as Contributor[];
return body;
return body.filter((c) => c.login !== 'github-actions[bot]' && c.login !== 'LukeHagar');
};
return { contributors: getContributors() };
};
Expand Down
22 changes: 12 additions & 10 deletions sites/skeleton.dev/src/routes/home-partials/HomeContributors.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
import { Avatar } from '@skeletonlabs/skeleton';
import type { Contributor } from '../+page';
export let contributors: Contributor[];

$: contributors = contributors.slice(0, 100);
</script>

<div class="space-y-10">
Expand All @@ -11,7 +13,7 @@
<h2 class="h2">Built by Awesome People.</h2>
<p>Here are a few of the people responsible for creating and maintaining Skeleton.</p>
</div>
<div class="grid grid-cols-1 lg:grid-cols-2 gap-10 md:gap-4 items-center">
<div class="flex justify-center">
<!-- Skeleton Labs -->
<div class="card variant-soft-secondary overflow-hidden">
<header class="variant-filled-secondary grid grid-cols-[1fr_auto_auto] gap-4 items-center p-4 md:p-8 md:py-8">
Expand All @@ -36,15 +38,15 @@
</div>
</section>
</div>
<!-- Contributors -->
<div class="space-y-4 text-center lg:text-left">
<div class="grid grid-cols-6 gap-4 max-w-[480px] mx-auto">
{#each contributors as c}
<a href={c.html_url} target="_blank" rel="noreferrer" title={c.login}>
<Avatar src={c.avatar_url} width="w-full" background="bg-black" />
</a>
{/each}
</div>
</div>
<!-- Contributors -->
<div class="space-y-4 text-center lg:text-left">
<div class="grid grid-cols-8 md:grid-cols-12 gap-4 max-w-4xl mx-auto">
{#each contributors as c}
<a href={c.html_url} target="_blank" rel="noreferrer" title={c.login}>
<Avatar loading="lazy" src={c.avatar_url} width="w-full" background="bg-black" />
</a>
{/each}
</div>
</div>
</div>