diff --git a/frontend/public/locales/en/translation.json b/frontend/public/locales/en/translation.json
index fc92bd59..6b7ea890 100644
--- a/frontend/public/locales/en/translation.json
+++ b/frontend/public/locales/en/translation.json
@@ -9,8 +9,10 @@
"joinMeetup": "Join our Meetup",
"ourMeetups": "Our meetups",
"pastEvents": "past events",
+ "upcomingEvents": "UPCOMING EVENTS",
"viewMore": "view more",
"communityGrowing": "Our community is growing",
+ "viewMoreEvents": "View more events",
"allEvents": "View All Events",
"learn": "LEARN + SHARE + BUILD",
"about": "Ethereum Buenos Aires is about empowering participants to shape this new world,\n while cementing the Latin American region as a thriving hub of Ethereum blockchain innovation.",
diff --git a/frontend/public/locales/es/translation.json b/frontend/public/locales/es/translation.json
index 8399da39..c061ab69 100644
--- a/frontend/public/locales/es/translation.json
+++ b/frontend/public/locales/es/translation.json
@@ -9,8 +9,10 @@
"joinMeetup": "Unite al Meetup",
"ourMeetups": "Meetups",
"pastEvents": "Eventos Anteriores",
+ "upcomingEvents": "Próximos eventos",
"viewMore": "ver más",
"communityGrowing": "Nuestra comunidad crece",
+ "viewMoreEvents": "Ver más eventos",
"allEvents": "Ver todos los eventos",
"learn": "APRENDER + COMPARTIR + CONSTRUIR",
"about": "Ethereum Buenos Aires tiene como fin empoderar a sus participantes para darle forma a este nuevo mundo,\n y potenciar a Latinoamérica como un vibrante hub de inovación global de Ethereum",
diff --git a/frontend/public/locales/pt/translation.json b/frontend/public/locales/pt/translation.json
index 6077a828..15b693e7 100644
--- a/frontend/public/locales/pt/translation.json
+++ b/frontend/public/locales/pt/translation.json
@@ -9,8 +9,10 @@
"joinMeetup": "Una-se ao Meetup",
"ourMeetups": "Nossos Meetups",
"pastEvents": "Eventos Passados",
+ "upcomingEvents": "Próximos eventos",
"viewMore": "ver mais",
"communityGrowing": "A nossa comunidade está crescendo",
+ "viewMoreEvents": "Ver mais eventos",
"allEvents": "Ver todos os eventos",
"learn": "APRENDER + COMPARTILHAR + CONSTRUIR",
"about": "Ethereum Buenos Aires tem por objetivo empoderar os seus participantes para dar forma a este novo mundo,\n enquanto a América Latina é alicerçada como hub de inovação de Blockchain",
diff --git a/frontend/src/components/common/banner/banner.scss b/frontend/src/components/common/banner/banner.scss
index 4ed54168..ccb721e4 100644
--- a/frontend/src/components/common/banner/banner.scss
+++ b/frontend/src/components/common/banner/banner.scss
@@ -7,6 +7,16 @@
height: 600px;
display: flex;
+
+ @media (max-width: 760px) {
+ height: 800px;
+ }
+
+ @media (max-width: 480px) {
+ height: 800px;
+
+ }
+
&.top {
img {
object-position: center top;
@@ -23,12 +33,11 @@
.banner__text {
position: absolute;
width: 100%;
- top: 35%;
+ top: 30%;
text-align: center;
&.lightTheme {
top: 28%;
-
h4 {
color: $violetCard;
}
@@ -48,7 +57,9 @@
}
@media (max-width: 480px) {
- font-size: 24px;
+ font-size: 22px;
+ margin: 40px 0;
+
}
}
}
diff --git a/frontend/src/components/common/banner/styles.js b/frontend/src/components/common/banner/styles.js
index 7e69ef7c..c762a397 100644
--- a/frontend/src/components/common/banner/styles.js
+++ b/frontend/src/components/common/banner/styles.js
@@ -11,5 +11,7 @@ export const MeetupButton = styled(OrangeButton)`
display: inline-flex;
padding: 5px 15px;
- margin-top: 60px;
+ margin: 80px 0 0 0;
`;
+
+export const Button = styled.div``;
diff --git a/frontend/src/components/common/paragraph/index.js b/frontend/src/components/common/paragraph/index.js
new file mode 100644
index 00000000..cc5496f7
--- /dev/null
+++ b/frontend/src/components/common/paragraph/index.js
@@ -0,0 +1,24 @@
+import React from 'react';
+// i18n
+import { useTranslation } from 'react-i18next';
+
+const Paragraph = () => {
+ // Hooks
+ const { t } = useTranslation();
+
+ return (
+
+ );
+};
+
+export default Paragraph;
diff --git a/frontend/src/components/common/paragraph/paragraph.scss b/frontend/src/components/common/paragraph/paragraph.scss
new file mode 100644
index 00000000..a815a86d
--- /dev/null
+++ b/frontend/src/components/common/paragraph/paragraph.scss
@@ -0,0 +1,64 @@
+@import '../../../styles/variables.scss';
+
+.social {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ margin-top: 110px;
+ flex-direction: column;
+
+ .container-social {
+ display: flex;
+ justify-content: center;
+ width: 90%;
+ flex-wrap: wrap;
+ margin-top: 40px;
+
+ .box-social {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ margin: 20px 30px;
+ }
+ }
+
+ .img {
+ &.twitter {
+ img {
+ width: 40px;
+ }
+ }
+ &.spotify {
+ img {
+ max-width: 160px;
+ }
+ }
+ img {
+ max-height: 60px;
+ max-width: 120px;
+ }
+ }
+}
+
+.blog-iframe {
+ border:1px solid #EEE;
+ background:white;
+
+ button {
+ .rightButton {
+ background: $violetCard !important;
+ }
+ }
+}
+
+.sub-title p {
+ margin: 0;
+ color: rgba(30, 19, 70, 0.73);
+ font-family: 'Comfortaa';
+ font-size: 15px;
+ font-weight: 700;
+ letter-spacing: 2.4px;
+ line-height: 28px;
+ text-align: center;
+ text-transform: uppercase;
+}
diff --git a/frontend/src/components/common/social/Social.js b/frontend/src/components/common/social/Social.js
index f3e75132..e55da0c3 100644
--- a/frontend/src/components/common/social/Social.js
+++ b/frontend/src/components/common/social/Social.js
@@ -70,9 +70,14 @@ const Social = () => {
);
})}
-
+
);
};
diff --git a/frontend/src/components/common/social/social.scss b/frontend/src/components/common/social/social.scss
index 46a364db..a815a86d 100644
--- a/frontend/src/components/common/social/social.scss
+++ b/frontend/src/components/common/social/social.scss
@@ -43,6 +43,12 @@
.blog-iframe {
border:1px solid #EEE;
background:white;
+
+ button {
+ .rightButton {
+ background: $violetCard !important;
+ }
+ }
}
.sub-title p {
diff --git a/frontend/src/components/common/stats/Stats.js b/frontend/src/components/common/stats/Stats.js
index 60fa6d62..2cae5fbd 100644
--- a/frontend/src/components/common/stats/Stats.js
+++ b/frontend/src/components/common/stats/Stats.js
@@ -1,4 +1,8 @@
-import React from 'react';
+import React, { useState, useEffect } from 'react';
+import axios from 'axios';
+
+import API_ROUTES from '../../../lib/api';
+
// i18n
import { useTranslation } from 'react-i18next';
@@ -7,10 +11,21 @@ import './stats.scss';
const Stats = () => {
// Hooks
+ const [members, setMembers] = useState(null);
+
const { t } = useTranslation();
+ useEffect(() => {
+ const requestMembers = async () => {
+ const response = await axios.get(API_ROUTES.stats);
+ setMembers(response.data.amount_of_members);
+ };
+
+ requestMembers();
+ }, [setMembers]);
+
const stats = [
- { id: 'members', value: '+1600', name: t('members') },
+ { id: 'members', value: `+${members}`, name: t('members') },
{ id: 'meetupsPerMonth', value: 'x1', name: t('preMonth') },
{ id: 'attendeesPerMeetup', value: '+80', name: t('atendees') },
{ id: 'averageRating', value: '4.8', name: t('averageRating') },
diff --git a/frontend/src/components/home/community/Community.js b/frontend/src/components/home/community/Community.js
index 02981a40..843dc90e 100644
--- a/frontend/src/components/home/community/Community.js
+++ b/frontend/src/components/home/community/Community.js
@@ -1,4 +1,4 @@
-import React, { Component } from 'react';
+import React from 'react';
import { Grid } from '@material-ui/core';
// i18n
@@ -41,16 +41,6 @@ export default () => {
return (
-
-
diff --git a/frontend/src/components/home/community/community.scss b/frontend/src/components/home/community/community.scss
index ba665e03..6c7ca682 100644
--- a/frontend/src/components/home/community/community.scss
+++ b/frontend/src/components/home/community/community.scss
@@ -2,6 +2,8 @@
.community {
box-sizing: border-box;
+
+
&__header {
margin-bottom: 110px;
diff --git a/frontend/src/components/home/events/Events.js b/frontend/src/components/home/events/Events.js
index f870d1a7..7965fe63 100644
--- a/frontend/src/components/home/events/Events.js
+++ b/frontend/src/components/home/events/Events.js
@@ -10,12 +10,13 @@ import { withRouter } from 'react-router-dom';
import Button from '../../common/button/Button';
import EventCard from '../../common/eventCard/EventCard';
+import UpcomingEventCard from '../../events/upcomingEventCard/UpcomingEventCard';
import './events.scss';
// lib
-import { getFormattedDate, getI18nField } from '../../../lib/helpers';
+import { getFormattedDate, getFormattedTime, getI18nField } from '../../../lib/helpers';
-const Events = ({ events, history }) => {
+const Events = ({ events, history, upcomingEvents }) => {
// Hooks
const { t, i18n } = useTranslation();
@@ -33,12 +34,45 @@ const Events = ({ events, history }) => {
return (
+
+
-
-
{t('ourMeetups')}
+
+ {upcomingEvents && upcomingEvents.length > 0 && (
+
+
+
{t('upcomingEvents')}
+
+
+ {upcomingEvents.map(event => {
+ const address = `${event.place_street} ${event.place_number}, ${event.place_city}`;
+ const eventDate = getFormattedDate(event.date);
+ const eventTime = getFormattedTime(event.date);
+
+ return (
+ handleEventCardClick(event.id)}
+ id={event.id}
+ title={getI18nField(event, 'title', i18n.language)}
+ date={eventDate}
+ time={eventTime}
+ address={address}
+ url={event.meetup_url}
+ />
+ );
+ })}
+
+
+ )}
+
+
{t('pastEvents')}
+
{orderedEventsToDisplay &&
orderedEventsToDisplay.map(event => {
@@ -82,6 +116,16 @@ Events.propTypes = {
history: PropTypes.shape({
push: PropTypes.func,
}).isRequired,
+ upcomingEvents: PropTypes.arrayOf(
+ PropTypes.shape({
+ id: PropTypes.number,
+ title_es: PropTypes.string,
+ title_en: PropTypes.string,
+ title_pt: PropTypes.string,
+ date: PropTypes.string,
+ hasPassed: PropTypes.bool,
+ })
+ ).isRequired,
};
export default withRouter(Events);
diff --git a/frontend/src/components/home/events/events.scss b/frontend/src/components/home/events/events.scss
index 2f3a42b8..6ad42296 100644
--- a/frontend/src/components/home/events/events.scss
+++ b/frontend/src/components/home/events/events.scss
@@ -1,5 +1,56 @@
@import '../../../styles/variables.scss';
+
+.events {
+ background: white;
+
+ &__subtitle {
+ padding: 0 5%;
+
+ h4 {
+ color: $violetTitle;
+ text-transform: uppercase;
+ font-family: Comfortaa;
+ font-size: 15px;
+ line-height: 28px;
+ font-weight: bold;
+ letter-spacing: 2px;
+ margin-bottom: 30px;
+
+ @media (max-width: 480px) {
+ margin-top: 50px;
+ }
+ }
+ }
+
+ &__container {
+ padding-left: calc(5% - 16px);
+ padding-right: calc(5% - 16px);
+ }
+
+ &__upcoming-home {
+ z-index: 10;
+ background: transparent;
+ margin-bottom: 80px;
+ width: 100%;
+ }
+
+ &__past-events {
+ margin-bottom: 110px;
+
+ &__btn {
+ display: flex;
+ justify-content: center;
+ height: 93px;
+
+ button {
+ margin-top: 40px;
+ }
+ }
+ }
+}
+
+
.title {
display: flex;
text-align: center;
@@ -10,7 +61,7 @@
.cards-events {
.title {
- margin-top: 120px;
+ margin-top: 80px;
color: $violetTitle;
}
}
@@ -82,15 +133,24 @@
background-position: center;
background-repeat: no-repeat;
background-size: 500px;
- height: 900px;
+ height: 100%;
max-width: 100%;
display: flex;
flex-direction: column;
.events {
- height: 900px;
+ height: 100%;
background-color: transparent;
}
+
+ @media (max-width: 480px) {
+ height: 1400px;
+
+ .events {
+ height: 1400px;
+ }
+
+ }
}
.center {
@@ -98,11 +158,11 @@
justify-content: center;
.title {
- margin: 140px 0 40px 0;
+ margin: 70px 0 40px 0;
}
}
.button-events {
- margin-top: 40px;
+ margin-top: 50px;
text-align: center;
}
diff --git a/frontend/src/lib/api.js b/frontend/src/lib/api.js
index ba1d5c9d..dd88594b 100644
--- a/frontend/src/lib/api.js
+++ b/frontend/src/lib/api.js
@@ -3,7 +3,8 @@ const API_URL = process.env.REACT_APP_API_ROOT;
const API_ROUTES = {
events: `${API_URL}/api/v1/events/?ordering=-date`,
calendar: `${API_URL}/api/v1/calendar/`,
- baseEvent: `${API_URL}/api/v1/events`,
+ baseEvent: `${API_URL}/api/v1/events/`,
+ stats: `${API_URL}/api/v1/meetup-data/`,
};
export { API_ROUTES as default, API_URL };
diff --git a/frontend/src/pages/events/Events.js b/frontend/src/pages/events/Events.js
index 87688bfd..c7286ea7 100644
--- a/frontend/src/pages/events/Events.js
+++ b/frontend/src/pages/events/Events.js
@@ -1,7 +1,7 @@
import React from 'react';
// proptypes
-import { arrayOf } from 'prop-types';
+import PropTypes, { arrayOf } from 'prop-types';
// material ui
import { Grid } from '@material-ui/core';
@@ -27,7 +27,7 @@ import { eventType } from '../../lib/types';
import './events.scss';
// lib
-import { getFormattedDate, getFormattedTime, getI18nField } from '../../lib/helpers'
+import { getFormattedDate, getFormattedTime, getI18nField } from '../../lib/helpers';
const Events = ({ getMoreEvents, showMore, pastEvents, upcomingEvents, handleEventCardClick }) => {
// Hooks
@@ -44,14 +44,14 @@ const Events = ({ getMoreEvents, showMore, pastEvents, upcomingEvents, handleEve
upcoming events
- {upcomingEvents.map((event, i) => {
+ {upcomingEvents.map(event => {
const address = `${event.place_street} ${event.place_number}, ${event.place_city}`;
const eventDate = getFormattedDate(event.date);
const eventTime = getFormattedTime(event.date);
return (
handleEventCardClick(event.id)}
id={event.id}
title={getI18nField(event, 'title', i18n.language)}
@@ -72,11 +72,11 @@ const Events = ({ getMoreEvents, showMore, pastEvents, upcomingEvents, handleEve
{pastEvents &&
- pastEvents.map((event, i) => {
+ pastEvents.map(event => {
const eventDate = getFormattedDate(event.date);
return (
-
+
handleEventCardClick(event.id)}
@@ -91,7 +91,7 @@ const Events = ({ getMoreEvents, showMore, pastEvents, upcomingEvents, handleEve
- {showMore && }
+ {showMore && }
@@ -107,11 +107,17 @@ Events.propTypes = {
// non required attributes
pastEvents: arrayOf(eventType),
upcomingEvents: arrayOf(eventType),
+ getMoreEvents: PropTypes.func,
+ showMore: PropTypes.func,
+ handleEventCardClick: PropTypes.func,
};
Events.defaultProps = {
pastEvents: [],
upcomingEvents: [],
+ getMoreEvents: () => {},
+ showMore: () => {},
+ handleEventCardClick: () => {}
};
export default Events;
diff --git a/frontend/src/pages/home/Home.container.js b/frontend/src/pages/home/Home.container.js
index 2584b88e..87fa86a9 100644
--- a/frontend/src/pages/home/Home.container.js
+++ b/frontend/src/pages/home/Home.container.js
@@ -1,9 +1,6 @@
import React, { useEffect } from 'react';
import { useDispatch, useSelector } from 'react-redux';
-// propstypes
-import { number, string } from 'prop-types';
-
// components
import Home from './Home';
@@ -15,18 +12,15 @@ const HomeContainer = () => {
// selectors
const events = useSelector(state => state.events.data);
+ const upcomingEvents = useSelector(state => state.events.upcomingEvents);
useEffect(() => {
dispatch(requestEvents());
}, []);
- return
;
+ return
;
};
-HomeContainer.propTypes = {
- // non required attributes
- totalEventsCount: number,
- nextApi: string,
-};
+HomeContainer.propTypes = {};
export default HomeContainer;
diff --git a/frontend/src/pages/home/Home.js b/frontend/src/pages/home/Home.js
index 47cc28c8..e692581f 100644
--- a/frontend/src/pages/home/Home.js
+++ b/frontend/src/pages/home/Home.js
@@ -10,6 +10,7 @@ import Footer from '../../components/footer';
import Community from '../../components/home/community/Community';
import Partners from '../../components/home/partners/Partners';
import Events from '../../components/home/events/Events';
+import Paragraph from '../../components/common/paragraph';
import Social from '../../components/common/social/Social';
import Banner from '../../components/common/banner/Banner';
@@ -22,7 +23,7 @@ import './home.scss';
// types
import { eventType } from '../../lib/types';
-const Home = ({ events }) => {
+const Home = ({ events, upcomingEvents }) => {
// Hooks
const { t } = useTranslation();
@@ -31,7 +32,8 @@ const Home = ({ events }) => {
-
+
+
@@ -43,6 +45,7 @@ const Home = ({ events }) => {
Home.propTypes = {
events: arrayOf(eventType).isRequired,
+ upcomingEvents: arrayOf(eventType).isRequired,
};
export default Home;
diff --git a/frontend/yarn.lock b/frontend/yarn.lock
index 1534ff1a..e776272b 100644
--- a/frontend/yarn.lock
+++ b/frontend/yarn.lock
@@ -8910,7 +8910,6 @@ npm@^6.13.4:
cmd-shim "^3.0.3"
columnify "~1.5.4"
config-chain "^1.1.12"
- debuglog "*"
detect-indent "~5.0.0"
detect-newline "^2.1.0"
dezalgo "~1.0.3"
@@ -8925,7 +8924,6 @@ npm@^6.13.4:
has-unicode "~2.0.1"
hosted-git-info "^2.8.5"
iferr "^1.0.2"
- imurmurhash "*"
infer-owner "^1.0.4"
inflight "~1.0.6"
inherits "^2.0.4"
@@ -8944,14 +8942,8 @@ npm@^6.13.4:
libnpx "^10.2.0"
lock-verify "^2.1.0"
lockfile "^1.0.4"
- lodash._baseindexof "*"
lodash._baseuniq "~4.6.0"
- lodash._bindcallback "*"
- lodash._cacheindexof "*"
- lodash._createcache "*"
- lodash._getnative "*"
lodash.clonedeep "~4.5.0"
- lodash.restparam "*"
lodash.union "~4.6.0"
lodash.uniq "~4.5.0"
lodash.without "~4.4.0"
@@ -13427,6 +13419,11 @@ websocket-extensions@>=0.1.1:
resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29"
integrity sha512-nqHUnMXmBzT0w570r2JpJxfiSD1IzoI+HGVdd3aZ0yNi3ngvQ4jv1dtHt5VGxfI2yj5yqImPhOK4vmIh2xMbGg==
+websocket-extensions@^0.1.4:
+ version "0.1.4"
+ resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42"
+ integrity sha512-OqedPIGOfsDlo31UNwYbCFMSaO9m9G/0faIHj5/dZFDMFqPTcx6UwqyOy3COEaEOg/9VsGIpdqn62W5KhoKSpg==
+
whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3, whatwg-encoding@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0"