Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Link from 'next/link';
import Image from 'next/image';
import { MdHowToVote } from 'react-icons/md';
import button_arrow from 'public/hackers/beginners/button_arrow.svg';

interface TextCardProps {
Expand All @@ -11,6 +12,9 @@ interface TextCardProps {
button_color: string;
text_color: string;
is_external?: boolean;
secondary_button_text?: string;
secondary_button_link?: string;
secondary_is_external?: boolean;
}

export default function TextCard({
Expand All @@ -22,36 +26,55 @@ export default function TextCard({
button_color,
text_color,
is_external = false,
secondary_button_text,
secondary_button_link,
secondary_is_external = false,
}: TextCardProps) {
return (
<div style={{ color: `#${text_color}` }} className="flex flex-col gap-4">
<p>{short_text}</p>
<h2 className="font-semibold">{title}</h2>
<p>{long_text}</p>
<Link
href={button_link}
target={is_external ? '_blank' : '_self'}
rel={is_external ? 'noopener noreferrer' : undefined}
className="mt-8"
>
<button
style={{ backgroundColor: `#${button_color}` }}
className="group flex flex-row items-center justify-center gap-[10px] px-10 py-5 md:px-[50px] md:py-[40px] rounded-[1000px] text-[#003D3D] font-semibold transition-all duration-300 active:brightness-90"
<div className="mt-8 flex flex-wrap items-center gap-4">
<Link
href={button_link}
target={is_external ? '_blank' : '_self'}
rel={is_external ? 'noopener noreferrer' : undefined}
>
{button_text}
<div className="relative flex items-center overflow-hidden w-6 h-6">
<div className="absolute left-0 transition-transform duration-300 ease-in-out -translate-x-2 group-hover:translate-x-0">
<Image
src={button_arrow}
alt="arrow"
className="max-w-none"
width={24}
height={24}
/>
<button
style={{ backgroundColor: `#${button_color}` }}
className="group flex flex-row items-center justify-center gap-[10px] px-10 py-5 md:px-[50px] md:py-[40px] rounded-[1000px] text-[#003D3D] font-semibold transition-all duration-300 active:brightness-90"
>
{button_text}
<div className="relative flex items-center overflow-hidden w-6 h-6">
<div className="absolute left-0 transition-transform duration-300 ease-in-out -translate-x-2 group-hover:translate-x-0">
<Image
src={button_arrow}
alt="arrow"
className="max-w-none"
width={24}
height={24}
/>
</div>
</div>
</div>
</button>
</Link>
</button>
</Link>

{secondary_button_text && secondary_button_link ? (
<Link
href={secondary_button_link}
target={secondary_is_external ? '_blank' : '_self'}
rel={secondary_is_external ? 'noopener noreferrer' : undefined}
aria-label={secondary_button_text}
title={secondary_button_text}
style={{ backgroundColor: `#${button_color}` }}
className="group inline-flex items-center justify-center px-6 py-5 md:px-10 md:py-[40px] rounded-full text-[#003D3D] transition-all duration-300 hover:brightness-95 active:brightness-90"
>
<MdHowToVote className="h-6 w-6 md:h-8 md:w-8" aria-hidden="true" />
<span className="sr-only">{secondary_button_text}</span>
</Link>
) : null}
</div>
</div>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ export default function HackerChoiceAward() {
title="Hackers Choice Awards"
long_text="While you wait, put in your choice for your favorite hack! You are allowed 1 vote, and you cannot vote for your own team. "
button_text="VIEW PROJECTS"
button_link=""
button_link="https://hackdavis-2026.devpost.com/project-gallery"
is_external={true}
secondary_button_text="SUBMIT YOUR VOTE"
secondary_button_link="https://forms.gle/ubHnU9hv69GDZQfd8"
secondary_is_external={true}
button_color="D1F76E"
text_color="1A3819"
/>
Expand Down
10 changes: 7 additions & 3 deletions app/(pages)/(hackers)/_components/HomeJudging/HeroWaiting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ function WaitingCard({
linkLabel,
href,
}: WaitingCardProps) {
const isExternalLink = Boolean(href && /^(https?:)?\/\//.test(href));

const handleLinkClick = (event: MouseEvent<HTMLAnchorElement>) => {
if (!href?.startsWith('#')) {
return;
Expand Down Expand Up @@ -57,12 +59,14 @@ function WaitingCard({
{linkLabel && href ? (
<Link
href={href}
target={isExternalLink ? '_blank' : undefined}
rel={isExternalLink ? 'noopener noreferrer' : undefined}
onClick={handleLinkClick}
className="mt-auto mb-[1vw] inline-flex items-center gap-2 pt-7 font-dm-mono text-[1rem] text-[#3F3F3F] underline decoration-[1px] underline-offset-4 md:text-[1.125rem]"
>
<Image
src={arrowRight}
alt=""
alt="right arrow icon"
aria-hidden="true"
className="h-4 w-4"
/>
Expand All @@ -80,7 +84,7 @@ const waitingCards: WaitingCardProps[] = [
imageAlt: 'Practice your pitch',
title: 'Practice your pitch',
description:
'Your pitch is more important than you think! These 5 minutes determine how much your work in the last 24 hours are worth.',
'Your pitch is more important than you think! These 6 minutes determine how much your work in the last 24 hours are worth.',
},
{
imageSrc: hackersChoiceAsset,
Expand All @@ -89,7 +93,7 @@ const waitingCards: WaitingCardProps[] = [
description:
'While you wait, put in your choice for your favorite hack! You are allowed 1 vote, and you cannot vote for your own team. ',
linkLabel: 'HACKERS CHOICE AWARD',
href: '#hackers-choice-awards',
href: 'https://forms.gle/ubHnU9hv69GDZQfd8',
},
{
imageSrc: judgingAsset,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export default function DoneJudgingModal({ onClose }: DoneJudgingModalProps) {
2026. Please wait until <b>Closing Ceremony</b> for judging results!
In the meantime, put in your vote for{' '}
<a
href=""
href="https://forms.gle/ubHnU9hv69GDZQfd8"
target="_blank"
rel="noopener noreferrer"
className="underline font-bold"
Expand Down
Loading