diff --git a/public/index.html b/public/index.html index aa069f2..6953fab 100644 --- a/public/index.html +++ b/public/index.html @@ -1,21 +1,30 @@ - - - - - - - - - - - React App - - - -
- - + diff --git a/public/logo.ico b/public/logo.ico new file mode 100644 index 0000000..5e18918 Binary files /dev/null and b/public/logo.ico differ diff --git a/src/BecomeASponsor/BecomeASponsor.css b/src/BecomeASponsor/BecomeASponsor.css deleted file mode 100644 index 1bb253a..0000000 --- a/src/BecomeASponsor/BecomeASponsor.css +++ /dev/null @@ -1,3 +0,0 @@ -#BecomeASponsor div { - background-color: green; -} diff --git a/src/BecomeASponsor/BecomeASponsor.js b/src/BecomeASponsor/BecomeASponsor.js deleted file mode 100644 index 38c70f0..0000000 --- a/src/BecomeASponsor/BecomeASponsor.js +++ /dev/null @@ -1,55 +0,0 @@ -import "./BecomeASponsor.css"; - -/** - * @param {null} null - requires onthing - * @returns {JSX.Element} JSX - HTML tags and JS functionality - * @description Our Sponsors Page - * @author Brock - * @todo Make and Finish the Page - */ -const BecomeASponsor = () => { - return ( -
-
-

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent sed - justo eget orci sagittis sollicitudin eu eget augue. Phasellus lacus - turpis, interdum vitae nibh a, tristique ultricies erat. Integer et - sapien congue, facilisis massa id, molestie magna. Maecenas augue - nisi, ullamcorper sit amet suscipit non, sodales nec tortor. Aenean - imperdiet sit amet velit a lacinia. Vestibulum vel consequat mauris. - Proin suscipit lectus id erat malesuada fermentum. Quisque ac dui - malesuada, accumsan magna quis, convallis ex. Nulla feugiat fermentum - maximus. Pellentesque rutrum malesuada metus ut accumsan. Nullam - semper, eros in tempor mollis, lorem magna auctor turpis, a ornare - diam metus sit amet odio. Sed aliquam nulla eu dolor commodo - efficitur. -

- Student Driving the Green (2019 Car) -
-
- Sponsorship Package with Benefits -

- Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus - laoreet nulla eget posuere suscipit. Curabitur vitae porta velit. Nunc - blandit ut erat sed maximus. Orci varius natoque penatibus et magnis - dis parturient montes, nascetur ridiculus mus. Donec at laoreet nisi. - Ut tempor nunc tellus, quis mollis sapien ultricies ut. Fusce gravida - varius ligula, venenatis fringilla velit fringilla quis. Sed - condimentum sapien libero, vel pharetra purus ultricies nec. Etiam a - vulputate tellus. Quisque eget purus in orci accumsan tincidunt ac ut - nisl. Pellentesque tincidunt porta purus, quis congue nibh tempus - eget. Sed diam sapien, dictum ut mattis sit amet, faucibus at enim.{" "} -

-
-
- ); -}; - -export default BecomeASponsor; diff --git a/src/Footer/Ender.css b/src/Footer/Ender.css new file mode 100644 index 0000000..90b6db3 --- /dev/null +++ b/src/Footer/Ender.css @@ -0,0 +1,33 @@ +#ender { + display: flex; + flex-direction: column; + padding-top: 10px; + padding-bottom: 10px; + justify-content: center; + background-color: lightgrey; +} + +#pointerCursor { + cursor: pointer; +} + +#ender div { + display: flex; + flex-direction: row; + justify-content: center; +} +#ender p { + padding-left: 2%; +} + +#ender .hidden { + display: flex; + flex-direction: row; + justify-content: center; + display: none; +} + +#ender .hidden li { + list-style-type: none; + padding-right: 2%; +} diff --git a/src/Footer/Ender.js b/src/Footer/Ender.js new file mode 100644 index 0000000..e0a9cc8 --- /dev/null +++ b/src/Footer/Ender.js @@ -0,0 +1,28 @@ +import "./Ender.css"; +/** + * @param {null} null - requires onthing + * @returns {JSX.Element} Page - HTML tags and JS functionality + * @description The Footer of the page + * @author Brock + * @todo add who helped developed the site and finalize css + */ +const Ender = () => { + return ( +
+
+

© 2023 by Schulich Off-Road

+

window.open("https://www.morphgenix.com/", "_blank")} + id="pointerCursor"> + Partnered with Morphgenix +

