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

[Giving Day] New Heros #874

Merged
merged 17 commits into from
Mar 5, 2025
35 changes: 35 additions & 0 deletions new-dti-website/components/hero.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import SectionWrapper from './hoc/SectionWrapper';

type HeroProps = {
title: string;
description: string;
image: {
src: string;
alt: string;
};
action?: {
buttonText: string;
link: string;
};
};

const Hero = ({ title, description, image, action }: HeroProps) => (
<SectionWrapper id={`${title} hero`}>
<img src={image.src} alt={image.alt} height={600} className="w-[100%] rounded-[16px]" />
<div className="flex flex-col gap-4">
<div className="flex flex-col gap-2">
<h1 className="md:text-[40px] md:leading-[46px] font-bold mt-4 xs:text-[32px] xs:leading-[36.8px] text-[#ffffff]">
{title}
</h1>
<p className="md:text-[18px] text-hero-secondary leading-[28.8px]">{description}</p>
</div>
{action && (
<a className="primary-button" href={action.link}>
{action.buttonText}
</a>
)}
</div>
</SectionWrapper>
);

export default Hero;
Binary file added new-dti-website/public/images/about-hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added new-dti-website/public/images/apply-hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added new-dti-website/public/images/course-hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added new-dti-website/public/images/sponsor-hero.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 18 additions & 40 deletions new-dti-website/src/app/apply/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,57 +8,35 @@
import SectionWrapper from '../../../components/hoc/SectionWrapper';
import { isAppOpen } from '../../utils/dateUtils';
import useTitle from '../../hooks/useTitle';
import Hero from '@/components/hero';

Check failure on line 11 in new-dti-website/src/app/apply/page.tsx

View workflow job for this annotation

GitHub Actions / check

Missing file extension for "@/components/hero"

Check failure on line 11 in new-dti-website/src/app/apply/page.tsx

View workflow job for this annotation

GitHub Actions / check

Unable to resolve path to module '@/components/hero'

const ApplyHero = () => {
const isApplicationOpen = isAppOpen();

return (
<section
id="Apply Hero"
className="text-[#FEFEFE] min-h-[calc(100vh-136px)] flex items-center relative"
>
<section id="Apply Hero" className="text-[#FEFEFE] flex items-center relative">
{!isApplicationOpen && (
<Banner
message={`We're no longer accepting applications for ${config.semester}. Stay tuned for opportunities next semester!`}
variant={'accent'}
/>
)}
<SectionWrapper id={'Apply Page Hero Section'} className="translate-y-8">
<div className="flex lg:flex-row xs:flex-col gap-x-[60px]">
<h1 className="flex items-center md:text-header md:leading-header xs:text-[48px] xs:leading-header-xs font-semibold">
<div>
JOIN OUR <span className="text-[#FF4C4C]">COMMUNITY</span>
</div>
</h1>
<div className="flex flex-col gap-6">
<h2
className="font-bold md:text-subheader xs:text-[24px] md:leading-subheader
xs:leading-[29px] text-hero-primary"
>
Down to innovate?
</h2>
<p className="md:text-lg xs:text-sm text-hero-secondary md:leading-body-text">
We strive for inclusivity, and encourage passionate applicants to apply regardless of
experience. We'd love to work with someone like you.
</p>
{isApplicationOpen ? (
<a key="Apply Page" href={config.applicationLink} className="primary-button">
Apply now
</a>
) : (
<button
key="Apply Page"
className="primary-button opacity-50 cursor-not-allowed"
onClick={(e) => e.preventDefault()}
aria-disabled="true"
>
Apply now
</button>
)}
</div>
</div>
</SectionWrapper>
<div className="relative"></div>
<div className="flex items-center pt-12 w-[100%]">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

padding changes to accomodate for banner

<Hero
title={'Join our community'}
description={
"We strive for inclusivity, and encourage passionate applicants to apply regardless of experience. We'd love to work with someone like you."
}
image={{
src: '/images/apply-hero.png',
alt: 'DTI members hosting a recruitment event with prospective applicants'
}}
action={{
buttonText: 'Apply now',
link: config.applicationLink
}}
/>
</div>
</section>
);
};
Expand Down
44 changes: 13 additions & 31 deletions new-dti-website/src/app/course/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import { TestimonialCardProps } from '../../../components/course/TestimonialCard';
import SectionWrapper from '../../../components/hoc/SectionWrapper';
import useTitle from '../../hooks/useTitle';
import Hero from '@/components/hero';

Check failure on line 26 in new-dti-website/src/app/course/page.tsx

View workflow job for this annotation

GitHub Actions / check

Missing file extension for "@/components/hero"

Check failure on line 26 in new-dti-website/src/app/course/page.tsx

View workflow job for this annotation

GitHub Actions / check

Unable to resolve path to module '@/components/hero'

