-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e9a7f2d
commit 6b45294
Showing
12 changed files
with
199 additions
and
89 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const API_TOKEN = import.meta.env.API_TOKEN; | ||
|
||
const get = async (url: string) => { | ||
const response = await fetch(url, { | ||
headers: { | ||
Accept: 'application/vnd.github+json', | ||
Authorization: `Bearer ${API_TOKEN}`, | ||
'X-GitHub-Api-Version': '2022-11-28', | ||
}, | ||
}); | ||
|
||
return response.json(); | ||
}; | ||
|
||
export const apiClient = { | ||
get, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './api-client'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
import type { GithubRepo } from '@/types'; | ||
import { apiClient } from '@/utils'; | ||
import RepoCard from '@/components/repo-card.astro'; | ||
const PROJECTS = [ | ||
{ | ||
username: 'gklp', | ||
repo: 'spring-craftgate', | ||
}, | ||
{ | ||
username: 'salihbilgin', | ||
repo: 'craftgatePythonClient', | ||
}, | ||
{ | ||
username: 'ygunayer', | ||
repo: 'craftgate-elixir-client', | ||
}, | ||
{ | ||
username: 'ygunayer', | ||
repo: 'craftgate-java2elixir', | ||
}, | ||
{ | ||
username: 'dvtkrlbs', | ||
repo: 'craftgate-rs', | ||
}, | ||
{ | ||
username: 'Memo-Lee', | ||
repo: 'Subscription-payment', | ||
}, | ||
{ | ||
username: 'enesozturk', | ||
repo: 'sticker-store', | ||
}, | ||
]; | ||
const data: Array<GithubRepo> = await Promise.all( | ||
PROJECTS.map(async ({ username, repo }) => { | ||
return apiClient.get(`https://api.github.com/repos/${username}/${repo}`); | ||
}), | ||
); | ||
--- | ||
|
||
<section class="container flex flex-col gap-6 mb-24"> | ||
<h2 class="text-4xl text-center">Community Projects</h2> | ||
<p class="text-2xl text-center font-light mb-8"> | ||
Our commitment to open-source projects invites collaboration and collective | ||
ingenuity, driving technology forward for everyone. Never hesitate to jump | ||
into them and explore new ways of improvement and innovation. | ||
</p> | ||
<div class="grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-6"> | ||
{data.map((repo) => <RepoCard {...repo} />)} | ||
</div> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters