From aea6b6ecbb84f401b65b8a70cf46325046671aa9 Mon Sep 17 00:00:00 2001 From: grosjeanstephanie Date: Sun, 28 Apr 2019 12:30:32 +0200 Subject: [PATCH] modification button --- src/InfoMeteo.js | 18 ++++++++++++++++-- src/InfoPlanet.js | 4 ++-- src/Planet.js | 2 +- src/index.css | 12 ++++++++++-- 4 files changed, 29 insertions(+), 7 deletions(-) diff --git a/src/InfoMeteo.js b/src/InfoMeteo.js index ee2dc13..ac6de29 100644 --- a/src/InfoMeteo.js +++ b/src/InfoMeteo.js @@ -2,10 +2,22 @@ import React from 'react'; export const InfoMeteo = (props) => { const {tabData, temps, wind}=props - console.log(temps) + let x = Math.ceil(temps.length / 2); + + let list1 = [], list2 = []; + + for (let i = 0; i < temps.length; i++) { + if (i > x) { + list1.push(temps[i]); + } else { + list2.push(temps[i]); + } + } + return ( +
- {temps.map((temp)=> + {list1.map((temp)=> (
Temperature : {Math.floor(temp)} °C
@@ -17,5 +29,7 @@ export const InfoMeteo = (props) => { ) )}
+ +
) } \ No newline at end of file diff --git a/src/InfoPlanet.js b/src/InfoPlanet.js index 2ca3012..fe85b4b 100644 --- a/src/InfoPlanet.js +++ b/src/InfoPlanet.js @@ -21,10 +21,10 @@ export const InfoPlanet = (props) => { {Math.floor(props.coord.longitude)}
diff --git a/src/Planet.js b/src/Planet.js index 53a8fcf..ed92e4c 100644 --- a/src/Planet.js +++ b/src/Planet.js @@ -61,7 +61,7 @@ export class Planet extends Component { let sphereGeometry2 = new THREE.SphereBufferGeometry(15, 30, 30, 0,Math.PI ); // Sphere Material 2 - let sphereMaterial2= new THREE.MeshPhongMaterial({ color : 0xffffff}); + let sphereMaterial2= new THREE.MeshPhongMaterial({color : 0xffffff }); let sphereMesh2 = new THREE.Mesh(sphereGeometry2, sphereMaterial2); sphereMesh2.position.set(0, 0, 200); pivotPoint.add(sphereMesh2); diff --git a/src/index.css b/src/index.css index f8c2e55..de3a9d3 100644 --- a/src/index.css +++ b/src/index.css @@ -21,11 +21,15 @@ code { monospace; } .ofx-s{ - overflow-x: scroll + overflow-x: scroll; + overflow: hidden; +} +.sndrow{ + grid-row: 2/3; } .w-100{ - width:90vw + width:100vw; } .w-250px{ width:250px; @@ -42,6 +46,7 @@ code { .App{ padding: 25px; color: white; + margin-top: 15px; display: grid; grid-template-columns: 55% auto; @@ -77,9 +82,12 @@ margin: 0 3px; margin-top: 10px; display: flex; justify-content: center; + color: lightseagreen; } + + /* bbffee blue */ /* e2381e red */