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

Chocomiembros #63

Merged
merged 5 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
3 changes: 3 additions & 0 deletions src/lib/assets/icons/bx-link.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/lib/assets/icons/linkedin.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
42 changes: 42 additions & 0 deletions src/lib/components/Member.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<script lang="ts">
import github_logo from "$lib/assets/icons/github.svg";
import linkedin_logo from "$lib/assets/icons/linkedin.svg";
import link_logo from "$lib/assets/icons/bx-link.svg";

type Props = {
name: string;
role: string;
photo: string;
socialMedia: {nombre: string, link: string}[];
}

let { name, role, photo, socialMedia}:Props = $props();
</script>

<div class="flex flex-col gap-2 justify-center items-center pb-14">
<img class="rounded-full size-20 md:size-24 inset-0" src={photo} alt="Foto" >

<div class="flex flex-col justify-center items-center">
<h2 class="text-lime-400 text-base" >{name}</h2>
<p class="text-sm">{role}</p>
</div>

<div class="flex flex-row gap-2 justify-items-center object-center ">

{#each socialMedia as media}

<a class="object-center" href={media.link}>

{#if media.nombre === "linkedin"}
<img class="basis-1/3 object-center " height="16" width="16" src={linkedin_logo} alt="LinkedIn">
{:else if media.nombre === "github"}
<img class="basis-1/3 object-center " height="16" width="16" src={github_logo} alt="Github">
{:else if media.nombre === "link"}
<img class="basis-1/3 object-center " height="16" width="16" src={link_logo} alt="Link">
{/if}

</a>

{/each}
</div>
</div>
15 changes: 15 additions & 0 deletions src/lib/components/Members_home.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<script lang="ts">
import Member from "$lib/components/Member.svelte"
import members from "$lib/data/members.json"
</script>

<div class="grid grid-cols-1 md:grid-cols-3 justify-center px-20 md:px-48 py-48 justify-items-center">
{#each members as member}
<Member
name={member.name}
role={member.role}
photo={member.photo}
socialMedia={member.socialMedia}
></Member>
{/each}
</div>
84 changes: 84 additions & 0 deletions src/lib/data/members.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
[
{
"name": "Alina Carpio",
"role": "Presidente",
"photo": "https://avatars.githubusercontent.com/u/72272077?v=4",
"directiva": "si",
"socialMedia": [
{ "nombre": "github", "link": "https://github.com/alicarpio" }
]
},
{
"name": "Melissa Ayllon",
"role": "Vicepresidente",
"photo": "https://avatars.githubusercontent.com/u/116417470?v=4",
"directiva": "si",
"socialMedia": [
{ "nombre": "github", "link": "https://github.com/MelissaAyllon" }
]
},
{
"name": "Michael Estrada",
"role": "Secretario",
"photo": "https://avatars.githubusercontent.com/u/98861990?v=4",
"directiva": "si",
"socialMedia": [
{ "nombre": "github", "link": "https://github.com/BryanEstrada003" }
]
},
{
"name": "Adrian Delgado",
"role": "Miembro",
"photo": "https://avatars.githubusercontent.com/u/11708972?v=4",
"directiva": "no",
"socialMedia": [
{ "nombre": "github", "link": "https://github.com/adriandelgado" }
]
},
{
"name": "Braulio Rivas",
"role": "Miembro",
"photo": "https://avatars.githubusercontent.com/u/61257604?v=4",
"directiva": "no",
"socialMedia": [
{ "nombre": "github", "link": "https://github.com/brauliorivas" }
]
},
{
"name": "Daniel Cortez",
"role": "Miembro",
"photo": "https://avatars.githubusercontent.com/u/112514991?v=4",
"directiva": "no",
"socialMedia": [
{ "nombre": "github", "link": "https://github.com/DanRCM" }
]
},
{
"name": "Adair Abrigo",
"role": "Miembro",
"photo": "https://avatars.githubusercontent.com/u/93391519?v=4",
"directiva": "no",
"socialMedia": [
{ "nombre": "github", "link": "https://github.com/adairaxe" }
]
},
{
"name": "Anthony Herrera",
"role": "Miembro",
"photo": "https://avatars.githubusercontent.com/u/137233273?v=4",
"directiva": "no",
"socialMedia": [
{ "nombre": "github", "link": "https://github.com/AnthonyyHL" }
]
},
{
"name": "John Cañarte",
"role": "Miembro",
"photo": "https://avatars.githubusercontent.com/u/70679514?v=4",
"directiva": "no",
"socialMedia": [
{ "nombre": "github", "link": "https://github.com/Jecanart" }
]
}
]

2 changes: 2 additions & 0 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<script lang="ts">
import Hero from "./Hero.svelte";
import Members_home from "$lib/components/Members_home.svelte";
</script>

<Hero />
<Members_home />
32 changes: 32 additions & 0 deletions src/routes/members/+page.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<script lang="ts">
import Member from "$lib/components/Member.svelte"
let { data } = $props();
</script>

<h1 class=" font-fira text-4xl text-slate-200 text-center pt-5 pb-8">Directiva</h1>
<div class="grid grid-cols-1 md:grid-cols-3 justify-center px-20 md:px-48 py-3 justify-items-center">
{#each data.members as member}
{#if member.directiva === "si"}
<Member
name={member.name}
role={member.role}
photo={member.photo}
socialMedia={member.socialMedia}
></Member>
{/if}
{/each}
</div>

<h1 class=" font-fira text-4xl text-slate-200 text-center pt-5 pb-8">Miembros</h1>
<div class="grid grid-cols-1 md:grid-cols-3 justify-center px-20 md:px-48 py-3 justify-items-center">
{#each data.members as member}
{#if member.directiva === "no"}
<Member
name={member.name}
role={member.role}
photo={member.photo}
socialMedia={member.socialMedia}
></Member>
{/if}
{/each}
</div>
10 changes: 10 additions & 0 deletions src/routes/members/+page.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import type { PageLoad } from "./$types";
import members from "$lib/data/members.json"
export const load = (async () => {
return {
title: "Chocomiembros",
// TODO: fetch from API
description: "Miembros del club Kokoa",
members,
};
}) satisfies PageLoad;