diff --git a/components/row-events.js b/components/row-events.js index 6a3ae1bca..44cca0abb 100644 --- a/components/row-events.js +++ b/components/row-events.js @@ -1,10 +1,25 @@ import React from 'react'; -import { Card, Icon } from 'semantic-ui-react'; +import { Card, Icon, Image } from 'semantic-ui-react'; import format from 'date-fns/format'; +import PropTypes from 'prop-types'; + +const extractImage = input => { + let src = ''; + if (input) { + const regex = / { return ( - + + {props.description ? ( + + ) : ( +
+ )} {props.name}
@@ -46,4 +61,12 @@ const RowEvent = props => { ); }; +RowEvent.defaultProps = { + fluid: false, +}; + +RowEvent.propTypes = { + fluid: PropTypes.bool, +}; + export default RowEvent; diff --git a/pages/events.js b/pages/events.js index 4643fcf8b..57b73ab02 100644 --- a/pages/events.js +++ b/pages/events.js @@ -65,6 +65,7 @@ class Events extends React.Component { venue={event.venue} link={event.link} status={event.status} + fluid={true} /> ))} @@ -84,6 +85,7 @@ class Events extends React.Component { venue={event.venue} link={event.link} status={event.status} + fluid={true} /> ))} diff --git a/pages/index.js b/pages/index.js index 4023f81ca..d0bb6fe55 100644 --- a/pages/index.js +++ b/pages/index.js @@ -1,8 +1,69 @@ import React from 'react'; +import Link from 'next/link'; +import { Card, Button, Divider } from 'semantic-ui-react'; +import { indexPageMeetupURL, reverseProxyCORS } from '../utils/urls'; +import RowEvent from '../components/row-events'; import publicPage from '../hocs/public-page'; +const indexPageLearns = [ + { + link: '#', + title: 'ReactJS', + subject: 'Frontend Web Development', + image: '', + }, + { + link: '#', + title: 'Laravel', + subject: 'Backend Web Development', + image: '', + }, + { + link: '#', + title: 'Go', + subject: 'Programming Language', + image: '', + }, + { + link: '#', + title: 'Security', + subject: 'Networking', + image: '', + }, + { + link: '#', + title: 'Blockchain', + subject: 'Distributed Computing', + image: '', + }, + { + link: '#', + title: 'Android', + subject: 'Mobile Development', + image: '', + }, +]; + class Home extends React.Component { + state = { + indexPageEvent: '', + }; + + async componentDidMount() { + try { + const requestEvent = await fetch( + `${reverseProxyCORS}${indexPageMeetupURL}`, + ); + const requestEventJson = await requestEvent.json(); + await this.setState({ + indexPageEvent: requestEventJson[0], + }); + } catch (err) { + console.log(err); + } + } + render() { return (
@@ -10,27 +71,151 @@ class Home extends React.Component {
- words + words +
+

+ On a mission to improve the state of tech in India +

+
+ +
+
+
+

Open Source Learing Guides

+

+ Our guides are crowd-sourced recommendations of free online + resource to learn any technology +

+
+ + {indexPageLearns.map(learn => ( + + ))} + +
+ + + +
+
+ +
+
+

Off line Co-Learning Spaces

+

+ Physical spaces where you can come down to engage in self + learing, peer-learning and collaboration. +

+
+
+ These are dynamic learning environment where everyone learns + at their own pace and compliments each other. We also organize + weekly group activities like Open source evenings, casual + hackathons etc. +
+
+ + + +
+
+ +
+
+

Online & Offline Events

+

+ We do frequent online and offline events, covering broad range + of topics. +

+
+ {this.state.indexPageEvent ? ( + + ) : ( +
+ )} +
+ + +
); diff --git a/static/banner1280x370.png b/static/banner1280x370.png new file mode 100644 index 000000000..d1fb5275e Binary files /dev/null and b/static/banner1280x370.png differ diff --git a/static/learnIcons/android.png b/static/learnIcons/android.png new file mode 100644 index 000000000..d82f4a8ea Binary files /dev/null and b/static/learnIcons/android.png differ diff --git a/static/learnIcons/blockchain.png b/static/learnIcons/blockchain.png new file mode 100644 index 000000000..a0c1e1ef1 Binary files /dev/null and b/static/learnIcons/blockchain.png differ diff --git a/static/learnIcons/go.png b/static/learnIcons/go.png new file mode 100644 index 000000000..02a757e7b Binary files /dev/null and b/static/learnIcons/go.png differ diff --git a/static/learnIcons/laravel.png b/static/learnIcons/laravel.png new file mode 100644 index 000000000..cf2d069de Binary files /dev/null and b/static/learnIcons/laravel.png differ diff --git a/static/learnIcons/react.png b/static/learnIcons/react.png new file mode 100644 index 000000000..aef26a251 Binary files /dev/null and b/static/learnIcons/react.png differ diff --git a/static/learnIcons/security.png b/static/learnIcons/security.png new file mode 100644 index 000000000..167ebee02 Binary files /dev/null and b/static/learnIcons/security.png differ diff --git a/utils/urls.js b/utils/urls.js index 068bd6d45..c6fac13a6 100644 --- a/utils/urls.js +++ b/utils/urls.js @@ -4,4 +4,7 @@ export const pastEventsMeetupURL = export const futureEventsMeetupURL = 'https://api.meetup.com/coderplex/events?only=id%2Cname%2Ctime%2Cyes_rsvp_count%2Cdescription%2Cvenue%2Cstatus%2Clink'; +export const indexPageMeetupURL = + 'https://api.meetup.com/coderplex/events?scroll=future_or_past&photo-host=public&page=1&sig_id=216741149&only=id%2Ctime%2Cyes_rsvp_count%2Cvenue%2Clink%2Cstatus%2Cname%2Cdescription&sig=fabc8645c9e317083cc1f29ff0e8292b88b5e515'; + export const reverseProxyCORS = 'https://cors.now.sh/'; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy