diff --git a/package.json b/package.json index e1aef79..b23f2d0 100644 --- a/package.json +++ b/package.json @@ -22,6 +22,7 @@ "@astrojs/tailwind": "5.1.0", "@fontsource-variable/space-grotesk": "5.0.16", "@fontsource/noto-sans-thai-looped": "5.0.8", + "@octokit/types": "12.4.0", "astro": "4.2.1", "sharp": "0.33.2", "tailwindcss": "3.4.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 78c09b7..b079e57 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,6 +20,9 @@ dependencies: '@fontsource/noto-sans-thai-looped': specifier: 5.0.8 version: 5.0.8 + '@octokit/types': + specifier: 12.4.0 + version: 12.4.0 astro: specifier: 4.2.1 version: 4.2.1(typescript@5.3.3) @@ -1010,6 +1013,16 @@ packages: '@nodelib/fs.scandir': 2.1.5 fastq: 1.16.0 + /@octokit/openapi-types@19.1.0: + resolution: {integrity: sha512-6G+ywGClliGQwRsjvqVYpklIfa7oRPA0vyhPQG/1Feh+B+wU0vGH1JiJ5T25d3g1JZYBHzR2qefLi9x8Gt+cpw==} + dev: false + + /@octokit/types@12.4.0: + resolution: {integrity: sha512-FLWs/AvZllw/AGVs+nJ+ELCDZZJk+kY0zMen118xhL2zD0s1etIUHm1odgjP7epxYU1ln7SZxEUWYop5bhsdgQ==} + dependencies: + '@octokit/openapi-types': 19.1.0 + dev: false + /@pkgjs/parseargs@0.11.0: resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==} engines: {node: '>=14'} diff --git a/src/components/member/Members.svelte b/src/components/member/Members.svelte new file mode 100644 index 0000000..2ebc26a --- /dev/null +++ b/src/components/member/Members.svelte @@ -0,0 +1,39 @@ + + +
+
+
+

Members

+
+
+ {#if !members || members.length === 0} +

No Public Members found...

+ {:else} + {#each members as member} + + {/each} + {/if} +
+
+
+ + + +
+
diff --git a/src/components/member/ProfileCard.svelte b/src/components/member/ProfileCard.svelte new file mode 100644 index 0000000..b616b87 --- /dev/null +++ b/src/components/member/ProfileCard.svelte @@ -0,0 +1,35 @@ + + +
+
+ +
+
+ {username} +

+ @ {username} +

+
+
+
+
+
+ + diff --git a/src/components/member/RightTick.svelte b/src/components/member/RightTick.svelte new file mode 100644 index 0000000..86f5b29 --- /dev/null +++ b/src/components/member/RightTick.svelte @@ -0,0 +1,30 @@ + + + + + + + + + + + + diff --git a/src/components/member/types.ts b/src/components/member/types.ts new file mode 100644 index 0000000..3e4357a --- /dev/null +++ b/src/components/member/types.ts @@ -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; diff --git a/src/pages/index.astro b/src/pages/index.astro index 03aa83b..2046ca6 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -3,39 +3,58 @@ import Layout from "@/layouts/Layout.astro"; import ISDLogo from "@/assets/isd_logo.svg"; import { Image } from "astro:assets"; +import Members from "@/components/member/Members.svelte"; + +const fetchOrgMembers = async () => { + try { + const res = await fetch( + "https://api.github.com/orgs/isd-sgcu/public_members", + ); + const data = await res.json(); + return data; + } catch (err) { + console.error(err); + } +}; +const orgMembers = await fetchOrgMembers(); ---
+ - -

Information System

- Development -

+ + + +

Information System

+ Development +

logo
+
diff --git a/tailwind.config.mjs b/tailwind.config.mjs index dd923df..0e935a2 100644 --- a/tailwind.config.mjs +++ b/tailwind.config.mjs @@ -17,10 +17,16 @@ export default { "70%": { transform: "translateX(-2%)" }, "100%": { transform: "translateX(0)" }, }, + slideUp: { + "0%": { transform: "translateY(100%)" }, + "70%": { transform: "translateY(-2%)" }, + "100%": { transform: "translateY(0)" }, + }, }, animation: { "sliding-left": "slideLeft 1.5s", "sliding-right": "slideRight 1.5s", + "sliding-up": "slideUp 1.5s", }, }, },