-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added data to content and added scrollview
- Loading branch information
Showing
10 changed files
with
145 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import React from 'react'; | ||
import ImageContent from './../ImageContent'; | ||
import SectionHeader from './../SectionHeader'; | ||
import { getEvents } from './../../content/our_events'; | ||
import { Box, Content, Description } from './styles'; | ||
|
||
|
||
function OurEvents() { | ||
const content = getEvents(); | ||
const renderContent = (index, section) => { | ||
return ( | ||
<Content key={index}> | ||
<SectionHeader title={section.title} /> | ||
{section.content.map((content, indx) => { | ||
return <Description key={indx}>{content.par}</Description>; | ||
})} | ||
</Content> | ||
); | ||
}; | ||
|
||
return ( | ||
<Box> | ||
{content.sections.map((section, index) => { | ||
return ( | ||
<ImageContent | ||
image={section.image.source} | ||
imageSide={index % 2 === 0 ? 'right' : 'left'} | ||
Children={() => renderContent(index, section)} | ||
/> | ||
); | ||
})} | ||
</Box> | ||
|
||
); | ||
} | ||
export default OurEvents; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import { View, Text, StyleSheet } from 'react-native'; | ||
import { styled } from 'react-native-reflect'; | ||
|
||
export const Box = styled(View, { | ||
flex: 1, | ||
width: '80%', | ||
flexDirection: 'column', | ||
paddingLeft: 16, | ||
paddingRight: 16, | ||
flexWrap: 'wrap', | ||
marginTop: 32, | ||
}); | ||
|
||
export const Content = styled(View, { | ||
flexDirection: 'column', | ||
paddingLeft: 16, | ||
marginRight:77, | ||
}); | ||
|
||
export const Description = styled(Text, { | ||
flex: 1, | ||
marginTop: 32, | ||
paddingLeft: 16, | ||
fontSize: 18, | ||
flexGrow: 1, | ||
fontWeight: 200, | ||
color: '#103B81', | ||
textAlign: 'left', | ||
}); | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
display: 'flex', | ||
flexDirection: 'row', | ||
flexWrap: 'wrap', | ||
marginTop: 18, | ||
marginBottom: 18, | ||
}, | ||
card: { | ||
width: '33%', | ||
minWidth: 251, | ||
}, | ||
cardMiddle: { | ||
alignItems: 'center', | ||
}, | ||
cardLast: { | ||
alignItems: 'flex-end', | ||
}, | ||
imageText: { | ||
fontSize: 14, | ||
fontWeight: '300', | ||
fontFamily: 'Avenir', | ||
textAlign: 'center', | ||
width: 180, | ||
flex: 1, | ||
color: '#103B81', | ||
}, | ||
description: { | ||
fontSize: 14, | ||
fontWeight: '300', | ||
color: '#103B81', | ||
marginLeft: 32, | ||
}, | ||
}); | ||
|
||
export default styles; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
const our_events={ | ||
sections: [ | ||
{ | ||
title: "EVENTS", | ||
image: { | ||
source:require("./../assets/our_events.png"), | ||
}, | ||
content: [ | ||
{ | ||
par : "We at AnitaB.org Open Source beleive in Inspiration through Action. To facilitate our Open Souce journey and continue the AnitaB.org legacy we conduct enthralling events all year long, with the purpose of bridging the gap between creative developers and our Open Source community. Keep scrolling to catch a glipse of few such events! ", | ||
} | ||
] | ||
}, | ||
{ | ||
title: "TITLE 2", | ||
image:{ | ||
source:require("./../assets/our_events.png"), | ||
}, | ||
content: [ | ||
{ | ||
par: "We at AnitaB.org Open Source beleive in Inspiration through Action. To facilitate our Open Souce journey and continue the AnitaB.org legacy we conduct enthralling events all year long, with the purpose of bridging the gap between creative developers and our Open Source community. Keep scrolling to catch a glipse of few such events! ", | ||
} | ||
] | ||
} | ||
] | ||
} | ||
|
||
|
||
export const getEvents = () => { | ||
return our_events; | ||
}; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters