Skip to content

Commit

Permalink
Update Page for Start of 2023-2024 School Year (#368)
Browse files Browse the repository at this point in the history
* Add initial active project data

* Add conditional logic for displaying projects or coming soon box

* Do same for Projects page

* Update project card styling (and associated layout edits)

* Update NPO images

* Create new CurrentProjectSection component

* Minort fix to use flex-start

* Update apply page
  • Loading branch information
leeaj8-uci authored Sep 22, 2023
1 parent cdeaaeb commit 047b29c
Show file tree
Hide file tree
Showing 19 changed files with 600 additions and 468 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import React from 'react';
import { motion } from 'framer-motion';
import PropTypes from 'prop-types';
import ProjectCard from '../ProjectCard/ProjectCard';
import projectData from '../../views/our-work/projectsData';
import ctcLogo from '../../../images/logo/white-ctc.svg';
import { animationConfigs, animationStates, transitionConfigs } from '../../views/animationConstants';

import styles from './CurrentProjectSection.module.css';

const CurrentProjectSection = ({
background, title, footer, className,
}) => {
const test = (
<div className="ctc-ourwork-comingsoon-box">
<img className="ctc-ourwork-comingsoon-logo" src={ctcLogo} alt="" />
<p className="ctc-ourwork-comingsoon-p">Check back this Fall to see our upcoming projects!</p>
</div>
);
return (
<section style={{ background }} className={`${styles['current-project-section']} ${className}`}>
<motion.h1
className="ctc-home-3-header"
variants={animationConfigs.transformY('-100%', '-100%')}
transition={transitionConfigs.simple(0.75)}
{...animationStates.whileInView(true)}
>
{title}
</motion.h1>
<div className={styles["ctc-home-3-projects-container"]}>
{(projectData.active.length === 0) ? (
test
)
: projectData.active.map((p) => <ProjectCard key={p.projectName} {...p} />)}
</div>
<div className={styles['current-project-footer']}>
{footer}
</div>
</section>
);
};

CurrentProjectSection.propTypes = {
background: PropTypes.string,
title: PropTypes.string.isRequired,
footer: PropTypes.element,
className: PropTypes.string,
};

CurrentProjectSection.defaultProps = {
background: 'rgba(0,0,0,0)',
footer: null,
className: '',
};

export default CurrentProjectSection;
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
.current-project-section {
height: auto;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-evenly;
}

.ctc-home-3-header {
text-align: center;
color: var(--dark-pink);
font-size: 48px;
padding-top: 40px;
margin-bottom: 50px;
font-weight: 600;
min-height: 5rem;
}

.ctc-home-3-projects-container {
width: 85vw;
height: auto;
display: flex;
justify-content: space-evenly;
align-content: center;
align-items: stretch;
flex-wrap: wrap;
gap: 1rem;
}

.ctc-ourwork-comingsoon-box {
width: 554px;
max-width: 85vw;
height: 131px;
background: var(--dark-purple);
border-radius: 15px;
display: flex;
flex-direction: row;
gap: 20px;
justify-content: center;
align-items: space-between;
padding: 5px 15px;
margin-bottom: 20px;
align-self: center;
}

.ctc-ourwork-comingsoon-p {
width: 400px;
display: flex;
align-items: center;
color: #fff;
font-family: 'Inter';
font-style: normal;
font-weight: 400;
font-size: 24px;
line-height: 29px;
}

.ctc-ourwork-comingsoon-logo {
width: 60px;
height: auto;
}

.current-project-footer {
min-height: 5rem;
}

/* @media screen and (max-width: 1400px) {
.ctc-home-3-projects-container .project-card {
width: calc((100vw - 80px) / 3);
height: 520px;
margin-left: 20px;
margin-right: 20px;
}
}
@media screen and (max-width: 1200px) {
.ctc-home-3-projects-container {
width: 80%;
height: 1200px;
margin-left: 10%;
display: flex;
justify-content: center;
flex-wrap: wrap;
}
.ctc-home-3-projects-container .project-card {
flex: 0 0 80%;
width: calc((100vw - 100px) / 3);
height: 0px !important;
min-height: 380px;
margin-bottom: 40px;
}
.ctc-home-3-projects-container .project-card .project-card-image-div {
height: 180px;
}
}
@media screen and (max-width: 900px) {
.ctc-home-3-bg {
height: 1600px;
}
.ctc-home-3-projects-container {
height: 1270px;
}
.ctc-home-3-projects-container .project-card .description {
font-size: 16px;
line-height: 24px;
}
}
@media screen and (max-width: 850px) {
.ctc-home-3-projects-container {
width: 92%;
height: 1200px;
margin-left: 4%;
display: flex;
justify-content: center;
flex-wrap: wrap;
}
}
@media screen and (max-width: 600px) {
.ctc-home-3-projects-container {
height: 1270px;
}
.ctc-home-3-projects-container .project-card {
min-height: 400px;
}
}
@media screen and (max-width: 500px) {
.ctc-home-3-projects-container .project-card {
min-height: 400px;
}
.ctc-home-3-projects-container .project-card .project-card-text {
padding: 10px 22px;
}
.ctc-home-3-projects-container .project-card .description {
font-size: 14px;
line-height: 22px;
}
} */

94 changes: 35 additions & 59 deletions website/src/app/components/ProjectCard/ProjectCard.css
Original file line number Diff line number Diff line change
@@ -1,20 +1,39 @@
.project-card {
box-shadow: 0px 4px 15px rgba(237, 49, 93, 0.19);
border-radius: 20px;
width: calc((100vw - 350px) / 2);
box-shadow: 0px 5px 10px 0px rgba(0, 0, 0, 0.20);
border-radius: 0.5rem;
min-height: 400px;
position: relative;
background-color: white;
width: calc((100vw - 100px) / 3);
width: max(40ch, 20vw);
max-width: 80vw;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: flex-start;
align-items: stretch;
padding-bottom: 3.0rem;
}

.project-card-text {
font-family: Inter;
max-height: 300px;
padding: 20px 30px;
padding: 1.25rem 1.25rem;
}

.primary-button {
background-color: var(--darkest-purple);
color: white;
border: 0;
border-radius: 0.2rem;
padding: 0.375rem 1.25rem;
text-decoration: none;
}

.project-card-arrow-up-right {
margin-left: 10px;
.project-card .primary-button {
position: absolute;
left: 0;
bottom: 0;
margin: 1.25rem;
}

.project-timeline {
Expand All @@ -25,10 +44,9 @@
.project-name {
display: flex;
align-items: center;

font-style: normal;
font-weight: 600;
font-size: 24px;
font-size: 1.5rem;
line-height: 29px;
color: black;
text-decoration: none;
Expand All @@ -43,27 +61,19 @@
display: flex;
align-items: center;
justify-content: center;
height: 400px;
height: 15rem;
width: 100%;
/* background-image: url(https://static-koimoi.akamaized.net/wp-content/new-galleries/2022/08/the-batman-2-starring-robert-pattison-is-yet-to-be-greenlit-001.jpg); */
background-position: center;
background-size: cover;
background-repeat: no-repeat;
border-top-left-radius: 20px;
border-top-right-radius: 20px;
}

.project-card-image-div a {
height: 100%;
width: 100%;
text-align: center;
display: flex;
border-top-right-radius: 0.5rem;
border-top-left-radius: 0.5rem;
}

.project-card-image {
margin: auto;
width: 100%;
height: 100%;
height: 80%;
width: auto;
}

.upcoming-project-card-image:hover {
Expand All @@ -90,42 +100,8 @@ p:hover > .project-off {
color: var(--dark-pink);
}

@media screen and (max-width: 1450px) {
.project-card-more {
bottom: 0;
}
}

@media screen and (max-width: 900px) {
.project-card {
margin: 15px;
height: 420px !important;
min-width: 0px;
max-width: unset;
flex-basis: unset;
}

.project-name {
font-style: normal;
font-weight: 600;
font-size: 20px;
line-height: 29px;
}

.description {
font-size: 14px;
line-height: 20px;
width: 85%;
}

.project-card-more {
font-size: 16px;
}

@media screen and (max-width: 900px) {
.project-card-image-div {
display: flex;
align-items: center;
height: 220px;
width: 100%;
height: 12.5rem;
}
}
}
Loading

0 comments on commit 047b29c

Please sign in to comment.