Skip to content

Commit

Permalink
fix: subindo agenda
Browse files Browse the repository at this point in the history
  • Loading branch information
Tacio Medeiros committed Apr 1, 2024
1 parent bcee364 commit 44aef1d
Show file tree
Hide file tree
Showing 9 changed files with 323 additions and 11 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions src/components/iwd-2024/event-location/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import { Container } from "reactstrap"
import Image from "next/image"
import LocationImg from './assets/cdl.png'

import styles from './styles.module.css'
import configValues from "helpers/config"

export const EventLocationSection = () => {
return (
<Container className={styles.EventLocation} id='local'>
<h2>
Local
</h2>

<div className={styles.LocationContainer}>
<aside>
<article className={styles.LocationDescription}>
<strong>{configValues.place}</strong>
<p className={styles.LocationAddress}>
{configValues.placeAddress}
</p>
</article>
<Image
alt={`Fachada do ${configValues.place}`}
className={styles.LocationImg}
src={LocationImg}
height={247}
/>
</aside>

<iframe className={styles.Map} src="https://maps.google.com/maps?width=600&amp;height=400&amp;hl=en&amp;q=Cdl uberlandia&amp;t=&amp;z=14&amp;ie=UTF8&amp;iwloc=B&amp;output=embed" width="600" height="450" style={{ border: 0 }} allowFullScreen loading="lazy" referrerPolicy="no-referrer-when-downgrade"></iframe>

</div>
</Container>
)
}
66 changes: 66 additions & 0 deletions src/components/iwd-2024/event-location/styles.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
.EventLocation 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;
}

.LocationContainer {
display: flex;
flex-wrap: wrap;
font-size: 1.25rem;
gap: 2rem;
text-align: center;
justify-content: center;
margin-top: 2rem;
}

.LocationDescription {
max-width: 29rem;
margin: 2rem auto 0 auto;
position: relative;
}

.LocationImg {
border-radius: 2px;
object-fit: contain;
padding: 0 5rem;
}

.LocationAddress {
color: var(--primary-text);
}

.LocationDescription::after {
background: var(--primary-text);
content: "";
display: flex;
height: 1px;
opacity: 0.20;
width: 100%;
margin-top: -0.2rem;
}

.Map {
flex: 1;
}

@media (min-width: 980px) {
.LocationContainer {
gap: 3rem;
text-align: left;
}
}

@media (min-width: 640px) {
.LocationDescription {
margin: 2rem auto;
}

.LocationImg {
padding: 0;
}
}
71 changes: 71 additions & 0 deletions src/components/iwd-2024/schedule-section/Schedule.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
.ScheduleSection {
padding-top: 100px;
background: linear-gradient(0, transparent, var(--blue-light), transparent);
}

.ScheduleWrapper {
display: flex;
justify-content: center;
margin-bottom: 60px;
}

.ScheduleTable {
width: 60%;
}


@media only screen and (max-width: 1026px) {
.ScheduleTable {
width: 80%;
}
}

@media only screen and (max-width: 580px) {

.ConectorImage {
width: 0px;
}
}



.ScheduleHeader {
margin-top: 60px;
padding: 10px 10px;
background-color: var(--blue2);
text-align: center;
font-weight: bold;
border: 1px solid var(--blue2);
border-radius: 10px;
color: white;
display: flex;
justify-content: center;
}

.ScheduleBody {
background-color: #F8F8F8;
}

.ScheduleItem {
padding: 20px 40px;
}

.ScheduleTime {
font-size: 16px;
font-weight: 700;
}

.SpeakerTopic {
font-weight: bold;
}


.ScheduleHeaderTitle {
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;
}
111 changes: 111 additions & 0 deletions src/components/iwd-2024/schedule-section/schedule-section.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
/*eslint-disable*/
import { Speaker } from "models/speaker";
import Image from "next/legacy/image";
import React, { useState } from "react";
import {
Badge,
Col,
Row,
Container
} from "reactstrap";
import ScheduleTime from "./schedule-time"
import { Schedule } from "models/schedule";
import styles from "./Schedule.module.css";

interface SpeakersSectionProps {
speakers: Array<Speaker>,
schedule: Array<Schedule>
}

const ScheduleSection: React.FC<SpeakersSectionProps> = ({ speakers, schedule }) => {
const getPillColor = (tech: string) => {
switch (tech) {
case "Carreira":
return "blue2"
case "Machine Learning":
return "secondary"
case "Web":
return "danger"
case "UX/UI":
return "info"
case "Back-end":
return "warning"
case "Qualidade de Software":
return "soft-blue";
case "Android":
return "soft-green";
default:
return "success"
}
}


return (
<>
<div className={styles.ScheduleSection}>
<Container>
<Row tag="header" className={styles.ScheduleHeaderTitle}>
<h2>Programação</h2>
</Row>
</Container>
<div className={styles.ScheduleWrapper}>
{speakers.length &&
<div className={styles.ScheduleTable}>
<Row className={styles.ScheduleHeader}>
Cronograma 06 Abril
</Row>
<Row className={styles.ScheduleBody}>
{
schedule.map((schedule, index) => {
return (
<Row key={`schedule-${index}`} className={styles.ScheduleItem}>
<ScheduleTime initialTime={schedule.start} />
<Col xxl={11} sm={12}>
<Row >
{
schedule.speeches?.map((speech, index) => {
const speaker = speech.speakerKey ? speakers.find(speakerObj => {
return speakerObj.key == speech.speakerKey
}) : null;
if (speech?.topic) {
return <><Row>
<Col>
{speech.topic}
</Col>
</Row>
</>
} else if (speaker) {
return (<>
<Col>
<Row>
<Col lg={10} className={styles.SpeakerTopic}>{speaker.topic}</Col>
<Col lg={2}>
{speaker.tech && <span><Badge color={getPillColor(speaker.tech)} pill>{speaker.tech}</Badge></span>}
</Col>
</Row>
<Row><Col>
{speaker.name}
</Col>
</Row>

</Col>
</>
)
} else <></>

})
}
</Row>
</Col>
</Row>)
})
}</Row>
</div>
}
</div>
</div>
</>
);
};

export default ScheduleSection;
26 changes: 26 additions & 0 deletions src/components/iwd-2024/schedule-section/schedule-time.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*eslint-disable*/

import React from "react";
import {
Col
} from "reactstrap";

import styles from "./Schedule.module.css";

interface ScheduleTimeProps {
initialTime: string;
endTime?: string;
}


const ScheduleTime: React.FC<ScheduleTimeProps> = (props) => {

return (
<Col xxl={1} sm={12} className={`${styles.ScheduleTime} d-xxl-grid justify-content-sm-start justify-content-xxl-end`}>
<span>{props.initialTime}</span>
<span className={styles.opacity50}>{props.endTime}</span>
</Col>
);
};

export default ScheduleTime;
2 changes: 1 addition & 1 deletion src/models/schedule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export type Speeches = (ScheduleSpeech | ScheduleSpeedSpeech);

export interface ScheduleSpeech {
topic: string;
speakerSlugs: Array<string>;
speakerKey: string;
path: SpeechesPath;
start: string;
end: string;
Expand Down
22 changes: 12 additions & 10 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@ import SponsorsSection from "components/iwd-2024/sponsors-section/sponsors-secti
import CountdownTimer from "components/iwd-2024/countdown/countdown-timer";
import OlderEvenstsSection from "components/iwd-2024/older-events-section/older-events-section";

import { EventLocationSection } from "components/iwd-2024/event-location";
import ScheduleSection from "components/iwd-2024/schedule-section/schedule-section";

import ErrorBoundary from '../components/error-boundary';
import { HeroSection } from "components/hero-section/iwd-2024";
import { Testimonials } from "components/iwd-2024/testimonials";
import { getSponsors } from "back-features/sponsors";
import { getSpeakers } from "back-features/speakers";
import { getSchedule } from "back-features/schedule";

// https://alvarotrigo.com/blog/css-animations-scroll/

Expand Down Expand Up @@ -67,20 +70,19 @@ const Home = ({ speakers, sponsors, schedule }: HomePageProps) => {
<SpeakerSection speakers={speakers} />

<Testimonials />
{/* <section className={`${styles.Section} Section`}>
<SpeakerSection speakers={speakers} />
</section>
*/}

<section className={`${styles.Section} Section`}>
<SponsorsSection sponsors={sponsors} />
<ScheduleSection schedule={schedule} speakers={speakers} />
</section>


{/*<section className={`${styles.Section} Section`}>
<section className={`${styles.Section} Section`}>
<EventLocationSection />
</section>
*/}

<section className={`${styles.Section} Section`}>
<SponsorsSection sponsors={sponsors} />
</section>

</ErrorBoundary>
</>
);
Expand All @@ -92,7 +94,7 @@ export async function getServerSideProps() {
props: {
speakers: await getSpeakers(),
sponsors: await getSponsors(),
schedule: [],//await getSchedule(),
schedule: await getSchedule(),
},
};
} catch (error) {
Expand Down

0 comments on commit 44aef1d

Please sign in to comment.