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