mirror of
https://github.com/UofCBaja/BajaUofCWebsite.git
synced 2025-06-15 13:24:17 -06:00
add OurSponsors: added QR code spot and space for content
This commit is contained in:
parent
98ee3152c9
commit
31a546f985
@ -7,6 +7,25 @@
|
|||||||
padding-right: 2%;
|
padding-right: 2%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#BecomeASponsors {
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
#BecomeASponsors div {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
#BecomeASponsors a {
|
||||||
|
color: inherit;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#BecomeASponsors div a img {
|
||||||
|
height: 18rem;
|
||||||
|
padding-right: 3rem;
|
||||||
|
}
|
||||||
|
|
||||||
#Sponsor {
|
#Sponsor {
|
||||||
background-color: white;
|
background-color: white;
|
||||||
}
|
}
|
||||||
@ -38,16 +57,16 @@
|
|||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Sponsors a div h4 {
|
.Sponsors a h4 {
|
||||||
width: 30%;
|
width: 30%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Sponsors a div img {
|
.Sponsors a img {
|
||||||
max-height: 8rem;
|
max-height: 8rem;
|
||||||
max-width: 70%;
|
max-width: 70%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Sponsors a div p {
|
.Sponsors a p {
|
||||||
padding: 2rem;
|
padding: 2rem;
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
padding-bottom: 5px;
|
padding-bottom: 5px;
|
||||||
|
@ -3,15 +3,13 @@ import { useEffect, useState } from "react";
|
|||||||
import currentSponsorData from "../MockDB/sponsorship.yml";
|
import currentSponsorData from "../MockDB/sponsorship.yml";
|
||||||
import pastSponsorData from "../MockDB/pastSponsors.yml";
|
import pastSponsorData from "../MockDB/pastSponsors.yml";
|
||||||
import yaml from "js-yaml";
|
import yaml from "js-yaml";
|
||||||
import OpenPage from "../Header/OpenPage";
|
|
||||||
import fakeDelay from "../TestingTools/fakeDelay";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param {null} null - requires onthing
|
* @param {null} null - requires onthing
|
||||||
* @returns {JSX.Element} JSX - HTML tags and JS functionality
|
* @returns {JSX.Element} JSX - HTML tags and JS functionality
|
||||||
* @description Our Sponsors Page
|
* @description Our Sponsors Page
|
||||||
* @author Brock <darkicewolf50@gmail.com>
|
* @author Brock <darkicewolf50@gmail.com>
|
||||||
* @todo finish page layout
|
* @todo finsih layout and add content
|
||||||
*/
|
*/
|
||||||
const OurSponsors = () => {
|
const OurSponsors = () => {
|
||||||
const [currentSponsorsDict, setCurrentSponsorsDict] = useState(); //variable states for the dictionary of sponsors
|
const [currentSponsorsDict, setCurrentSponsorsDict] = useState(); //variable states for the dictionary of sponsors
|
||||||
@ -31,7 +29,6 @@ const OurSponsors = () => {
|
|||||||
*/
|
*/
|
||||||
const getCurrentSponsors = async () => {
|
const getCurrentSponsors = async () => {
|
||||||
try {
|
try {
|
||||||
await fakeDelay(5000);
|
|
||||||
const res = await fetch(currentSponsorData);
|
const res = await fetch(currentSponsorData);
|
||||||
const rawText = await res.text();
|
const rawText = await res.text();
|
||||||
const yamlDict = await yaml.load(rawText);
|
const yamlDict = await yaml.load(rawText);
|
||||||
@ -63,11 +60,25 @@ const OurSponsors = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div id="OurSponsors">
|
<div id="OurSponsors">
|
||||||
|
<h1>Sponsor</h1>
|
||||||
<div id="BecomeASponsors">
|
<div id="BecomeASponsors">
|
||||||
<OpenPage
|
<p>(How our team uses what's given by and benefits from sponsors)</p>
|
||||||
pageToGoTo={"/BecomeASponsor"}
|
<div>
|
||||||
textOnButton={"Become a Sponsor"}
|
<a
|
||||||
/>
|
href="https://google.com"
|
||||||
|
target="_blank"
|
||||||
|
rel="noreferrer">
|
||||||
|
<img
|
||||||
|
src="https://res.cloudinary.com/dpgrgsh7g/image/upload/v1710699982/qr-code_l9q7ik.png"
|
||||||
|
alt="QR code to contanct us form"
|
||||||
|
/>
|
||||||
|
<p>Click on this to open the contact form</p>
|
||||||
|
</a>
|
||||||
|
<p>
|
||||||
|
Talk about how you can reach out to sponsor us. (Maybe also include
|
||||||
|
a link to the form as well)
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="Sponsor">
|
<div id="Sponsor">
|
||||||
<h2 className="SponsorsTitle">Current Sponsors</h2>
|
<h2 className="SponsorsTitle">Current Sponsors</h2>
|
||||||
@ -75,7 +86,7 @@ const OurSponsors = () => {
|
|||||||
{currentSponsorsDict === undefined ? (
|
{currentSponsorsDict === undefined ? (
|
||||||
<p>Loading...</p>
|
<p>Loading...</p>
|
||||||
) : (
|
) : (
|
||||||
<div>
|
<>
|
||||||
{Object.keys(currentSponsorsDict).map((sponsorsTier) => {
|
{Object.keys(currentSponsorsDict).map((sponsorsTier) => {
|
||||||
return (
|
return (
|
||||||
<div className="Sponsors">
|
<div className="Sponsors">
|
||||||
@ -84,7 +95,7 @@ const OurSponsors = () => {
|
|||||||
{Object.keys(currentSponsorsDict[sponsorsTier]).map(
|
{Object.keys(currentSponsorsDict[sponsorsTier]).map(
|
||||||
(sponsorsKey) => {
|
(sponsorsKey) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<>
|
||||||
{/* gets name out of object and gets data of that sponsor preped */}
|
{/* gets name out of object and gets data of that sponsor preped */}
|
||||||
{Object.keys(
|
{Object.keys(
|
||||||
currentSponsorsDict[sponsorsTier][sponsorsKey]
|
currentSponsorsDict[sponsorsTier][sponsorsKey]
|
||||||
@ -114,14 +125,14 @@ const OurSponsors = () => {
|
|||||||
</a>
|
</a>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div id="Sponsor">
|
<div id="Sponsor">
|
||||||
@ -133,7 +144,7 @@ const OurSponsors = () => {
|
|||||||
{pastSponsorsDict === undefined ? (
|
{pastSponsorsDict === undefined ? (
|
||||||
<p>Loading...</p>
|
<p>Loading...</p>
|
||||||
) : (
|
) : (
|
||||||
<div>
|
<>
|
||||||
{/* gets keys o objects in list */}
|
{/* gets keys o objects in list */}
|
||||||
{Object.keys(pastSponsorsDict).map((pastSponsorKey) => {
|
{Object.keys(pastSponsorsDict).map((pastSponsorKey) => {
|
||||||
return (
|
return (
|
||||||
@ -162,7 +173,7 @@ const OurSponsors = () => {
|
|||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user