Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
32 changes: 19 additions & 13 deletions app/(site)/team/page.tsx
Original file line number Diff line number Diff line change
@@ -1,31 +1,37 @@
import { client } from "@/sanity/lib/client";
import { teamPageQuery, teamMembersQuery } from "@/sanity/lib/queries";
import { TeamMember, TeamPageData } from "@/lib/sanity/types";
import TeamPageClient from "@/components/TeamPageClient";
import { Metadata } from 'next'
import { client } from '@/sanity/lib/client'
import { teamPageQuery, teamMembersQuery } from '@/sanity/lib/queries'
import { TeamMember, TeamPageData } from '@/lib/sanity/types'
import TeamPageClient from '@/components/TeamPageClient'

export const metadata: Metadata = {
title: 'Team | Monash Association of Coding',
description: 'Meet the team behind Monash Association of Coding',
}

async function getTeamPageData(): Promise<TeamPageData | null> {
try {
return await client.fetch(teamPageQuery);
return await client.fetch(teamPageQuery)
} catch (error) {
console.error("Error fetching team page data:", error);
return null;
console.error('Failed to fetch team page data:', error)
return null
}
}

async function getTeamMembers(): Promise<TeamMember[] | null> {
async function getTeamMembers(): Promise<TeamMember[]> {
try {
return await client.fetch(teamMembersQuery);
return (await client.fetch(teamMembersQuery)) || []
} catch (error) {
console.error("Error fetching team members:", error);
return null;
console.error('Failed to fetch team members:', error)
return []
}
}

export default async function TeamPage() {
const [pageData, members] = await Promise.all([
getTeamPageData(),
getTeamMembers(),
]);
])

return <TeamPageClient pageData={pageData} members={members} />;
return <TeamPageClient pageData={pageData} members={members} />
}
174 changes: 174 additions & 0 deletions components/ChromaGrid.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
.chroma-grid {
position: relative;
width: 100%;
height: 100%;
display: grid;
grid-template-columns: repeat(var(--cols, 3), 320px);
grid-auto-rows: auto;
justify-content: center;
gap: 0.75rem;
max-width: 1200px;
margin: 0 auto;
padding: 1rem;
box-sizing: border-box;

--x: 50%;
--y: 50%;
--r: 220px;
}

@media (max-width: 1124px) {
.chroma-grid {
grid-template-columns: repeat(auto-fit, minmax(320px, 320px));
gap: 0.5rem;
padding: 0.5rem;
}
}

@media (max-width: 480px) {
.chroma-grid {
grid-template-columns: 320px;
gap: 0.75rem;
padding: 1rem;
}
}

.chroma-card {
position: relative;
display: flex;
flex-direction: column;
width: 320px;
height: auto;
border-radius: 20px;
overflow: hidden;
border: 1px solid #333;
transition: border-color 0.3s ease;
background: var(--card-gradient);

--mouse-x: 50%;
--mouse-y: 50%;
--spotlight-color: rgba(255, 255, 255, 0.3);
}

.chroma-card:hover {
border-color: var(--card-border);
}

.chroma-card::before {
content: '';
position: absolute;
inset: 0;
background: radial-gradient(circle at var(--mouse-x) var(--mouse-y), var(--spotlight-color), transparent 70%);
pointer-events: none;
opacity: 0;
transition: opacity 0.5s ease;
z-index: 2;
}

.chroma-card:hover::before {
opacity: 1;
}

.chroma-img-wrapper {
position: relative;
z-index: 1;
flex: 1;
padding: 10px;
box-sizing: border-box;
background: transparent;
transition: background 0.3s ease;
}

.chroma-img-wrapper img {
width: 100%;
height: 100%;
object-fit: cover;
border-radius: 10px;
display: block;
}

.chroma-info {
position: relative;
z-index: 1;
padding: 0.75rem 1rem;
color: #fff;
font-family: system-ui, sans-serif;
display: grid;
grid-template-columns: 1fr auto;
row-gap: 0.25rem;
column-gap: 0.75rem;
}

.chroma-info .role,
.chroma-info .handle {
color: #aaa;
}

.chroma-overlay {
position: absolute;
inset: 0;
pointer-events: none;
z-index: 3;
backdrop-filter: grayscale(1) brightness(0.78);
-webkit-backdrop-filter: grayscale(1) brightness(0.78);
background: rgba(0, 0, 0, 0.001);

mask-image: radial-gradient(
circle var(--r) at var(--x) var(--y),
transparent 0%,
transparent 15%,
rgba(0, 0, 0, 0.1) 30%,
rgba(0, 0, 0, 0.22) 45%,
rgba(0, 0, 0, 0.35) 60%,
rgba(0, 0, 0, 0.5) 75%,
rgba(0, 0, 0, 0.68) 88%,
white 100%
);
-webkit-mask-image: radial-gradient(
circle var(--r) at var(--x) var(--y),
transparent 0%,
transparent 15%,
rgba(0, 0, 0, 0.1) 30%,
rgba(0, 0, 0, 0.22) 45%,
rgba(0, 0, 0, 0.35) 60%,
rgba(0, 0, 0, 0.5) 75%,
rgba(0, 0, 0, 0.68) 88%,
white 100%
);
}

.chroma-fade {
position: absolute;
inset: 0;
pointer-events: none;
z-index: 4;
backdrop-filter: grayscale(1) brightness(0.78);
-webkit-backdrop-filter: grayscale(1) brightness(0.78);
background: rgba(0, 0, 0, 0.001);

mask-image: radial-gradient(
circle var(--r) at var(--x) var(--y),
white 0%,
white 15%,
rgba(255, 255, 255, 0.9) 30%,
rgba(255, 255, 255, 0.78) 45%,
rgba(255, 255, 255, 0.65) 60%,
rgba(255, 255, 255, 0.5) 75%,
rgba(255, 255, 255, 0.32) 88%,
transparent 100%
);
-webkit-mask-image: radial-gradient(
circle var(--r) at var(--x) var(--y),
white 0%,
white 15%,
rgba(255, 255, 255, 0.9) 30%,
rgba(255, 255, 255, 0.78) 45%,
rgba(255, 255, 255, 0.65) 60%,
rgba(255, 255, 255, 0.5) 75%,
rgba(255, 255, 255, 0.32) 88%,
transparent 100%
);

opacity: 1;
transition: opacity 0.25s ease;
}
Loading