-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Chanatpakorn/web 14 home members (#19)
* feat:fetch octokit * feat: members * feat: desktop animation and ring * refactor: home animation * refactor: camel case * refactor: del console log
- Loading branch information
1 parent
fe139da
commit e5d164e
Showing
8 changed files
with
161 additions
and
11 deletions.
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,39 @@ | ||
<script lang="ts"> | ||
import ProfileCard from "./ProfileCard.svelte"; | ||
import RightTick from "./RightTick.svelte"; | ||
import type { OrgMember } from "./types.ts"; | ||
export let members: OrgMember[]; | ||
</script> | ||
|
||
<section> | ||
<div | ||
class="mb-20 flex flex-col items-center justify-center gap-4 px-8 text-center" | ||
> | ||
<div class="w-3/4"> | ||
<p class="text-4xl font-medium text-white">Members</p> | ||
<div class="mt-6 flex w-full flex-col justify-center lg:my-20"> | ||
<div class="inline-flex flex-wrap justify-center"> | ||
{#if !members || members.length === 0} | ||
<p>No Public Members found...</p> | ||
{:else} | ||
{#each members as member} | ||
<ProfileCard | ||
username={member.login} | ||
avatarURL={member.avatar_url} | ||
profileURL={member.html_url} | ||
/> | ||
{/each} | ||
{/if} | ||
</div> | ||
</div> | ||
</div> | ||
<a href="https://github.com/orgs/isd-sgcu/people"> | ||
<button | ||
class="item-center rounded-lg border border-[#807F7E] bg-transparent px-4 py-2 font-normal text-[#807F7E] duration-100 hover:bg-[#807F7E] hover:text-primary" | ||
> | ||
All members | ||
<RightTick classProps="inline-block" /> | ||
</button> | ||
</a> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<script lang="ts"> | ||
export let username: string; | ||
export let avatarURL: string; | ||
export let profileURL: string; | ||
</script> | ||
|
||
<div> | ||
<div class="mx-2 my-4 inline-block"> | ||
<a class="no-underline" title={username} href={profileURL}> | ||
<div | ||
id="profile" | ||
class="rounded bg-[#232428] p-2 text-white duration-200 hover:scale-110" | ||
> | ||
<div class="flex flex-row items-center"> | ||
<img | ||
id="image-profile" | ||
alt={username} | ||
class="mr-2 h-8 w-8 rounded-full" | ||
src={avatarURL} | ||
/> | ||
<p class="text-sm"> | ||
@ {username} | ||
</p> | ||
</div> | ||
</div> | ||
</a> | ||
</div> | ||
</div> | ||
|
||
<style lang="post-css"> | ||
#image-profile { | ||
width: 30px; | ||
height: 30px; | ||
} | ||
</style> |
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,30 @@ | ||
<script lang="ts"> | ||
export let classProps: string; | ||
</script> | ||
|
||
<svg | ||
class={classProps} | ||
width="16" | ||
height="17" | ||
viewBox="0 0 16 17" | ||
fill="none" | ||
xmlns="http://www.w3.org/2000/svg" | ||
> | ||
<g id="Keyboard arrow right" clip-path="url(#clip0_1401_1011)"> | ||
<path | ||
id="Vector" | ||
d="M5.72656 11.394L8.7799 8.33398L5.72656 5.27398L6.66656 4.33398L10.6666 8.33398L6.66656 12.334L5.72656 11.394Z" | ||
fill="#807F7E" | ||
/> | ||
</g> | ||
<defs> | ||
<clipPath id="clip0_1401_1011"> | ||
<rect | ||
width="16" | ||
height="16" | ||
fill="white" | ||
transform="translate(0 0.333984)" | ||
/> | ||
</clipPath> | ||
</defs> | ||
</svg> |
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,6 @@ | ||
import type { Endpoints } from "@octokit/types"; | ||
|
||
export type OrgMember = | ||
Endpoints["GET /orgs/{org}/public_members"]["response"]["data"][number]; | ||
|
||
export type GitHubUser = Pick<OrgMember, "avatar_url" | "login" | "html_url">; |
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