Skip to content

Commit

Permalink
update prizes + handbook link
Browse files Browse the repository at this point in the history
  • Loading branch information
terencehuynh committed Feb 29, 2024
1 parent 37df0bb commit f6203cc
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 6 deletions.
6 changes: 6 additions & 0 deletions components/new-prize/prize.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,11 @@ export type PrizeModel = {
subtext?: string;
individual?: boolean;
imagePath?: string;
links?: PrizeLinksModel[];
contents?: string[];
}

export type PrizeLinksModel = {
title: string;
link: string
}
18 changes: 17 additions & 1 deletion components/new-prize/prize.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,28 @@ import React from 'react';
import styles from './prize.module.scss';
import Stack from '@components/stack/stack';
import { H3, Text, Subtext } from '@components/typography/typography';
import { PrizeModel } from './prize.model';
import { PrizeModel, PrizeLinksModel } from './prize.model';
import ButtonLink from '@components/button/button-link';

type PropTypes = {
prize: PrizeModel;
isSponsor?: boolean;
};

export const PrizeLinks = ({ links }: { links: PrizeLinksModel[] }) => {
return (
<div className={styles.links}>
{links.map(({ link, title }) => {
return (
<ButtonLink theme="light" type="primary" href={link}>
{title}
</ButtonLink>
);
})}
</div>
);
};

export const Prize = ({ prize, isSponsor }: PropTypes) => {
return (
<div className={styles.prize}>
Expand All @@ -22,6 +37,7 @@ export const Prize = ({ prize, isSponsor }: PropTypes) => {
</div>
{prize.description && <Text>{prize.description}</Text>}
{prize.subtext && <Subtext>{prize.subtext}</Subtext>}
{prize.links && <PrizeLinks links={prize.links} />}
</Stack>
{prize.contents && (
<div className={styles['prize-content']}>
Expand Down
12 changes: 12 additions & 0 deletions content/events/2024/prizes.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@
"description": "We're looking for something that helps people live a healthier life. It could help people be more in control of their health. Or it could be something that improves the health systems around them.",
"imagePath": "/images/sponsors/Miga Health.svg",
"contents": ["$750 for the entire team"]
},
{
"title": "Best Use Case of Redactive AI",
"description": "We are looking for the best AI use case that builds on top of Redactive. We are a developer platform that helps connect permissioned data to AI applications. You don't need to spend time creating connections to external data sources or setup vector databases. Using our API developers can quickly get started making AI applications and be confident that sensitive data isn't leaked using our permissions platform.",
"links": [
{
"title": "API Docs",
"link": "https://dashboard.staging.redactive.ai/api/docs"
}
],
"imagePath": "/images/sponsors/Redactive.png",
"contents": ["$1000 for the entire team"]
}
]
}
Expand Down
6 changes: 5 additions & 1 deletion pages/index.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@

.grid {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-columns: 1fr;
gap: 32px;

@include md {
grid-template-columns: 1fr 1fr;
}
}
}
8 changes: 6 additions & 2 deletions sections/event-info/event-checklist/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@ const EventChecklist = () => {
Find out everything you need to know about the competition here!
</p>
</div>
<ButtonLink type="primary" theme="light" href="#">
TBA
<ButtonLink
type="primary"
theme="light"
href="https://unihack.notion.site/2024-Participants-Handbook-5aced37a11934bbcbe6a5071b4d624f6?pvs=74"
>
Read Now
</ButtonLink>
</li>
<li>
Expand Down
7 changes: 7 additions & 0 deletions sections/homepage/prizes/prizes.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
@import '../../../styles/spacing.scss';

.main-prize,
.sponsor-prize,
.category-prize {
h2 {
font-size: 2rem;
Expand Down Expand Up @@ -47,4 +48,10 @@
border-radius: 5px;
}
}
}

.sponsor-prize .prize-list {
@include md {
grid-template-columns: repeat(2, 1fr);
}
}
9 changes: 7 additions & 2 deletions sections/homepage/prizes/prizes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,17 @@ const Prizes = ({ data: { main, category, sponsor } }: PropTypes) => {
</div>
<JudgingCriteria />
</div>
<div className={styles['category-prize']}>
<h2>Sponsor &amp; Category Prizes</h2>
<div className={styles['sponsor-prize']}>
<h2>Sponsor Prizes</h2>
<div className={styles['prize-list']}>
{sponsor.map((prize) => {
return <Prize key={prize.title} prize={prize} isSponsor={true} />;
})}
</div>
</div>
<div className={styles['category-prize']}>
<h2>Category Prizes</h2>
<div className={styles['prize-list']}>
{category.map((prize) => {
return <Prize key={prize.title} prize={prize} />;
})}
Expand Down

0 comments on commit f6203cc

Please sign in to comment.