+
+
    +
  • Developed by:
  • +
  • Brock
  • +
+
+ ); +}; + +export default Ender; diff --git a/src/Header/Header.css b/src/Header/Header.css index 73d24ef..6076cf4 100644 --- a/src/Header/Header.css +++ b/src/Header/Header.css @@ -16,6 +16,10 @@ figure { height: 10%; } +header figure { + cursor: pointer; +} + #logo { height: 5rem; background-color: white; diff --git a/src/Header/Header.js b/src/Header/Header.js index c0bf2df..7cd8094 100644 --- a/src/Header/Header.js +++ b/src/Header/Header.js @@ -1,7 +1,8 @@ -import logo from "./logo.png"; +import logo from "./logo.webp"; import lightDark from "./light-dark.webp"; -import { Outlet, Link } from "react-router-dom"; +import { Outlet, Link, Outlet } from "react-router-dom"; import "./Header.css"; +import Ender from "../Footer/Ender"; /** * @param {null} null - Takes in nothing @@ -113,6 +114,7 @@ const Header = () => { + ); }; diff --git a/src/Header/OpenPageButton.css b/src/Header/OpenPageButton.css index 342874f..c3f72bf 100644 --- a/src/Header/OpenPageButton.css +++ b/src/Header/OpenPageButton.css @@ -1,3 +1,4 @@ #navigateButton { text-decoration: none; + cursor: pointer; } diff --git a/src/Header/logo.webp b/src/Header/logo.webp new file mode 100644 index 0000000..485ba2a Binary files /dev/null and b/src/Header/logo.webp differ diff --git a/src/MockDB/SubTeams.yml b/src/MockDB/SubTeams.yml new file mode 100644 index 0000000..697951d --- /dev/null +++ b/src/MockDB/SubTeams.yml @@ -0,0 +1,35 @@ +Chassis and Ergonomics: + iconUrl: https://res.cloudinary.com/dpgrgsh7g/image/upload/v1710016930/IMG-20240207-WA0000_e1jcf4.jpg + shortDescription: The chassis and ergo team builds the Main Chassis of the Car and builds the components for the driver to sit in + longDescription: Step into the world of the Chassis and Ergonomics Team, where comfort meets performance in every curve and contour. With an eye for detail and a passion for perfection, they sculpt the backbone of our vehicle, ensuring it's not just built to last, but to excel. From optimizing seating positions to fine-tuning weight distribution, they're the architects of a ride that feels as good as it looks. Join us as we push the boundaries of design and functionality, driven by the ingenuity of our Chassis and Ergonomics Team. + subteamAtWork: https://res.cloudinary.com/dpgrgsh7g/image/upload/v1710016930/IMG-20240207-WA0000_e1jcf4.jpg +Drivetrain: + iconUrl: https://res.cloudinary.com/dpgrgsh7g/image/upload/v1710016930/IMG-20240207-WA0000_e1jcf4.jpg + shortDescription: The drivetrain team connects the engine to the wheels + longDescription: The drivetrain subteam plays a pivotal role in ensuring efficient power transfer from the engine to the wheels, overseeing key components such as gearboxes, axles, and driveshafts. Through hands-on learning and mentorship, members develop a comprehensive skill set in CAD, FEA, CAM, and machining, empowering them to design, analyze, and manufacture critical vehicle components with a focus on innovation and practical applications. + subteamAtWork: https://res.cloudinary.com/dpgrgsh7g/image/upload/v1710016930/IMG-20240207-WA0000_e1jcf4.jpg +Steering: + iconUrl: https://res.cloudinary.com/dpgrgsh7g/image/upload/v1710016930/IMG-20240207-WA0000_e1jcf4.jpg + shortDescription: The steering team builds the componets that allow the driver to control the car + longDescription: In the steering subteam, we design and develop the steering behaviors of the car. This includes the turning radius, the ratio between the seeing pinion and rack, and implementing Ackerman geometry. every year we use a wide variety of machining techniques and software to bring our designs to life, ranging from FEA analysis to professional CNC machining. Our goal is to develop the most compact and lightweight system to achieve the optimal driving dynamics. + subteamAtWork: https://res.cloudinary.com/dpgrgsh7g/image/upload/v1710016930/IMG-20240207-WA0000_e1jcf4.jpg +Suspension: + iconUrl: https://res.cloudinary.com/dpgrgsh7g/image/upload/v1710016930/IMG-20240207-WA0000_e1jcf4.jpg + shortDescription: The suspension team makes it so that the car is able to handle all of the bumps and jumps + longDescription: The suspension subteam manages the vehicle's manoeuvrability and handling capabilities. As an offroad buggy, suspension setups must endure all terrain types, including rough rocks and fast jumps. Beyond their endurance capabilities, the vehicle’s handling characteristics are determined through rigorous development of the suspension geometry in simulation software and hand calculations. This subteam collaborates frequently with the chassis and steering subteams to optimize geometries. Suspension assemblies primarily comprised of arms, shocks, steering knuckles, and rear bearing carriers. + subteamAtWork: https://res.cloudinary.com/dpgrgsh7g/image/upload/v1710016930/IMG-20240207-WA0000_e1jcf4.jpg +Electrical: + iconUrl: https://res.cloudinary.com/dpgrgsh7g/image/upload/v1710016930/IMG-20240207-WA0000_e1jcf4.jpg + shortDescription: The electrical team connects some of the instruments the car uses and supports the team in additional ways + longDescription: The electrical team is pivotal in ensuring the performance, safety, and reliability of the racing car during competitions. They design robust electronics and safety mechanisms capable of withstanding the rigors of endurance racing. Additionally, they provide technological support to other sub-teams, integrating data collection systems that directly influence the design process for all components. Their responsibilities encompass designing, testing, and optimizing electrical systems while leveraging data to enhance vehicle performance and safety. + subteamAtWork: https://res.cloudinary.com/dpgrgsh7g/image/upload/v1710016930/IMG-20240207-WA0000_e1jcf4.jpg +Logistics: + iconUrl: https://res.cloudinary.com/dpgrgsh7g/image/upload/v1710016930/IMG-20240207-WA0000_e1jcf4.jpg + shortDescription: The logistics team handles the business side of the club and handles planning of trips to competitions + longDescription: We handle generating a majority of the money needed for operation of the club, travel funds and our social media pages. As part of our responsibility to our sponsors we handle organizing and training all of our members to an industry standard level, all of our work from software, sponsorship, professional outreach, CAD and manufacturing processes. + subteamAtWork: https://res.cloudinary.com/dpgrgsh7g/image/upload/v1710016930/IMG-20240207-WA0000_e1jcf4.jpg +Software: + iconUrl: https://res.cloudinary.com/dpgrgsh7g/image/upload/v1710016930/IMG-20240207-WA0000_e1jcf4.jpg + shortDescription: The software team hanldes the data collection systems, our data storage server, and this website + longDescription: The software team works very closely with electrical team with the creation of our onboard data collection unit, ensuring that all of the code we produce is up to industry standard as well as we handle the creation and maintenence of this site, including the backend which we run on our very own server. + subteamAtWork: https://res.cloudinary.com/dpgrgsh7g/image/upload/v1710016930/IMG-20240207-WA0000_e1jcf4.jpg diff --git a/src/MockDB/nothing.txt b/src/MockDB/nothing.txt new file mode 100644 index 0000000..aa47ece --- /dev/null +++ b/src/MockDB/nothing.txt @@ -0,0 +1 @@ +this is only for testing vercel \ No newline at end of file diff --git a/src/MockDB/pastSponsors.yml b/src/MockDB/pastSponsors.yml new file mode 100644 index 0000000..9b6f171 --- /dev/null +++ b/src/MockDB/pastSponsors.yml @@ -0,0 +1,36 @@ +- Schulich School of Engineering: + LogoUrl: https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQj9L3ZGK6WtOmJbzxmCzRxwLXYKGC5SDcAKHb0ScfbUmbtG0IujQt6eQDaI_Pm9g4DZvc&usqp=CAU + Url: https://schulich.ucalgary.ca/ + DescriptionAboutSponsor: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce eu magna in diam consectetur rhoncus vel nec turpis. Sed finibus mi eu sem varius faucibus. Donec semper erat et bibendum pharetra. Suspendisse cursus lorem sed nisi semper, a rutrum nunc luctus. Nunc ullamcorper enim id orci interdum ultrices. Donec vestibulum nunc vel nisl pretium tempus. Morbi quis ante et ligula eleifend eleifend. Proin bibendum maximus elit vitae congue. Vivamus egestas, ex in tempor posuere, ligula nunc iaculis massa, in imperdiet dui justo eu dolor. Nullam placerat velit quis sem mattis, laoreet pharetra elit tempor. +- Platinum Sponsor Name: + LogoUrl: + Url: + DescriptionAboutSponsor: +- Suri: + LogoUrl: https://lh5.googleusercontent.com/WJsBsmcLypQhY0MMOLQtJSGFXrLQqPKNc3502rYUGKPCq_SfS9CxuoB3n541Kn9bKPm2b5aixCnYsCVYZAts2Y8xvmOHWL3nnbKtWUkE1KoFYYQ4bXUlikfF0NPIynxhzQ=w1280 + Url: https://www.surimanufacturing.com/ + DescriptionAboutSponsor: +- SKF: + LogoUrl: https://www.skf.com/v2/assets/img/skf-logo-white.svg + Url: https://www.skf.com/ca/en + DescriptionAboutSponsor: I am not sure +- WRMA: + LogoUrl: https://wildrosemx.com/wp-content/uploads/2021/08/wild-rose-motocross-calgary-rasterized.png + Url: https://wildrosemx.com/ + DescriptionAboutSponsor: +- Encore Metals: + LogoUrl: https://www.encoremetals.com/assets/images/logos/encore-metals-logo.png + Url: https://www.encoremetals.com/ + DescriptionAboutSponsor: Metal supplier +- CNOOC: + LogoUrl: https://cnoocinternational.com/img/cnooc-logo.png + Url: https://cnoocinternational.com/ + DescriptionAboutSponsor: +- Redbull: + LogoUrl: "https://img.redbull.com/redbullcom/static/redbullcom-logo_double-with-text.svg" + Url: https://www.redbull.com/ca-en/ + DescriptionAboutSponsor: +- Canada Action: + LogoUrl: + Url: + DescriptionAboutSponsor: diff --git a/src/MockDB/sponsorship.yml b/src/MockDB/sponsorship.yml index 5123cab..b89946a 100644 --- a/src/MockDB/sponsorship.yml +++ b/src/MockDB/sponsorship.yml @@ -1,50 +1,41 @@ Diamond Tier: - - Name: Schulich School of Engineering - LogoUrl: https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQj9L3ZGK6WtOmJbzxmCzRxwLXYKGC5SDcAKHb0ScfbUmbtG0IujQt6eQDaI_Pm9g4DZvc&usqp=CAU - Url: https://schulich.ucalgary.ca/ - DescriptionAboutSponsor: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce eu magna in diam consectetur rhoncus vel nec turpis. Sed finibus mi eu sem varius faucibus. Donec semper erat et bibendum pharetra. Suspendisse cursus lorem sed nisi semper, a rutrum nunc luctus. Nunc ullamcorper enim id orci interdum ultrices. Donec vestibulum nunc vel nisl pretium tempus. Morbi quis ante et ligula eleifend eleifend. Proin bibendum maximus elit vitae congue. Vivamus egestas, ex in tempor posuere, ligula nunc iaculis massa, in imperdiet dui justo eu dolor. Nullam placerat velit quis sem mattis, laoreet pharetra elit tempor. - DecriptionOnHelp: Money + - Schulich School of Engineering: + LogoUrl: https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQj9L3ZGK6WtOmJbzxmCzRxwLXYKGC5SDcAKHb0ScfbUmbtG0IujQt6eQDaI_Pm9g4DZvc&usqp=CAU + Url: https://schulich.ucalgary.ca/ + DescriptionAboutSponsor: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce eu magna in diam consectetur rhoncus vel nec turpis. Sed finibus mi eu sem varius faucibus. Donec semper erat et bibendum pharetra. Suspendisse cursus lorem sed nisi semper, a rutrum nunc luctus. Nunc ullamcorper enim id orci interdum ultrices. Donec vestibulum nunc vel nisl pretium tempus. Morbi quis ante et ligula eleifend eleifend. Proin bibendum maximus elit vitae congue. Vivamus egestas, ex in tempor posuere, ligula nunc iaculis massa, in imperdiet dui justo eu dolor. Nullam placerat velit quis sem mattis, laoreet pharetra elit tempor. Platinum Tier: - - Name: Platinum Sponsor Name - LogoUrl: - Url: - DescriptionAboutSponsor: - DescriptionOnHelp: Money + - Platinum Sponsor Name: + LogoUrl: + Url: + DescriptionAboutSponsor: Gold Tier: - - Name: Suri - LogoUrl: https://lh5.googleusercontent.com/WJsBsmcLypQhY0MMOLQtJSGFXrLQqPKNc3502rYUGKPCq_SfS9CxuoB3n541Kn9bKPm2b5aixCnYsCVYZAts2Y8xvmOHWL3nnbKtWUkE1KoFYYQ4bXUlikfF0NPIynxhzQ=w1280 - Url: https://www.surimanufacturing.com/ - DescriptionAboutSponsor: - DescriptionOnHelp: I am not sure of the time of writing this - - Name: SKF - LogoUrl: https://www.skf.com/v2/assets/img/skf-logo-white.svg - Url: https://www.skf.com/ca/en - DescriptionAboutSponsor: I am not sure - DescriptionOnHelp: I am not sure of the time of writing this - - Name: WRMA - LogoUrl: https://wildrosemx.com/wp-content/uploads/2021/08/wild-rose-motocross-calgary-rasterized.png - Url: https://wildrosemx.com/ - DescriptionAboutSponsor: - DescriptionOnHelp: Lets us use their trak during the warm months + - Suri: + LogoUrl: https://lh5.googleusercontent.com/WJsBsmcLypQhY0MMOLQtJSGFXrLQqPKNc3502rYUGKPCq_SfS9CxuoB3n541Kn9bKPm2b5aixCnYsCVYZAts2Y8xvmOHWL3nnbKtWUkE1KoFYYQ4bXUlikfF0NPIynxhzQ=w1280 + Url: https://www.surimanufacturing.com/ + DescriptionAboutSponsor: + - SKF: + LogoUrl: https://www.skf.com/v2/assets/img/skf-logo-white.svg + Url: https://www.skf.com/ca/en + DescriptionAboutSponsor: I am not sure + - WRMA: + LogoUrl: https://wildrosemx.com/wp-content/uploads/2021/08/wild-rose-motocross-calgary-rasterized.png + Url: https://wildrosemx.com/ + DescriptionAboutSponsor: Silver Tier: - - Name: Encore Metals - LogoUrl: https://www.encoremetals.com/assets/images/logos/encore-metals-logo.png - Url: https://www.encoremetals.com/ - DescriptionAboutSponsor: Metal supplier - DescriptionOnHelp: Where we buy metals from at a discounted rate - - Name: CNOOC - LogoUrl: https://cnoocinternational.com/img/cnooc-logo.png - Url: https://cnoocinternational.com/ - DescriptionAboutSponsor: - DescriptionOnHelp: Money + - Encore Metals: + LogoUrl: https://www.encoremetals.com/assets/images/logos/encore-metals-logo.png + Url: https://www.encoremetals.com/ + DescriptionAboutSponsor: Metal supplier + - CNOOC: + LogoUrl: https://cnoocinternational.com/img/cnooc-logo.png + Url: https://cnoocinternational.com/ + DescriptionAboutSponsor: Bronze Tier: - - Name: Redbull - LogoUrl: "https://img.redbull.com/redbullcom/static/redbullcom-logo_double-with-text.svg" - Url: https://www.redbull.com/ca-en/ - DescriptionAboutSponsor: - DescriptionOnHelp: Free Energy Drinks - - Name: Canada Action - LogoUrl: - Url: I dont know - DescriptionAboutSponsor: - DescriptionOnHelp: Money + - Redbull: + LogoUrl: "https://img.redbull.com/redbullcom/static/redbullcom-logo_double-with-text.svg" + Url: https://www.redbull.com/ca-en/ + DescriptionAboutSponsor: + - Canada Action: + LogoUrl: + Url: + DescriptionAboutSponsor: diff --git a/src/OurSponsors/OurSponsors.css b/src/OurSponsors/OurSponsors.css index 7938902..c9c80fe 100644 --- a/src/OurSponsors/OurSponsors.css +++ b/src/OurSponsors/OurSponsors.css @@ -3,48 +3,77 @@ flex-direction: column; justify-content: center; background-color: gray; - padding-left: 10%; - padding-right: 10%; + padding-left: 2%; + padding-right: 2%; } -#OurSponsors div div { - display: flex; - flex-direction: column; - justify-content: center; +#BecomeASponsors { background-color: white; } -#OurSponsors div div div div div img { - display: flex; - justify-content: left; -} - -#OurSponsors div div div p { - display: flex; - justify-content: left; -} - -#OurSponsors div div div div div { - padding: 0%; - display: flex; - flex-direction: column; - justify-content: left; -} - -#OurSponsors div div div div { +#BecomeASponsors div { display: flex; flex-direction: row; - justify-content: flex-end; - padding: 0%; - width: 100%; } -#OurSponsors h2 { - background-color: aquamarine; - text-align: center; - margin: 0px; +#BecomeASponsors a { + color: inherit; + text-decoration: none; } -#OurSponsors h3 { +#BecomeASponsors div a img { + height: 18rem; + width: auto; + padding-right: 3rem; +} + +#BecomeASponsors img { + height: auto; + width: 60%; +} + +#Sponsor { + background-color: white; +} + +#SponsorEnd { + text-align: end; +} + +.SponsorsTitle { text-align: left; + border-bottom: 2px solid black; +} + +.Sponsors { + background-color: inherit; +} + +.Sponsors a { + display: flex; + flex-direction: column; + color: inherit; + text-decoration: none; + cursor: pointer; + background-color: whitesmoke; +} + +.Sponsors a div { + display: flex; + flex-direction: row; +} + +.Sponsors a h4 { + width: 30%; +} + +.Sponsors a img { + max-height: 8rem; + max-width: 70%; +} + +.Sponsors a p { + padding: 2rem; + padding-top: 5px; + padding-bottom: 5px; } diff --git a/src/OurSponsors/OurSponsors.js b/src/OurSponsors/OurSponsors.js index 8d278c0..28c820f 100644 --- a/src/OurSponsors/OurSponsors.js +++ b/src/OurSponsors/OurSponsors.js @@ -1,21 +1,23 @@ import "./OurSponsors.css"; import { useEffect, useState } from "react"; -import sponsorData from "../MockDB/sponsorship.yml"; +import currentSponsorData from "../MockDB/sponsorship.yml"; +import pastSponsorData from "../MockDB/pastSponsors.yml"; import yaml from "js-yaml"; -import OpenPage from "../Header/OpenPage"; /** * @param {null} null - requires onthing * @returns {JSX.Element} JSX - HTML tags and JS functionality * @description Our Sponsors Page * @author Brock - * @todo finish page layout + * @todo finsih layout and add content */ const OurSponsors = () => { - const [sponsorsDict, setSponsorsDict] = useState(); //variable states for the dictionary of sponsors + const [currentSponsorsDict, setCurrentSponsorsDict] = useState(); //variable states for the dictionary of sponsors + const [pastSponsorsDict, setPastSponsorsDict] = useState(); useEffect(() => { - getSponsors(); + getCurrentSponsors(); + getPastSponsors(); }, []); /** @@ -25,93 +27,169 @@ const OurSponsors = () => { * @author Brock * @todo add gPRC to backend and front end add connect to synology drive */ - const getSponsors = async () => { + const getCurrentSponsors = async () => { try { - const res = await fetch(sponsorData); + const res = await fetch(currentSponsorData); const rawText = await res.text(); - const yamlDict = yaml.load(rawText); - setSponsorsDict(yamlDict); + const yamlDict = await yaml.load(rawText); + setCurrentSponsorsDict(yamlDict); } catch (error) { //error checking + console.log(error); + console.error("Error recieving data from server:"); + } + }; + /** + * @param {null} null - requires nothing (link) + * @returns {Object} sponsorsDict - gets a Dictionary of our sponsors from synology drive + * @description Gets the list of sponsors from the synology drive (not implemented), converts the json file into a dictionary + * @author Brock + * @todo add gPRC to backend and front end add connect to synology drive + */ + const getPastSponsors = async () => { + try { + const res = await fetch(pastSponsorData); + const rawText = await res.text(); + const yamlDict = await yaml.load(rawText); + setPastSponsorsDict(yamlDict); + } catch (error) { + // error checking console.error("Error recieving data from server:"); } }; - if (!sponsorsDict) { - //awaiting for a resposne from the backend - //add loading notification to user - return

