-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tacio Medeiros
committed
Feb 12, 2024
1 parent
0ef906e
commit a9fedc1
Showing
10 changed files
with
198 additions
and
13 deletions.
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
72 changes: 72 additions & 0 deletions
72
src/components/iwd-2024/sponsors-section/Sponsors.module.css
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,72 @@ | ||
.SponsorSection { | ||
margin-bottom: 100px; | ||
padding: 0 0.6rem; | ||
} | ||
|
||
.SponsorSection h2 { | ||
background-color: var(--soft-green-light); | ||
border-radius: 0.5rem; | ||
color: var(--white); | ||
margin: 0; | ||
height: fit-content; | ||
width: fit-content; | ||
padding: 0 0.75rem; | ||
} | ||
|
||
.SponsorWrapper { | ||
display: grid; | ||
grid-template-columns: repeat(auto-fill, minmax(max(152px, 20%), 1fr)); | ||
grid-gap: 8px; | ||
padding: 20px 0px; | ||
margin: 0px 5px; | ||
} | ||
|
||
|
||
.StaffWrapper { | ||
display: grid; | ||
grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); | ||
grid-gap: 8px; | ||
padding: 20px 0px; | ||
margin: 0px 5px; | ||
} | ||
|
||
.SponsorCard { | ||
background-color: var(--default-background-color); | ||
box-shadow: 0 0 2px 0 rgb(0 0 0 / 7%), 0 2px 2px 0 rgb(0 0 0 / 15%); | ||
transition: box-shadow var(--animation); | ||
cursor: pointer; | ||
height: 120px; | ||
display: flex; | ||
justify-content: center; | ||
position: relative; | ||
width: 100%; | ||
} | ||
|
||
.SponsorCardBody { | ||
position: relative; | ||
width: 270px; | ||
height: 90px; | ||
display: flex; | ||
justify-content: center; | ||
} | ||
|
||
.SponsorCardBodyImage { | ||
max-height: 72px; | ||
max-width: 248px; | ||
object-fit: contain; | ||
top: 50% !important; | ||
left: 50% !important; | ||
transform: translate(-50%, -50%); | ||
padding: 0 1rem; | ||
} | ||
|
||
#sponsors { | ||
margin: 10px 0px; | ||
} | ||
|
||
@media only screen and (max-width: 580px) { | ||
|
||
.ConectorImage { | ||
width: 0px; | ||
} | ||
} |
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,29 @@ | ||
/*eslint-disable*/ | ||
import { Sponsor } from "models/sponsor"; | ||
import React from "react"; | ||
import styles from './Sponsors.module.css' | ||
import Image from 'next/image' | ||
|
||
|
||
interface SponsorCardProps extends Sponsor { | ||
isStaff?: boolean; | ||
} | ||
|
||
const SponsorCard: React.FC<SponsorCardProps> = (sponsor) => { | ||
return ( | ||
<a href={sponsor.url} target="_blank"> | ||
<div className={styles.SponsorCard}> | ||
<Image | ||
alt={`Logo da empresa ${sponsor.name}`} | ||
src={sponsor.logo} | ||
fill | ||
className={styles.SponsorCardBodyImage} | ||
sizes="(max-width: 768px) , 248px" | ||
/> | ||
</div> | ||
</a> | ||
); | ||
} | ||
|
||
export default SponsorCard; | ||
|
83 changes: 83 additions & 0 deletions
83
src/components/iwd-2024/sponsors-section/sponsors-section.tsx
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,83 @@ | ||
/*eslint-disable*/ | ||
import { Sponsor } from "models/sponsor"; | ||
import { | ||
Container, | ||
Row, | ||
Col, | ||
} from "reactstrap"; | ||
import _supports from '../../../hooks/userSupports'; | ||
import { SponsorLevel } from "models/sponsor-level"; | ||
import SponsorCard from "./sponsor-card"; | ||
|
||
import styles from './Sponsors.module.css' | ||
|
||
interface StringMap { [key: string]: any; } | ||
|
||
const SPONSORS_LIST: string[] = ["superior", "diamond", "golden", "silver", "bronze", "ruby", "ametista", "support", "staff"]; | ||
|
||
interface SponsorsSectionProps { | ||
sponsors: { [key: string]: SponsorLevel }, | ||
} | ||
|
||
const SponsorsSection: React.FC<SponsorsSectionProps> = ({ sponsors }) => { | ||
return ( | ||
<Container style={{ paddingLeft: "0px" }}> | ||
<section className={styles.SponsorSection}> | ||
<Container> | ||
<Row> | ||
<Col lg={4} sm={12}> | ||
<h2> | ||
Patrocinadores | ||
</h2> | ||
</Col> | ||
</Row> | ||
</Container> | ||
|
||
{sponsors && ( | ||
<Container fluid> | ||
<div id="sponsors"> | ||
{SPONSORS_LIST.map((el, i) => { | ||
const sponsorLevel = sponsors[el] | ||
const isStaff = el === "staff" | ||
|
||
if (sponsors[el] != null) | ||
return ( | ||
<section key={el}> | ||
<h4> | ||
{sponsorLevel.name} | ||
</h4> | ||
<Row> | ||
<div className={isStaff ? styles.StaffWrapper : styles.SponsorWrapper}> | ||
{sponsorLevel.items.map((item) => ( | ||
<SponsorCard key={item.name} isStaff={isStaff} {...item} /> | ||
))} | ||
</div> | ||
</Row> | ||
</section> | ||
) | ||
})} | ||
|
||
{/*<h4> | ||
Organização | ||
</h4> | ||
<div> | ||
<Row> | ||
<div className={styles.SponsorWrapper}> | ||
{ | ||
supports.items.map((item: Sponsor) => mapSponsorCard(item, false)) | ||
} | ||
</div> | ||
</Row> | ||
</div>*/} | ||
</div> | ||
</Container> | ||
)} | ||
</section> | ||
</Container> | ||
); | ||
} | ||
|
||
export default SponsorsSection; | ||
|
File renamed without changes.
File renamed without changes.
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