From a0edb7cfd6c00e69d5262c08d739845fbb220af2 Mon Sep 17 00:00:00 2001 From: rita cachaldora Date: Sat, 16 Nov 2024 19:20:43 +0000 Subject: [PATCH 1/2] first try at setting grids and titles --- src/routes/(app)/team/+page.svelte | 583 ++++++++++++++++++ .../_components/team-member-hexagon.svelte | 26 +- 2 files changed, 597 insertions(+), 12 deletions(-) create mode 100644 src/routes/(app)/team/+page.svelte diff --git a/src/routes/(app)/team/+page.svelte b/src/routes/(app)/team/+page.svelte new file mode 100644 index 0000000..dc293ec --- /dev/null +++ b/src/routes/(app)/team/+page.svelte @@ -0,0 +1,583 @@ + + +
+
+

< Equipa />

+
+ +
+
+
+
+

Direção

+
+
+ +
+ +
+ +
+
+
+
+

Membros

+
+
+ +
+ +
+ +
+
+
+
+

Recrutas

+
+
+ +
+ +
+ +
+
+
+
+

Alumni

+
+
+ +
+ +
+ + +
+ diff --git a/src/routes/(app)/team/_components/team-member-hexagon.svelte b/src/routes/(app)/team/_components/team-member-hexagon.svelte index b1d5d69..a9524ad 100644 --- a/src/routes/(app)/team/_components/team-member-hexagon.svelte +++ b/src/routes/(app)/team/_components/team-member-hexagon.svelte @@ -73,43 +73,45 @@ >

{teamMember.name}

- {teamMember.role} -

+ {#if teamMember.role} + {teamMember.role} + {/if} +

{#if teamMember.linkedin} - {/if} {#if teamMember.gitHub} {/if} {#if teamMember.websites} {#each teamMember.websites as customWebsite} {#if customWebsite.iconPath} @@ -119,7 +121,7 @@ class="icon h-full w-full object-cover" /> {:else} - + {/if} {/each} @@ -128,7 +130,7 @@
Date: Sat, 16 Nov 2024 19:20:43 +0000 Subject: [PATCH 2/2] grid and title mostly responsive --- src/routes/(app)/team/+page.svelte | 55 ++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 10 deletions(-) diff --git a/src/routes/(app)/team/+page.svelte b/src/routes/(app)/team/+page.svelte index dc293ec..b3b4d03 100644 --- a/src/routes/(app)/team/+page.svelte +++ b/src/routes/(app)/team/+page.svelte @@ -3,6 +3,21 @@ import TeamMemberHexagon from './_components/team-member-hexagon.svelte'; // Caminho para o componente import type { TeamMember } from '@/types/team-member'; import HexagonGrid from '@/lib/components/hexagons/hexagon-grid.svelte'; + import { onMount } from 'svelte'; + let isSmallScreen = false; + + const checkScreenSize = () => { + isSmallScreen = window.innerWidth < 768; // Tailwind's `md` breakpoint + }; + + onMount(() => { + checkScreenSize(); // Check screen size on mount + window.addEventListener('resize', checkScreenSize); // Update on resize + + return () => { + window.removeEventListener('resize', checkScreenSize); // Cleanup + }; + }); const boardMembers: TeamMember[] = [ @@ -495,6 +510,7 @@ } ]; +
@@ -502,24 +518,43 @@

< Equipa />

-
-
-
-
-

Direção

-
+
+
+
+ {#if !isSmallScreen} + + {/if} +

+ Direção +

+ {#if !isSmallScreen} + + {/if}
- + {:else} + + /> + {/if}
- -
+