//* DATA
const { key_experiences } = experiencesData;
Expand Down Expand Up @@ -61,37 +62,18 @@
setSelectedMember(undefined);
}}
>
{/* Hero Section */}
<section id="Hero Section">
<div
className="bg-black text-white md:my-[100px] xs:my-9 min-h-[calc(100vh-300px)]
flex items-center w-full overflow-hidden"
>
<SectionWrapper id={'Product Page Hero Section'}>
<div className="flex justify-around gap-y-10 md:gap-x-20 lg:flex-row flex-col relative z-10 md:gap-y-20">
<div className="flex flex-col gap-y-8 md:gap-y-0">
<div>
<h1 className="font-semibold md:text-header xs:text-[52px] md:leading-header xs:leading-header-xs whitespace-pre">
OUR <br />
<span className="text-[#FF4C4C]">COURSE</span>
</h1>
</div>
</div>

<div className="flex flex-col justify-center gap-6 ">
<h2 className="font-bold md:text-subheader xs:text-2xl text-hero-primary md:leading-subheader">
Teaching the community
</h2>
<p className="md:text-lg xs:text-sm text-hero-secondary md:leading-body-text">
A project team is meant, above all, to be a learning experience. Given our
mission of community impact, we want to help everyone learn and grow through our
training course in product development.
</p>
</div>
</div>
</SectionWrapper>
</div>
</section>
<div className="lg:pb-24 pb-12">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need some extra padding (tho less on mobile)

<Hero
title={'Our course'}
description={
'A project team is meant, above all, to be a learning experience. Given our mission of community impact, we want to help everyone learn and grow through our training course in product development.'
}
image={{
src: '/images/course-hero.png',
alt: 'DTI member presenting a course to an auditorium'
}}
/>
</div>

{/* WRAPPER */}
<div
Expand Down
47 changes: 13 additions & 34 deletions new-dti-website/src/app/initiatives/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,24 @@
import InitiativeDisplay from '../../../components/initiatives/InitiativeDisplay';
import SectionWrapper from '../../../components/hoc/SectionWrapper';
import useTitle from '../../hooks/useTitle';

const InitiativeHero = () => (
<section
id="initiative-hero"
className="bg-black text-[#FEFEFE] min-h-[calc(100vh-100px)] h-full flex items-center
relative overflow-hidden"
>
<SectionWrapper id={'Initiatives Pages Hero Section'}>
<div className="flex lg:flex-row xs:flex-col gap-x-[60px] relative z-10 md:items-center">
<h1
className="flex items-center md:text-header md:leading-header xs:leading-header-xs
xs:text-[48px] font-semibold"
>
<div>
INSPIRING <span className="text-[#FF4C4C]">INNOVATION</span>
</div>
</h1>
<div className="flex flex-col gap-6">
<h2
className="font-bold md:text-subheader xs:text-[24px] md:leading-subheader
xs:leading-[29px] text-hero-primary"
>
Making impact
</h2>
<p className="md:text-lg xs:text-sm text-hero-secondary md:leading-body-text">
What sets us apart from other project teams is our desire to share our discoveries with
other students and members of the greater Ithaca community.
</p>
</div>
</div>
</SectionWrapper>
</section>
);
import Hero from '@/components/hero';

Check failure on line 6 in new-dti-website/src/app/initiatives/page.tsx

View workflow job for this annotation

GitHub Actions / check

Missing file extension for "@/components/hero"

Check failure on line 6 in new-dti-website/src/app/initiatives/page.tsx

View workflow job for this annotation

GitHub Actions / check

Unable to resolve path to module '@/components/hero'

