-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: made cards and developed event section (anitab-org#123) #171
Changes from 1 commit
88b86e9
7ffeb44
a5f6955
6e65c2e
47a8026
ed7c1be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React from 'react'; | ||
import {Text, Image, StyleSheet, View} from 'react-native'; | ||
|
||
const Badge = (props) => { | ||
return ( | ||
<View style={styles.container}> | ||
<Image style={styles.image} source={props.link} /> | ||
<Text style={styles.description}>{props.text}</Text> | ||
</View> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flexDirection: 'row', | ||
flexWrap: 'wrap', | ||
marginTop: 16, | ||
}, | ||
image: { | ||
width: 32, | ||
height: 32, | ||
}, | ||
description: { | ||
fontSize: 16, | ||
color: '#103B81', | ||
fontWeight: 200, | ||
marginLeft: 16, | ||
marginTop:8, | ||
} | ||
}); | ||
|
||
export default Badge; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
import React from 'react'; | ||
import {Text, StyleSheet, View, Linking} from 'react-native'; | ||
import ScaledImage from '../../ScaledImage'; | ||
import { withCard } from './../../../Decorators/Card'; | ||
import Badge from './CardBadge'; | ||
|
||
const EventCard = ({ props, isOver }) => { | ||
return ( | ||
<View style={styles.card} > | ||
<ScaledImage width={286} source={props.highlights.source} /> | ||
<Text style={styles.title}>{props.title}</Text> | ||
<Badge text={props.date} link={require('./../../../assets/events_and_highlights/calendar.png')} /> | ||
<Badge text={props.location} link={require('./../../../assets/events_and_highlights/location.png')} /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suggest using Icons instead of images (in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. for this we have to to install a dependency can i can do that like material or others There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please move it to content js so each card have one source of truth regards the content. Thanks. |
||
<Badge text={props.timings} link={require('./../../../assets/events_and_highlights/time.png')} /> | ||
<View style={{marginTop: 32}}> | ||
{props.description.map((detail,index) => ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. good call with index as key. |
||
<Text | ||
style={{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please keep styles separately |
||
color: '#103B81', | ||
fontSize: 16, | ||
fontWeight: '200' | ||
}} | ||
> | ||
{detail.par} | ||
</Text> | ||
))} | ||
</View> | ||
<Text style={{ | ||
color: '#103B81', | ||
fontSize: 16, | ||
fontWeight: '400', | ||
marginTop: 32, | ||
}} | ||
onPress={() => {Linking.openURL(props.know_more.link)}} | ||
> | ||
{props.know_more.par} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it's just the words There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. know more has to substituted by para given in content i have asked it in issue |
||
</Text> | ||
</View> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
card: { | ||
flex: 1, | ||
width: 286, | ||
borderRadius: 4, | ||
overflow: 'hidden', | ||
}, | ||
cardContent: { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not used anywhere |
||
marginHorizontal: 18, | ||
maeginVertical: 10 | ||
}, | ||
title: { | ||
color: '#103B81', | ||
fontWeight: '400', | ||
fontSize: 16, | ||
marginTop: 12, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should be |
||
}, | ||
desc: { | ||
fontSize: 16, | ||
color: '#103B81', | ||
fontWeight: 200, | ||
marginTop: 16, | ||
}, | ||
}) | ||
|
||
export default withCard(EventCard); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import React from 'react'; | ||
import {View , StyleSheet, Text} from 'react-native'; | ||
import EventCard from './Cards'; | ||
import {getevents_highlights} from './../../content/events_and_highlights'; | ||
import SectionSubheader from './../SectionSubheader'; | ||
|
||
const events_highlight = getevents_highlights(); | ||
|
||
class Events extends React.Component { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Use Functional components There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please tell me what difference it will make as class component are better as for further usage of states |
||
render() { | ||
return ( | ||
<View style={styles.container} > | ||
<SectionSubheader | ||
title={events_highlight.sections[0].title} | ||
/> | ||
{events_highlight.sections[0].content.map((detail,index) => { | ||
return <Text style={styles.description} key={index}>{detail.par}</Text>; | ||
})} | ||
<View | ||
style={{ | ||
flexDirection: 'row', | ||
flexWrap: 'wrap', | ||
marginTop: 30, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make this a power of 2, maybe 32 |
||
}} | ||
> | ||
{events_highlight.sections[1].events.map((event_detail,index) => ( | ||
<EventCard | ||
key={event_detail.title} | ||
props={event_detail} | ||
backgroundColor="#e7edfd" | ||
padding={12} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make this a power of 2, maybe 16 |
||
/> | ||
))} | ||
</View> | ||
</View> | ||
); | ||
} | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
width: '80%', | ||
alignItems: 'left', | ||
paddingLeft: 16, | ||
paddingRight: 16, | ||
marginTop: 30, | ||
}, | ||
description: { | ||
flex: 1, | ||
marginTop: 20, | ||
paddingLeft: 16, | ||
fontSize: 18, | ||
flexGrow: 1, | ||
fontWeight: 150, | ||
color: '#103B81', | ||
textAlign: 'left', | ||
} | ||
}); | ||
export default Events; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
const events_highlight = { | ||
sections: [ | ||
{ | ||
title: 'Our Events and Highlights', | ||
content: [ | ||
{ | ||
par: 'AnitaB.org Open Source Events convenes members from all backgrounds and levels of expertise throughout the year to bridge the diversity gap in Open Source development.' | ||
}, | ||
{ | ||
par: 'Our events aim to give members insights from industry experts and female-identifying leaders on a variety of topics promoting Open Source, and covering stages of Open Source development right from Introduction to Quality Assurance.' | ||
} | ||
] | ||
}, | ||
{ | ||
events: [ | ||
{ | ||
title: 'Why I contribute to Open source?', | ||
date: 'July 4, 2020', | ||
location: 'Virtual', | ||
timings: '1am (UTC)', | ||
description: [ | ||
{ | ||
par: 'Heard about Open Source, not sure what’s in it for you? Need a boost to begin?' | ||
}, | ||
{ | ||
par: 'This event will give you an understanding of the motivation behind individuals who contribute to open source' | ||
}, | ||
{ | ||
par: 'Open Source contributors with varying experiences will be there to share their journey, and answer your questions!' | ||
} | ||
], | ||
highlights:{ | ||
source: require('./../assets/events_and_highlights/1.png'), | ||
}, | ||
know_more: | ||
{ | ||
par: 'Feel free to contact AnitaB.org Open Source on Zulip if you need any further information about this event.', | ||
link: 'https://anitab-org.zulipchat.com', | ||
} | ||
}, | ||
{ | ||
title: 'Engaging Open Source community in Quality Assurance', | ||
date: 'August 9, 2020', | ||
location: 'Virtual', | ||
timings: '9am (EST)', | ||
description: [ | ||
{ | ||
par: 'Wondered how Quality Assurance (QA) for software is performed in companies or what are the roles and responsibilities of an QA engineer?' | ||
}, | ||
{ | ||
par: 'This talk will help members grasp concepts of traditional QA methods such as formalized testing, writing and tracking bugs which are equally relevant for Open Source development.' | ||
}, | ||
{ | ||
par: 'We will explore the contrasting nature of software quality assurance under the Open Source model and traditional software development models. Consequently, their translation in practical advantages.' | ||
}, | ||
{ | ||
par: 'It will draw attention to pragmatic quality assurance practices in upstream Open Source projects like Fedora.' | ||
}, | ||
{ | ||
par: 'This will certainly give members a head-start by laying out some of the best practices and common challenges faced while quality testing Open Source products.' | ||
} | ||
], | ||
highlights:{ | ||
source: require('./../assets/events_and_highlights/2.png'), | ||
}, | ||
know_more: { | ||
par: 'Feel free to contact AnitaB.org Open Source on Zulip if you need any further information about this event.', | ||
link: 'https://anitab-org.zulipchat.com', | ||
} | ||
}, | ||
{ | ||
title: 'Hopper India 2020', | ||
date: 'August 6 — August 7,2020', | ||
location: 'Virtual', | ||
timings: '9:30am - 4pm (IST)', | ||
description: [ | ||
{ | ||
par: 'Our vibrant community of women in technology from Chennai, Delhi, Hyderabad, and Pune is coming together to present this two-day virtual event modeled after the popular Grace Hopper Celebration India (GHCI) conference for women in technology.' | ||
}, | ||
{ | ||
par: 'This immersive event brings together women technologists at all levels from industry, academia, research and startups to build connections, learn, and advance their careers.' | ||
}, | ||
{ | ||
par: 'Attend inspiring keynotes and sessions led by charismatic women carrying a zeal to learn, grow and lead.' | ||
}, | ||
{ | ||
par: 'Don’t miss out on the opportunity to network with peers, and gain important resources to help you succeed in and further your career.' | ||
}, | ||
{ | ||
par: 'Our Career Fair, hosting tech giants, research labs, and financial-tech companies, offers immense job opportunities to both students and professionals.' | ||
} | ||
], | ||
highlights:{ | ||
source: require('./../assets/events_and_highlights/3.png'), | ||
}, | ||
know_more: { | ||
par: 'Visit our official Grace Hopper Celebration India website for details about registration, eligibility, scholarships, conference sessions and FAQs.', | ||
link: 'https://ghcindia.anitab.org/', | ||
} | ||
}, | ||
{ | ||
title: 'Grace Hopper Celebration 2020', | ||
date: 'September 29 — October 3,2020', | ||
location: 'Virtual', | ||
timings: '11am - 3pm (PT)', | ||
description: [ | ||
{ | ||
par: 'AnitaB.org’s flagship event Grace Hopper Celebration brings the research and career interests of women in computing to the forefront.' | ||
}, | ||
{ | ||
par: 'Grace Hopper Celebration (GHC), world’s largest gathering of women technologists, commemorates, celebrates, fosters and encourages the magnificent women in technology who dared to shed their inhibitions, and recognized the genius in them.' | ||
}, | ||
{ | ||
par: 'Attend inspiring keynotes and sessions, network with peers, and gain important resources to help you succeed in and further your career.' | ||
}, | ||
{ | ||
par: 'The celebration consists of a combination of technical sessions, poster sessions, career fairs, award ceremonies and more.' | ||
} | ||
], | ||
highlights:{ | ||
source: require('./../assets/events_and_highlights/4.png'), | ||
}, | ||
know_more:{ | ||
par: 'Visit our official Grace Hopper Celebration website for details about registration, eligibility, scholarships, conference sessions and FAQs.', | ||
link: 'https://ghc.anitab.org', | ||
} | ||
} | ||
] | ||
} | ||
] | ||
}; | ||
|
||
export const getevents_highlights = () => { | ||
return events_highlight; | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isOver
is not being used anywhere. Please remove it if not requiredThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isOver is required