Loading...

; - } - if (sponsorsDict) { - //maps out the dictionary and displays the content - return ( -
-
- -
-
-

Current Sponsors

- {/* gets the outmost name of the Object {"Name of tier": {...}} */} - {Object.keys(sponsorsDict).map((sponsorTier) => ( -
-

{sponsorTier}

- {/* gets the keys from the new inner object used so that no two html tags are the "same" */} - {Object.keys(sponsorsDict[sponsorTier]).map((sponsorKey) => { - const sponsor = sponsorsDict[sponsorTier][sponsorKey]; - return ( -
-
-
- {sponsor.Name &&

{sponsor.Name}

} - {sponsor.LogoUrl && ( - - { - - )} -
- {/* puts this in the sponsor's section only if they are silver and above */} - {sponsor.DescriptionAboutSponsor !== undefined && - sponsor.DecriptionOnHelp !== undefined && - (sponsorTier !== "Bronze Tier" || - sponsorTier !== "Silver Tier") && ( -

Another Element

- )} -
- {/* puts this in the sponsor's section only if they are silver and above */} - {sponsor.DescriptionAboutSponsor !== undefined && - (sponsorTier !== "Bronze Tier" || - sponsorTier !== "Silver Tier") && ( -

{sponsor.DescriptionAboutSponsor}

- )} - {/* puts this in the sponsor's section only if they are silver and above */} - {sponsor.DecriptionOnHelp !== undefined && - (sponsorTier !== "Bronze Tier" || - sponsorTier !== "Silver Tier") && ( -

{sponsor.DecriptionOnHelp}

- )} -
- ); - })} -
- ))} + return ( +
+

Sponsor

+
+

(How our team uses what's given by and benefits from sponsors)

+
+ + QR code to contanct us form +

Click on this to open the contact form

+
+

+ Talk about how you can reach out to sponsor us. (Maybe also include + a link to the form as well) +

+

+ (Talk about what we can offer our sponsors for helping us briefly or + in a listing format. We can also mention how they can find more on the + sponsorship package - plus provide some way they can access the + package from here) +

+ Our sponsorship package
- ); - } + + +
+ ); }; export default OurSponsors; diff --git a/src/Teams/SubTeams.css b/src/Teams/SubTeams.css new file mode 100644 index 0000000..63698aa --- /dev/null +++ b/src/Teams/SubTeams.css @@ -0,0 +1,72 @@ +#subteams { + margin-left: 1rem; + margin-right: 1rem; +} + +#subteams h1 { + text-align: center; +} + +#subteams table { + display: flex; + justify-content: center; + width: 100%; + max-width: 100%; +} + +#subteams table tbody { + display: flex; + flex-direction: column; + justify-content: center; +} + +#subteams table td { + cursor: pointer; +} + +#subteams table img { + height: 10rem; + width: 10rem; +} + +#subteams table p { + width: 10rem; + text-align: center; +} + +.subteamsEnd { + text-align: end; + justify-content: end; +} + +.subteamsEnd h2 { + padding-right: 1rem; + padding-left: 0px; +} + +#subteamContent { + padding-top: 1rem; + padding-left: 1rem; + padding-right: 1rem; +} + +.subteamData { + display: flex; + flex-direction: row; + height: 10rem; + padding-bottom: 2rem; + padding-top: 0.5rem; + justify-content: center; +} + +#subteamContent p { + max-width: 50%; +} + +.subteamTitle { + display: flex; + flex-direction: row; + height: 5rem; + margin: 0px auto; + border-bottom: solid 2px black; +} diff --git a/src/Teams/SubTeams.js b/src/Teams/SubTeams.js new file mode 100644 index 0000000..46236d2 --- /dev/null +++ b/src/Teams/SubTeams.js @@ -0,0 +1,249 @@ +import "./SubTeams.css"; +import { useState, useEffect } from "react"; +import yaml from "js-yaml"; +import leadershipData from "../MockDB/SubTeams.yml"; + +/** + * @param {null} null - requires nothing (link) + * @returns {JSX.Element} page - page content + * @description the subteams page + * @author Brock + * @todo add gPRC to backend and any remaining css + */ +const SubTeams = () => { + const [subteamsDict, setSubteamsDict] = useState(); + const [subteamsArray, setSubteamsArray] = useState(); + + useEffect(() => { + getLeadership(); + }, []); + /** + * @param {null} null - requires nothing (link) + * @returns {Object} sponsorsDict - gets a Dictionary of our sponsors from synology drive + * @description Gets the list of sponsors from the synology drive (not implemented), converts the json file into a dictionary + * @author Brock + * @todo add gPRC to backend and front end add connect to synology drive + */ + const getLeadership = async () => { + try { + const res = await fetch(leadershipData); + const rawText = await res.text(); + const yamlDict = await yaml.load(rawText); + setSubteamsDict(yamlDict); + setSubteamsArray(Object.values(yamlDict)); + } catch (error) { + //error checking + console.error("Error recieving data from server:"); + } + }; + + /** + * @param {index} Int - requires the number of the section to go to + * @returns {null} null - moves screen to a specific subteam section + * @description moves screen to the subteam's section upon click + * @author Brock + */ + const ScrolltoSubteamSection = (index) => { + const section = document.querySelectorAll(".subteamTitle")[index]; + if (section) { + section.scrollIntoView({ behavior: "smooth" }); + } + }; + return ( +
+