const InitiativePage = () => {
useTitle('Initiatives');
return (
<div className="bg-white flex flex-col">
<InitiativeHero />
<div className="lg:pb-24 pb-12 bg-[#000000]">
Copy link
Collaborator

@Bookie0 Bookie0 Mar 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same thing as here, plus need to make the hero section black (rest of page is white)

<Hero
title={'Inspiring innovation'}
description={
'What sets us apart from other project teams is our desire to share our discoveries with other students and members of the greater Ithaca community.'
}
image={{
src: '/images/initiatives-hero.png',
alt: 'DTI member engaging in a workshop with a child'
}}
/>
</div>
<SectionWrapper id={'Initiatives Display'}>
<InitiativeDisplay />
</SectionWrapper>
Expand Down
31 changes: 12 additions & 19 deletions new-dti-website/src/app/products/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
import ImageCarousel from '../../../components/products/imageCarousel';
import Connector from '../../../components/products/lines';
import products from '../../../components/products/products.json';
import SectionWrapper from '../../../components/hoc/SectionWrapper';

Check failure on line 8 in new-dti-website/src/app/products/page.tsx

View workflow job for this annotation

GitHub Actions / check

'SectionWrapper' is defined but never used
import useTitle from '../../hooks/useTitle';
import Hero from '@/components/hero';

Check failure on line 10 in new-dti-website/src/app/products/page.tsx

View workflow job for this annotation

GitHub Actions / check

Missing file extension for "@/components/hero"

Check failure on line 10 in new-dti-website/src/app/products/page.tsx

View workflow job for this annotation

GitHub Actions / check

Unable to resolve path to module '@/components/hero'

export default function Page() {
const productIcons = [...products.current, ...products.upcoming].map((product) => ({
Expand All @@ -17,25 +18,17 @@
useTitle('Products');

return (
<div className="overflow-x-hidden md:pt-[100px] xs:pt-9">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed padding as no longer needed

<SectionWrapper id={'Products Page Hero Section'} className="mb-20 lg:mb-20">
<div className="flex lg:flex-row xs:flex-col relative z-10">
<div className="mr-24">
<h1 className="font-semibold text-white md:text-header xs:text-[52px] md:leading-header xs:leading-header-xs">
OUR <span className="text-[#FF4C4C]">PRODUCTS</span>
</h1>
</div>
<div className="flex flex-col justify-center gap-6">
<h2 className="font-bold md:text-subheader xs:text-2xl text-hero-primary md:leading-subheader">
Real impact
</h2>
<p className="md:text-lg xs:text-sm text-hero-secondary md:leading-body-text">
Each of our projects address an unfulfilled need that exists in our community using
human-centered design and software engineering.
</p>
</div>
</div>
</SectionWrapper>
<div className="overflow-x-hidden">
<Hero
title={'Our products'}
description={
'Each of our projects address an unfulfilled need that exists in our community using human-centered design and software engineering.'
}
image={{
src: '/images/products-hero.png',
alt: 'DTI students brainstorming with sticky notes'
}}
/>

<ImageCarousel items={productIcons} />

Expand Down
45 changes: 16 additions & 29 deletions new-dti-website/src/app/sponsor/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,40 +8,27 @@
import SectionWrapper from '../../../components/hoc/SectionWrapper';
import config from '../../../config.json';
import useTitle from '../../hooks/useTitle';
import Hero from '@/components/hero';

Check failure on line 11 in new-dti-website/src/app/sponsor/page.tsx

View workflow job for this annotation

GitHub Actions / check

Missing file extension for "@/components/hero"

const { impacts } = impactData;
const { companies } = companyData;

const SponsorHero = () => (
<div
className="bg-black text-white md:my-[100px] xs:my-9 min-h-[calc(100vh-300px)]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also removed weird calc height stuff

flex items-center w-full overflow-hidden"
>
<SectionWrapper id={'Sponsors Page Hero Section'}>
<div className="flex lg:flex-row xs:flex-col gap-y-9 gap-x-24 relative z-10">
<div className="flex items-center">
<h1
className="font-semibold md:text-header xs:text-[52px] md:leading-header
xs:leading-header-xs whitespace-pre"
>
SUPPORT <br />
<span className="text-[#FF4C4C]">OUR TEAM</span>
</h1>
</div>
<div className="flex flex-col justify-center gap-6">
<h2 className="font-bold md:text-subheader xs:text-2xl text-hero-primary md:leading-subheader">
Let's collaborate
</h2>
<p className="md:text-lg xs:text-sm text-hero-secondary md:leading-body-text">
The generous contributions of our supporters and sponsors allow our team to continue
building products and hosting initiatives to help the Cornell and Ithaca communities.
</p>
<a href={config.donationLink} className="primary-button">
Donate now
</a>
</div>
</div>
</SectionWrapper>
<div className="bg-black text-white lg:pb-24 pb-12 items-center w-full overflow-hidden">
<Hero
title={'Support our team'}
description={
'The generous contributions of our supporters and sponsors allow our team to continue building products and hosting initiatives to help the Cornell and Ithaca communities.'
}
image={{
src: '/images/sponsor-hero.png',
alt: 'DTI members collaborating together'
}}
action={{
buttonText: 'Donate now',
link: config.donationLink
}}
/>
</div>
);

Expand Down
13 changes: 11 additions & 2 deletions new-dti-website/src/app/team/page.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
'use client';

import TeamHero from '../../../components/team/TeamHero';
import TeamAbout from '../../../components/team/TeamAbout';
import MemberDisplay from '../../../components/team/MemberDisplay';
import TeamFooter from '../../../components/team/TeamFooter';
import useTitle from '../../hooks/useTitle';
import Hero from '../../../components/hero';

const TeamPage = () => {
useTitle('Team');
return (
<>
<TeamHero />
<Hero
title={'Working together'}
description={
'We are Cornell DTI. But individually, we are a talented, diverse group of students from different colleges and countries striving to make a difference in the Cornell community and beyond.'
}
image={{
src: '/images/about-hero.png',
alt: 'DTI students posing in front of Gates Hall'
}}
/>
<TeamAbout />
<MemberDisplay />
<TeamFooter />
Expand Down
Loading