added sponsor: added side border and started on sponsor css

This commit is contained in:
darkicewolf50 2024-03-30 12:06:37 -06:00
parent ee9d806ef6
commit 236108e895
2 changed files with 73 additions and 21 deletions

View File

@ -1,6 +1,12 @@
:root { :root {
--tableBackground: white; --tableBackground: white;
--sponsorBorderWidth: 2px;
--sponsorBorderStyle: solid;
--sponsorBorderColour: black;
--sponsorBorder: var(--sponsorBorderWidth) var(--sponsorBorderStyle)
var(--sponsorBorderColour);
} }
#OurSponsors { #OurSponsors {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -17,7 +23,6 @@
#BecomeASponsors div { #BecomeASponsors div {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
border-bottom: 2px solid black;
padding-bottom: 4svh; padding-bottom: 4svh;
margin-left: 1svw; margin-left: 1svw;
margin-right: 1svw; margin-right: 1svw;
@ -90,10 +95,48 @@
text-align: end; text-align: end;
} }
h1 { #OurSponsors h1 {
position: relative;
text-align: left; text-align: left;
border-bottom: 2px solid black; border-bottom: var(--sponsorBorder);
border-top: var(--sponsorBorder);
width: fit-content; width: fit-content;
padding-top: 2svh;
padding-bottom: 2svh;
}
#OurSponsors #h1Exception {
border-top: none;
}
/* this hurt me but we now have a border at the side*/
#sideBorder {
display: flex;
flex-direction: row;
padding-top: 2svh;
padding-bottom: 2svh;
margin-top: 2svh;
margin-bottom: 4svh;
border-bottom: var(--sponsorBorder);
align-items: center;
}
#sideBorder h1 {
padding-right: 2svw;
margin: 0px;
width: fit-content;
border: none;
}
#sideBorder div {
background-color: var(--sponsorBorderColour);
flex: 1;
height: var(--sponsorBorderWidth);
}
#Sponsor .Sponsors h1 {
width: 100%;
border: none;
} }
.Sponsors { .Sponsors {
@ -122,17 +165,18 @@ h1 {
flex-direction: row; flex-direction: row;
} }
.Sponsors a div div {
display: flex;
flex-direction: column;
padding-left: 5svw;
}
.Sponsors a h4 { .Sponsors a h4 {
width: 30%; width: fit-content;
border-bottom: var(--sponsorBorder);
} }
.Sponsors a img { .Sponsors a img {
max-height: 8rem; max-height: 24svh;
max-width: 70%; width: 25svw;
}
.Sponsors a p {
padding: 2rem;
padding-top: 5px;
padding-bottom: 5px;
} }

View File

@ -64,7 +64,7 @@ const OurSponsors = () => {
<div id="OurSponsors"> <div id="OurSponsors">
<div id="BecomeASponsors"> <div id="BecomeASponsors">
<div> <div>
<h1>How sponsors help us</h1> <h1 id="h1Exception">How sponsors help us</h1>
<p> <p>
Schulich Off-Road expresses deep appreciation for sponsors' crucial Schulich Off-Road expresses deep appreciation for sponsors' crucial
support in various team operations, from sourcing parts to support in various team operations, from sourcing parts to
@ -244,7 +244,10 @@ const OurSponsors = () => {
</div> </div>
</div> </div>
<div id="Sponsor"> <div id="Sponsor">
<h1>Current Sponsors</h1> <div id="sideBorder">
<h1>Current Sponsors</h1>
<div></div>
</div>
{/* shows the current sponsors only after the data has been recieved */} {/* shows the current sponsors only after the data has been recieved */}
{currentSponsorsDict === undefined ? ( {currentSponsorsDict === undefined ? (
<p>Loading...</p> <p>Loading...</p>
@ -253,7 +256,9 @@ const OurSponsors = () => {
{/* gets the outmost name of the Object Name of tier*/} {/* gets the outmost name of the Object Name of tier*/}
{Object.keys(currentSponsorsDict).map((sponsorsTier) => { {Object.keys(currentSponsorsDict).map((sponsorsTier) => {
return ( return (
<div className="Sponsors"> <div
key={sponsorsTier}
className="Sponsors">
<h3>{sponsorsTier}</h3> <h3>{sponsorsTier}</h3>
{/* gets key form list of tier */} {/* gets key form list of tier */}
{Object.keys(currentSponsorsDict[sponsorsTier]).map( {Object.keys(currentSponsorsDict[sponsorsTier]).map(
@ -270,22 +275,25 @@ const OurSponsors = () => {
]; ];
return ( return (
<a <a
key={sponsorData}
href={sponsorData.Url} href={sponsorData.Url}
target="_blank" target="_blank"
rel="noreferrer"> rel="noreferrer">
<div> <div>
<h4>{sponsorName}</h4>
<img <img
src={sponsorData.LogoUrl} src={sponsorData.LogoUrl}
alt={sponsorName + "'s Logo"} alt={sponsorName + "'s Logo"}
/> />
</div>
{(sponsorsTier !== "Silver Tier" ||
sponsorsTier !== "Bronze Tier") && (
<div> <div>
<p>{sponsorData.DescriptionAboutSponsor}</p> <h4>{sponsorName}</h4>
{(sponsorsTier !== "Silver Tier" ||
sponsorsTier !== "Bronze Tier") && (
<p>
{sponsorData.DescriptionAboutSponsor}
</p>
)}
</div> </div>
)} </div>
</a> </a>
); );
})} })}