Get to Know Our Subteams

+ {subteamsDict === undefined && subteamsArray === undefined ? ( +

Loading...

+ ) : ( + <> + + + {/* this really sucks it needs to be changed */} + + {/* row 1 */} + + {/* row 2 */} + + {/* row 3 */} + + {/* row 4 */} + + {/* row 5 */} + + {/* row 6 */} + + {/* row 7 */} + + + + {/* row 1 */} + + {/* row 2 */} + + {/* row 3 */} + + {/* row 4 */} + + {/* row 5 */} + + {/* row 6 */} + + {/* row 7 */} + + + +
{ + ScrolltoSubteamSection(0); + }}> + {subteamsArray[0] + { + ScrolltoSubteamSection(1); + }}> + {subteamsArray[1] + { + ScrolltoSubteamSection(2); + }}> + {subteamsArray[2] + { + ScrolltoSubteamSection(3); + }}> + {subteamsArray[3] + { + ScrolltoSubteamSection(4); + }}> + {subteamsArray[4] + { + ScrolltoSubteamSection(5); + }}> + {subteamsArray[5] + { + ScrolltoSubteamSection(6); + }}> + {subteamsArray[6] +
{ + ScrolltoSubteamSection(0); + }}> +

{subteamsArray[0].shortDescription}

+
{ + ScrolltoSubteamSection(1); + }}> +

{subteamsArray[1].shortDescription}

+
{ + ScrolltoSubteamSection(2); + }}> +

{subteamsArray[2].shortDescription}

+
{ + ScrolltoSubteamSection(3); + }}> +

{subteamsArray[3].shortDescription}

+
{ + ScrolltoSubteamSection(4); + }}> +

{subteamsArray[4].shortDescription}

+
{ + ScrolltoSubteamSection(5); + }}> +

{subteamsArray[5].shortDescription}

+
{ + ScrolltoSubteamSection(6); + }}> +

{subteamsArray[6].shortDescription}

+
+
+ {/* lays out content from the subteams dict gets the name of the subteam and index */} + {Object.keys(subteamsDict).map((subteamName, index) => { + const subteam = subteamsDict[subteamName]; + //changes location of content based if the second one creates a checkerboard layout + let className = index % 2 === 0 ? "subteamsEnd" : ""; + return ( +
+ {/* changes layout if the second or first one */} + {index % 2 === 0 ? ( + <> +
+ {subteamName +

{subteamName}

+
+
+ { +

{subteam.longDescription}

+
+ + ) : ( + <> +
+

{subteamName}

+ {subteamName +
+
+

{subteam.longDescription}

+ { +
+ + )} +
+ ); + })} +
+ + )} +
+ ); +}; + +export default SubTeams; diff --git a/src/Teams/Teams.js b/src/Teams/Teams.js deleted file mode 100644 index 98b7bec..0000000 --- a/src/Teams/Teams.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function Teams() { - return ( -

Teams

- ); -}; \ No newline at end of file diff --git a/src/index.js b/src/index.js index dceadbb..f3835dd 100644 --- a/src/index.js +++ b/src/index.js @@ -1,34 +1,44 @@ -import React from 'react'; -import ReactDOM from 'react-dom/client'; -import reportWebVitals from './reportWebVitals'; +import React from "react"; +import ReactDOM from "react-dom/client"; +import reportWebVitals from "./reportWebVitals"; import { BrowserRouter, Routes, Route } from "react-router-dom"; -import Header from './Header/Header'; -import AboutUs from './AboutUs/AboutUs'; -import Teams from './Teams/Teams'; -import OurSponsors from './OurSponsors/OurSponsors'; -import BecomeASponsor from './BecomeASponsor/BecomeASponsor'; -import JoinTheClub from './Club Membership & Upcoming Events/JoinTheClub/JoinTheClub'; -import UpcomingEvents from './Club Membership & Upcoming Events/UpcominEvents/UpcomingEvents'; -import Gallery from './Gallery/Gallery'; -import './index.css'; +import Header from "./Header/Header"; +import AboutUs from "./AboutUs/AboutUs"; +import SubTeams from "./Teams/SubTeams"; +import OurSponsors from "./OurSponsors/OurSponsors"; +import JoinTheClub from "./Club Membership & Upcoming Events/JoinTheClub/JoinTheClub"; +import UpcomingEvents from "./Club Membership & Upcoming Events/UpcominEvents/UpcomingEvents"; +import Gallery from "./Gallery/Gallery"; +import "./index.css"; -const root = ReactDOM.createRoot(document.getElementById('root')); +const root = ReactDOM.createRoot(document.getElementById("root")); root.render( - - - - }> - }> - }> - }> - }> - }> - }> - }> - - - - + + + + }> + }> + }> + }> + }> + }> + }> + + + + ); // If you want to start measuring performance in your app, pass a function