Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. var React = require('react-native')
  2. var Template = require('./Template')
  3. var teamlogo = require('../img/teamlogo01.png')
  4. var line = require('../img/line.png')
  5. import {Dimensions} from 'react-native';
  6.  
  7. var {
  8. Text,
  9. StyleSheet,
  10. Image
  11. } = React;
  12.  
  13. var styles = StyleSheet.create({
  14. header: {
  15. color: 'white',
  16. marginTop: vh(11),
  17. marginLeft: vw(125),
  18. fontSize: vw(20),
  19. fontWeight: '500',
  20. },
  21. motto: {
  22. color: 'white',
  23. marginTop: vh(12),
  24. marginLeft: vw(123),
  25. fontSize: 15,
  26. fontWeight: '400',
  27. },
  28. locationTxt: {
  29. color: 'white',
  30. marginTop: vh(12),
  31. marginLeft: vw(110),
  32. fontSize: 12,
  33. fontWeight: '400',
  34. },
  35. winsTxt: {
  36. color: 'white',
  37. marginTop: vh(12),
  38. marginLeft: vw(127),
  39. fontSize: 12,
  40. fontWeight: '400',
  41. },
  42. team: {
  43. position: 'absolute',
  44. marginLeft: vw(101),
  45. marginTop: vh(94),
  46. color: 'white',
  47. fontSize: vw(20)
  48. },
  49. image: {
  50. alignItems: 'center',
  51. marginTop: vh(22),
  52. marginLeft: vw(110),
  53. },
  54. line: {
  55. marginTop: vh(8),
  56. marginLeft: vw(55),
  57. }
  58. });
  59.  
  60. function vw(width) {
  61. return Dimensions.get('window').width * (width / 375);
  62. }
  63.  
  64. function vh(height) {
  65. return Dimensions.get('window').height * (height / 667);
  66. }
  67.  
  68.  
  69. class TeamPage extends React.Component {
  70.  
  71. render(){
  72. return(
  73. <Template title='Team' right={Template}>
  74. <Image source={teamlogo} style={styles.image} />
  75. <Text style={styles.header}>Immortals FC</Text>
  76. <Text style={styles.motto}>"United we stand!"</Text>
  77. <Text style={styles.locationTxt}>Location: Gombak, Selangor</Text>
  78. <Text style={styles.winsTxt}>Tournament Wins: 2</Text>
  79. <Image source={line} style={styles.line}/>
  80. </Template>
  81. )
  82. }
  83.  
  84. }
  85.  
  86. module.exports = TeamPage;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement