-
Notifications
You must be signed in to change notification settings - Fork 190
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
Added a section of home page #134
Closed
Closed
Changes from 10 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
796055a
content added to home component
raksh543 e2eb576
updated
raksh543 7cb324a
adding responsiveness
raksh543 592dd3a
changes
raksh543 a0788d5
adding styled component
raksh543 2e76776
changes
raksh543 26f0fb4
changes
raksh543 2f424d9
seperating components
raksh543 36ce0ba
updates
raksh543 3a8a7f2
delete redundant file - we use yarn not npm
annabauza a404d2f
Merge branch 'develop' into develop
annabauza 9efe576
changing ImageText component
raksh543 9f54847
Merge branch 'develop' into develop
annabauza e651158
changes
raksh543 c94c084
using ImageTextSection
raksh543 14a5d10
Merge branch 'develop' into develop
annabauza 04fdaad
passing section as prop and removing added dependency
raksh543 46705cb
page displayed only on clicking on logo & replacing json with js
raksh543 9ac9439
changing styles
raksh543 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React from 'react'; | ||
import styles from './styles'; | ||
import { View } from 'react-native'; | ||
import contentJson from '../../content/home.json'; | ||
import SectionHeader from '../SectionHeader'; | ||
import SectionImage from '../SectionImage'; | ||
import SectionBody from '../SectionBody'; | ||
|
||
const {sections} = contentJson; | ||
var content =""; | ||
|
||
sections[0].content.forEach(text=>{ | ||
content += text.par+"\n"; | ||
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. keep paragraphs as stack of texts instead of adding '\n' |
||
}) | ||
function GettingStarted(){ | ||
return( | ||
<View style={styles.container}> | ||
<SectionImage | ||
source={require("./../../assets/home/started.png")} | ||
height={273} | ||
width={343} | ||
/> | ||
<View> | ||
<SectionHeader title={sections[0].title} ></SectionHeader> | ||
<SectionBody content={content}></SectionBody> | ||
</View> | ||
</View> | ||
|
||
); | ||
} | ||
|
||
export default GettingStarted; |
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,41 @@ | ||
import React from 'react'; | ||
import styles from './styles'; | ||
import { View, Dimensions } from 'react-native'; | ||
import contentJson from '../../content/home.json'; | ||
import SectionHeader from '../SectionHeader'; | ||
import SectionImage from '../SectionImage'; | ||
import SectionBody from '../SectionBody'; | ||
|
||
const {width} = Dimensions.get('window'); | ||
const {sections} = contentJson; | ||
var content =""; | ||
|
||
sections[3].content.forEach(text=>{ | ||
content += text.par+"\n"; | ||
}) | ||
function GettingStarted(){ | ||
return( | ||
<View style={styles.container}> | ||
{(width-0.7*width<400) ? | ||
<SectionImage | ||
source={require("./../../assets/home/space1.png")} | ||
height={208} | ||
width={273} | ||
/> : null} | ||
<View> | ||
<SectionHeader title={sections[3].title}></SectionHeader> | ||
<SectionBody content={content}></SectionBody> | ||
|
||
</View> | ||
{(width-0.7*width>=400) ? | ||
<SectionImage | ||
source={require("./../../assets/home/space1.png")} | ||
height={208} | ||
width={273} | ||
/> : null} | ||
</View> | ||
|
||
); | ||
} | ||
|
||
export default GettingStarted; |
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,32 @@ | ||
import React from 'react'; | ||
import styles from './styles'; | ||
import { View } from 'react-native'; | ||
import contentJson from '../../content/home.json'; | ||
import SectionHeader from '../SectionHeader'; | ||
import SectionImage from '../SectionImage'; | ||
import SectionBody from '../SectionBody'; | ||
|
||
const {sections} = contentJson; | ||
var content =""; | ||
|
||
sections[2].content.forEach(text=>{ | ||
content += text.par+"\n"; | ||
}) | ||
function GettingStarted(){ | ||
return( | ||
<View style={styles.container}> | ||
<SectionImage | ||
source={require("./../../assets/home/our-projects.png")} | ||
height={261} | ||
width={282} | ||
/> | ||
<View> | ||
<SectionHeader title={sections[2].title}></SectionHeader> | ||
<SectionBody content={content}></SectionBody> | ||
</View> | ||
</View> | ||
|
||
); | ||
} | ||
|
||
export default GettingStarted; |
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,40 @@ | ||
import React from 'react'; | ||
import styles from './styles'; | ||
import { View, Dimensions } from 'react-native'; | ||
import contentJson from '../../content/home.json'; | ||
import SectionHeader from '../SectionHeader'; | ||
import SectionImage from '../SectionImage'; | ||
import SectionBody from '../SectionBody'; | ||
|
||
const {width} = Dimensions.get('window'); | ||
const {sections} = contentJson; | ||
var content =""; | ||
|
||
sections[1].content.forEach(text=>{ | ||
content += text.par+"\n"; | ||
}) | ||
function GettingStarted(){ | ||
return( | ||
<View style={styles.container}> | ||
{(width-0.7*width<400) ? | ||
<SectionImage | ||
source={require("./../../assets/home/contribute.png")} | ||
height={220} | ||
width={273} | ||
/> : null } | ||
<View> | ||
<SectionHeader title={sections[1].title}></SectionHeader> | ||
<SectionBody content={content}></SectionBody> | ||
</View> | ||
{(width-0.7*width>=400) ? | ||
<SectionImage | ||
source={require("./../../assets/home/contribute.png")} | ||
height={220} | ||
width={273} | ||
/> : null } | ||
</View> | ||
|
||
); | ||
} | ||
|
||
export default GettingStarted; |
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,25 @@ | ||
import React from 'react'; | ||
import GettingStarted from './GettingStarted'; | ||
import OurProjects from './OurProjects'; | ||
import OpenSourcePrograms from './OpenSourcePrograms'; | ||
import WaysToContribute from './WaysToContribute'; | ||
import styles from './styles'; | ||
import { | ||
View | ||
}from 'react-native'; | ||
|
||
|
||
function Home(){ | ||
|
||
return( | ||
<View style = {styles.parent}> | ||
<GettingStarted /> | ||
<WaysToContribute /> | ||
<OurProjects /> | ||
<OpenSourcePrograms /> | ||
</View> | ||
|
||
); | ||
} | ||
|
||
export default Home; |
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,19 @@ | ||
import { StyleSheet } from 'react-native'; | ||
|
||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
flex: 1, | ||
flexWrap: 'wrap', | ||
justifyContent: 'space-around', | ||
flexDirection: 'row', | ||
}, | ||
parent: { | ||
flexDirection: 'column', | ||
flexWrap: 'wrap', | ||
marginTop: 32, | ||
marginBottom: 32 | ||
}, | ||
}); | ||
|
||
export default styles; |
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 @@ | ||
import React from 'react'; | ||
import { View, Text, StyleSheet, Dimensions } from 'react-native'; | ||
|
||
const {width} = Dimensions.get('window'); | ||
function SectionBody({content, width}){ | ||
return ( | ||
<View style={styles.container} > | ||
<Text style={styles.body}>{content}</Text> | ||
</View> | ||
); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
body: { | ||
fontSize: 18, | ||
color: '#103BB1', | ||
fontFamily:'./../../Avenir-Light', | ||
textAlign:"left", | ||
flexWrap:"wrap" | ||
}, | ||
container: { | ||
flex: 1, | ||
width: (width - 0.7*width>=400) ? width*0.7 : width*0.9, | ||
marginTop: 8, | ||
paddingLeft: 16, | ||
paddingRight: 16, | ||
}, | ||
}); | ||
|
||
export default SectionBody; | ||
|
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,27 @@ | ||
import React from 'react'; | ||
import {View, Image } from 'react-native'; | ||
|
||
|
||
function SectionImage({source, width, height}){ | ||
const viewStyle = { | ||
alignSelf: 'center', | ||
width: 350, | ||
marginTop: 32+8, | ||
} | ||
const imageStyle = { | ||
width: width, | ||
height: height, | ||
alignSelf: 'center', | ||
} | ||
return( | ||
<View style={viewStyle}> | ||
<Image | ||
source={source} | ||
style = {imageStyle} | ||
/> | ||
</View> | ||
) | ||
} | ||
|
||
|
||
export default SectionImage; |
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.
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.
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
Binary file not shown.
Binary file not shown.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
please pass section as a prop