mirror of
https://github.com/mgerb/mywebsite
synced 2026-01-11 02:12:53 +00:00
fixed css
This commit is contained in:
@@ -1,4 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import {Link} from 'react-router';
|
||||||
|
|
||||||
import Loading from '../utils/Loading';
|
import Loading from '../utils/Loading';
|
||||||
import _chartjs from 'chart.js';
|
import _chartjs from 'chart.js';
|
||||||
import Chart from 'react-chartjs';
|
import Chart from 'react-chartjs';
|
||||||
@@ -97,6 +99,9 @@ export default class SensorInfo extends React.Component {
|
|||||||
{sensor.fetchedUniqueDates && sensor.fetchedInfo
|
{sensor.fetchedUniqueDates && sensor.fetchedInfo
|
||||||
? <LineChart data={data} options={ChartOptions} redraw/>
|
? <LineChart data={data} options={ChartOptions} redraw/>
|
||||||
: null}
|
: null}
|
||||||
|
{sensor.fetchedUniqueDates && sensor.fetchedInfo
|
||||||
|
? <div class="home"><Link to="/" class="link"><i class="fa fa-caret-left" aria-hidden="true"></i> Home</Link></div>
|
||||||
|
: null}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,4 +14,7 @@
|
|||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.home{
|
||||||
|
margin-top: 1em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -30,10 +30,10 @@ export default class SensorList extends React.Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div key={index} class="row" onClick={() => {this.openLink(sensor.location)}}>
|
<div key={index} class="row" onClick={() => {this.openLink(sensor.location)}}>
|
||||||
<div class="item">
|
<div class="temperature">
|
||||||
<h1>{sensor.temperature}°f</h1>
|
<h1>{sensor.temperature}°f</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
<div class="info">
|
||||||
<h3>{sensor.location}</h3>
|
<h3>{sensor.location}</h3>
|
||||||
<span class="date">Updated: {date.toLocaleString('en-us', options)}
|
<span class="date">Updated: {date.toLocaleString('en-us', options)}
|
||||||
{Date.now() - date < 420000
|
{Date.now() - date < 420000
|
||||||
|
|||||||
@@ -12,8 +12,13 @@
|
|||||||
background-color: #D1D1D1;
|
background-color: #D1D1D1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item + .item{
|
.temperature{
|
||||||
|
flex: .5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.info{
|
||||||
margin-left: 1em;
|
margin-left: 1em;
|
||||||
|
flex: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2{
|
h2{
|
||||||
|
|||||||
Reference in New Issue
Block a user