diff --git a/src/back-features/sponsors.ts b/src/back-features/sponsors.ts index d2763d1..f1fcbd6 100644 --- a/src/back-features/sponsors.ts +++ b/src/back-features/sponsors.ts @@ -11,6 +11,7 @@ const getSponsors = async () => { return sponsors; } catch (error) { console.error(error); + return []; } } diff --git a/src/components/footers/footer.tsx b/src/components/footers/footer.tsx index 71946c5..efcb95b 100644 --- a/src/components/footers/footer.tsx +++ b/src/components/footers/footer.tsx @@ -31,15 +31,16 @@ const Footer: React.FC = ({ }) => { Patrocinadores - {/*(configValues.midiaKit) ? - Seja um patrocinador - : <>}*/} + {/*(configValues.midiaKit) ? Código de conduta : <>*/} + {(configValues.midiaKit) ? + Seja um patrocinador + : <>} - Se cadastrar + Inscreva-se {/* Organizadores diff --git a/src/components/hero-section/iwd-2024/index.tsx b/src/components/hero-section/iwd-2024/index.tsx index 1ee3e37..5a34375 100644 --- a/src/components/hero-section/iwd-2024/index.tsx +++ b/src/components/hero-section/iwd-2024/index.tsx @@ -41,7 +41,6 @@ export const HeroSection = () => { url="https://www.youtube.com/embed/uY9nDt4swuU?si=EvquzOhd_7EjRulP" open={open} toggle={() => { - console.log('foi') toggle() }} /> diff --git a/src/components/iwd-2024/sponsors-section/Sponsors.module.css b/src/components/iwd-2024/sponsors-section/Sponsors.module.css new file mode 100644 index 0000000..6043fe8 --- /dev/null +++ b/src/components/iwd-2024/sponsors-section/Sponsors.module.css @@ -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; + } +} \ No newline at end of file diff --git a/src/components/iwd-2024/sponsors-section/sponsor-card.tsx b/src/components/iwd-2024/sponsors-section/sponsor-card.tsx new file mode 100644 index 0000000..e401345 --- /dev/null +++ b/src/components/iwd-2024/sponsors-section/sponsor-card.tsx @@ -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 = (sponsor) => { + return ( + +
+ {`Logo +
+
+ ); +} + +export default SponsorCard; + diff --git a/src/components/iwd-2024/sponsors-section/sponsors-section.tsx b/src/components/iwd-2024/sponsors-section/sponsors-section.tsx new file mode 100644 index 0000000..57ae16b --- /dev/null +++ b/src/components/iwd-2024/sponsors-section/sponsors-section.tsx @@ -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 = ({ sponsors }) => { + return ( + +
+ + + +

+ Patrocinadores +

+ +
+
+ + {sponsors && ( + +
+ {SPONSORS_LIST.map((el, i) => { + const sponsorLevel = sponsors[el] + const isStaff = el === "staff" + + if (sponsors[el] != null) + return ( +
+

+ {sponsorLevel.name} +

+ +
+ {sponsorLevel.items.map((item) => ( + + ))} +
+
+
+ ) + })} + + {/*

+ Organização +

+ +
+ + +
+ { + supports.items.map((item: Sponsor) => mapSponsorCard(item, false)) + } +
+
+
*/} +
+
+ )} +
+
+ ); +} + +export default SponsorsSection; + diff --git a/src/components/iwd-2023/Testimonials/Card.tsx b/src/components/iwd-2024/testimonials/Card.tsx similarity index 100% rename from src/components/iwd-2023/Testimonials/Card.tsx rename to src/components/iwd-2024/testimonials/Card.tsx diff --git a/src/components/iwd-2023/Testimonials/index.tsx b/src/components/iwd-2024/testimonials/index.tsx similarity index 100% rename from src/components/iwd-2023/Testimonials/index.tsx rename to src/components/iwd-2024/testimonials/index.tsx diff --git a/src/components/iwd-2023/Testimonials/styles.module.css b/src/components/iwd-2024/testimonials/styles.module.css similarity index 97% rename from src/components/iwd-2023/Testimonials/styles.module.css rename to src/components/iwd-2024/testimonials/styles.module.css index 8ce6644..8450109 100644 --- a/src/components/iwd-2023/Testimonials/styles.module.css +++ b/src/components/iwd-2024/testimonials/styles.module.css @@ -13,8 +13,8 @@ .Testimonial__img { margin: 0 auto; margin-top: 1rem; - max-height: 350px; - min-height: 300px; + max-height: 350px; + min-height: 300px; max-width: 408px; width: 80%; position: relative; diff --git a/src/pages/index.tsx b/src/pages/index.tsx index e5fc202..b7824a3 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -6,15 +6,15 @@ import { SponsorLevel } from "models/sponsor-level"; import styles from "styles/Home.module.css"; import HomeHeader from "../components/headers/iwd/home-header"; -import SpeakerSection from "components/iwd-2023/speakers-section/speakers-section"; -import SponsorsSection from "components/sponsors-section/sponsors-section"; +import SponsorsSection from "components/iwd-2024/sponsors-section/sponsors-section"; import CountdownTimer from "components/iwd-2024/countdown/countdown-timer"; import OlderEvenstsSection from "components/iwd-2024/older-events-section/older-events-section"; import ErrorBoundary from '../components/error-boundary'; import { HeroSection } from "components/hero-section/iwd-2024"; -import { Testimonials } from "components/iwd-2023/Testimonials"; +import { Testimonials } from "components/iwd-2024/testimonials"; +import { getSponsors } from "back-features/sponsors"; // https://alvarotrigo.com/blog/css-animations-scroll/ @@ -67,11 +67,11 @@ const Home = ({ speakers, sponsors, schedule }: HomePageProps) => { - + */}
- */} + {/*
@@ -87,7 +87,7 @@ export async function getServerSideProps() { return { props: { speakers: [],// await getSpeaker(), - sponsors: [], //await getSponsors(), + sponsors: await getSponsors(), schedule: [],//await getSchedule(), }, };