-
Notifications
You must be signed in to change notification settings - Fork 8
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
update #251
Merged
Merged
update #251
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,87 @@ | ||
const HistorySection = () => ( | ||
<section className="mb-8"> | ||
<div className="max-w-5xl"> | ||
<p className="mb-4 text-lg text-gray-800"> | ||
<span className="font-semibold">Since being founded during the summer of 2010,</span> the University of Florida chapter has had an abundant | ||
effort put forth for the development of our members. | ||
</p> | ||
<p className="mb-4 text-lg text-gray-800"> | ||
This development is centered on <span className="font-semibold">five core values</span> of our mission statement:{" "} | ||
<span className="font-semibold">leadership, professionalism, service, academics,</span> and <span className="font-semibold">diversity.</span>{" "} | ||
Our meetings and events are catered to ensure that not only our mission is being fulfilled, but also that a community of support among Asian | ||
heritage students is being built. We pride ourselves on our measurable successes but could not have done so without the help of our members, | ||
faculty, and sponsors. | ||
</p> | ||
<p className="mb-4 text-lg text-gray-800"> | ||
Through <span className="font-semibold">events</span> we have hosted in the past, such as our annual Quick Race or the Southeast Regional | ||
Conferences of 2014-2016, many of our members have been able to get involved in committees and take on leadership roles. Many of our other | ||
events allow students to <span className="font-semibold">develop professional skills</span> that are essential for positions in industry. | ||
</p> | ||
<p className="mb-4 text-lg text-gray-800"> | ||
Our SASE chapter is not only active on campus, but also within the <span className="font-semibold">Gainesville community</span>, such as when | ||
we participated in a 5K raising money for a local robotics team. We are also heavily involved in the{" "} | ||
<span className="font-semibold">Asian American Student Union</span> at the University of Florida, taking part in their annual welcome assembly | ||
and hosting events with cultural and professional sub-organizations. | ||
</p> | ||
</div> | ||
<div className="mt-2 text-center"> | ||
<a | ||
href="2024-2025-SASE-Constitution.docx.pdf" | ||
className="mt-6 inline-block transform rounded-full bg-[#0f6cb6] px-6 py-2 text-white transition duration-300 hover:scale-105" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
2024-2025 SASE Constitution | ||
</a> | ||
</div> | ||
</section> | ||
); | ||
import useIsMobile from "@hooks/useIsMobile"; | ||
import { useState } from "react"; | ||
import { FaChevronDown, FaChevronUp } from "react-icons/fa6"; | ||
|
||
const HistorySection = () => { | ||
const [isExpanded, setIsExpanded] = useState(false); | ||
const isMobile = useIsMobile(); | ||
|
||
return ( | ||
<section className="mb-8"> | ||
<div className={isMobile ? "max-w-full px-4" : "max-w-5xl"}> | ||
<p className={isMobile ? "mb-3 text-sm text-gray-800" : "mb-4 text-lg text-gray-800"}> | ||
<strong>Since being founded during the summer of 2010,</strong> the University of Florida chapter has had an abundant effort put forth for | ||
the development of our members. | ||
</p> | ||
<p className={isMobile ? "mb-3 text-sm text-gray-800" : "mb-4 text-lg text-gray-800"}> | ||
This development is centered on <strong>five core values</strong> of our mission statement:{" "} | ||
<strong>leadership, professionalism, service, academics,</strong> and <strong>diversity.</strong> Our meetings and events are catered to | ||
ensure that not only our mission is being fulfilled, but also that a community of support among Asian heritage students is being built. We | ||
pride ourselves on our measurable successes but could not have done so without the help of our members, faculty, and sponsors. | ||
</p> | ||
|
||
{/* Full description always shown on desktop */} | ||
{!isMobile && ( | ||
<> | ||
<p className="mb-4 text-lg text-gray-800"> | ||
Through <strong>events</strong> we have hosted in the past, such as our annual Quick Race or the Southeast Regional Conferences of | ||
2014-2016, many of our members have been able to get involved in committees and take on leadership roles. Many of our other events allow | ||
students to <strong>develop professional skills</strong> that are essential for positions in industry. | ||
</p> | ||
<p className="mb-4 text-lg text-gray-800"> | ||
Our SASE chapter is not only active on campus, but also within the <strong>Gainesville community</strong>, such as when we participated | ||
in a 5K raising money for a local robotics team. We are also heavily involved in the <strong>Asian American Student Union</strong> at | ||
the University of Florida, taking part in their annual welcome assembly and hosting events with cultural and professional | ||
sub-organizations. | ||
</p> | ||
</> | ||
)} | ||
|
||
{/* Read More Toggle (Only on Mobile) */} | ||
{isMobile && !isExpanded && ( | ||
<div className="flex w-fit cursor-pointer items-center text-blue-600 hover:underline" onClick={() => setIsExpanded(true)}> | ||
<span>Read more</span> | ||
<FaChevronDown className="ml-1 h-4 w-4" /> | ||
</div> | ||
)} | ||
|
||
{/* Expandable Content (Only on Mobile) */} | ||
{isMobile && ( | ||
<div className={`transition-all duration-300 ${isExpanded ? "max-h-[1000px] opacity-100" : "max-h-0 overflow-hidden opacity-0"}`}> | ||
<p className="mb-3 text-sm text-gray-800"> | ||
Through <strong>events</strong> we have hosted in the past, such as our annual Quick Race or the Southeast Regional Conferences of | ||
2014-2016, many of our members have been able to get involved in committees and take on leadership roles. Many of our other events allow | ||
students to <strong>develop professional skills</strong> that are essential for positions in industry. | ||
</p> | ||
<p className="mb-3 text-sm text-gray-800"> | ||
Our SASE chapter is not only active on campus, but also within the <strong>Gainesville community</strong>, such as when we participated | ||
in a 5K raising money for a local robotics team. We are also heavily involved in the <strong>Asian American Student Union</strong> at | ||
the University of Florida, taking part in their annual welcome assembly and hosting events with cultural and professional | ||
sub-organizations. | ||
</p> | ||
|
||
{/* Read Less Link (Only on Mobile) */} | ||
<div className="flex w-fit cursor-pointer items-center text-blue-600 hover:underline" onClick={() => setIsExpanded(false)}> | ||
<span>Read less</span> | ||
<FaChevronUp className="ml-1 h-4 w-4" /> | ||
</div> | ||
</div> | ||
)} | ||
</div> | ||
|
||
{/* Constitution Link */} | ||
<div className="mt-4 text-center"> | ||
<a | ||
href="2024-2025-SASE-Constitution.docx.pdf" | ||
className="mt-6 inline-block transform rounded-full bg-[#0f6cb6] px-6 py-2 text-white transition duration-300 hover:scale-105" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
2024-2025 SASE Constitution | ||
</a> | ||
</div> | ||
</section> | ||
); | ||
}; | ||
|
||
export default HistorySection; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,53 @@ | ||
import { imageUrls } from "@/client/assets/imageUrls"; | ||
import { cn } from "@/shared/utils"; | ||
import { useEffect, useState } from "react"; | ||
import MissionCard from "./MissionCard"; | ||
import MissionSectionMobile from "./MissionSectionMobile"; | ||
|
||
const MissionSection = () => ( | ||
<section className="mb-12"> | ||
<div className="mb-4 flex items-center"> | ||
<div className="mr-3 h-12 w-1.5 rounded-sm bg-saseGreen"></div> | ||
<h2 className="font-oswald text-3xl font-semibold text-gray-800">Mission Statement</h2> | ||
</div> | ||
const MissionSection: React.FC = () => { | ||
const [isMobile, setIsMobile] = useState<boolean>(false); | ||
|
||
<p className="mb-8 text-center text-xl text-black">To create a welcoming community where members:</p> | ||
<div className="flex flex-nowrap justify-center gap-20"> | ||
<MissionCard | ||
title="Professional Development" | ||
logo={imageUrls["Suitcase.png"]} | ||
text="To prepare Asian heritage students for success in the global business world." | ||
shadowColor="green" | ||
/> | ||
<MissionCard | ||
title="Diversity" | ||
logo={imageUrls["People.png"]} | ||
text="To promote diversity and tolerance on campuses and in the workplace." | ||
shadowColor="blue" | ||
/> | ||
<MissionCard | ||
title="Community" | ||
logo={imageUrls["Lightbulb.png"]} | ||
text="To provide opportunities for our members to contribute to their local communities." | ||
shadowColor="green" | ||
/> | ||
</div> | ||
</section> | ||
); | ||
useEffect(() => { | ||
const handleResize = () => setIsMobile(window.innerWidth < 1024); | ||
handleResize(); | ||
window.addEventListener("resize", handleResize); | ||
return () => window.removeEventListener("resize", handleResize); | ||
}, []); | ||
|
||
return isMobile ? ( | ||
<MissionSectionMobile /> | ||
) : ( | ||
<section className={cn("mx-auto mb-12 w-full max-w-7xl px-4 sm:px-0")}> | ||
<div className={cn("mb-4 flex w-full items-center")}> | ||
<div className={cn("mr-3 h-12 w-1.5 rounded-sm bg-saseGreen")}></div> | ||
<h2 className={cn("font-oswald text-3xl font-semibold text-gray-800")}>Mission Statement</h2> | ||
</div> | ||
|
||
<p className={cn("mb-8 text-center text-xl text-black")}>To create a welcoming community where members:</p> | ||
|
||
{/* Desktop Layout */} | ||
<div className={cn("flex flex-nowrap justify-center gap-20")}> | ||
<MissionCard | ||
title="Professional Development" | ||
logo={imageUrls["Suitcase.png"]} | ||
text="To prepare Asian heritage students for success in the global business world." | ||
shadowColor="green" | ||
/> | ||
<MissionCard | ||
title="Diversity" | ||
logo={imageUrls["People.png"]} | ||
text="To promote diversity and tolerance on campuses and in the workplace." | ||
shadowColor="blue" | ||
/> | ||
<MissionCard | ||
title="Community" | ||
logo={imageUrls["Lightbulb.png"]} | ||
text="To provide opportunities for our members to contribute to their local communities." | ||
shadowColor="green" | ||
/> | ||
</div> | ||
</section> | ||
); | ||
}; | ||
|
||
export default MissionSection; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
import { imageUrls } from "@/client/assets/imageUrls"; | ||
import { cn } from "@/shared/utils"; | ||
|
||
const MissionSectionMobile: React.FC = () => ( | ||
<section className={cn("mx-auto mb-12 w-full max-w-7xl sm:px-0")}> | ||
<div className={cn("mb-10 flex w-full max-w-7xl items-center sm:justify-start")}> | ||
<div className={cn("mr-3 h-12 w-1.5 rounded-sm bg-saseGreen")}></div> | ||
<h2 className={cn("font-oswald text-3xl font-semibold text-gray-800")}>Mission Statement</h2> | ||
</div> | ||
|
||
<p className={cn("mb-6 flex text-lg text-black")}>To create a welcoming community where members:</p> | ||
|
||
{/* Mobile-Specific Stacked Cards */} | ||
<div className={cn("flex flex-col items-center gap-6")}> | ||
{/* Professional Development */} | ||
<div className={cn("relative w-full max-w-md rounded-lg bg-gray-200 p-5 shadow-lg")}> | ||
{/* Icon */} | ||
<div className={cn("absolute -top-3 right-5 h-12 w-12")}> | ||
<img src={imageUrls["Suitcase.png"]} alt="Suitcase Icon" className={cn("w-full")} /> | ||
</div> | ||
<h3 className={cn("text-lg font-bold text-black")}>Professional Development:</h3> | ||
<p className={cn("text-black")}>To prepare Asian heritage students for success in the global business world.</p> | ||
{/* Edges */} | ||
<div className={cn("absolute -left-2 -top-2 h-7 w-7 border-l-2 border-t-2 border-green-500")}></div> | ||
<div className={cn("absolute -right-2 bottom-[-8px] h-7 w-7 border-b-2 border-r-2 border-green-500")}></div> | ||
</div> | ||
|
||
{/* Diversity */} | ||
<div className={cn("relative w-full max-w-md rounded-lg bg-gray-200 p-5 shadow-lg")}> | ||
<div className={cn("absolute -top-3 left-5 h-12 w-12")}> | ||
<img src={imageUrls["People.png"]} alt="Diversity Icon" className={cn("w-full")} /> | ||
</div> | ||
<h3 className={cn("text-right text-lg font-bold text-black")}>Diversity:</h3> | ||
<p className={cn("text-black")}>To promote diversity and tolerance on campuses and in the workplace.</p> | ||
<div className={cn("absolute -right-2 -top-2 h-7 w-7 border-r-2 border-t-2 border-blue-500")}></div> | ||
<div className={cn("absolute -left-2 bottom-[-8px] h-7 w-7 border-b-2 border-l-2 border-blue-500")}></div> | ||
</div> | ||
|
||
{/* Community */} | ||
<div className={cn("relative w-full max-w-md rounded-lg bg-gray-200 p-5 shadow-lg")}> | ||
<div className={cn("absolute -top-3 right-5 h-12 w-12")}> | ||
<img src={imageUrls["Lightbulb.png"]} alt="Community Icon" className={cn("w-full")} /> | ||
</div> | ||
<h3 className={cn("text-lg font-bold text-black")}>Community:</h3> | ||
<p className={cn("text-black")}>To provide opportunities for our members to contribute to their local communities.</p> | ||
<div className={cn("absolute -left-2 -top-2 h-7 w-7 border-l-2 border-t-2 border-green-500")}></div> | ||
<div className={cn("absolute -right-2 bottom-[-8px] h-7 w-7 border-b-2 border-r-2 border-green-500")}></div> | ||
</div> | ||
</div> | ||
</section> | ||
); | ||
|
||
export default MissionSectionMobile; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { useEffect, useState } from "react"; | ||
|
||
const SCREEN_BREAKPOINT = 1024; | ||
|
||
const useIsMobile = (breakpoint: number = SCREEN_BREAKPOINT) => { | ||
const [isMobile, setIsMobile] = useState(() => window.innerWidth < breakpoint); | ||
|
||
useEffect(() => { | ||
const handleResize = () => { | ||
setIsMobile(window.innerWidth < breakpoint); | ||
}; | ||
|
||
window.addEventListener("resize", handleResize); | ||
return () => { | ||
window.removeEventListener("resize", handleResize); | ||
}; | ||
}, [breakpoint]); | ||
|
||
return isMobile; | ||
}; | ||
|
||
export default useIsMobile; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be in a hook to not redeclare for every file (check if one already exists)