mirror of
https://github.com/status-im/fathom.git
synced 2025-03-01 11:30:28 +00:00
stretch totals sidebar to top, move chart to right area
This commit is contained in:
parent
11b4e5e5b3
commit
c5b0d051a2
@ -86,7 +86,7 @@ class Table extends Component {
|
||||
)}) : <div class="table-row">Nothing here, yet.</div>;
|
||||
|
||||
return (
|
||||
<div data-total={state.total} class={"box box-pages animated fadeInUp delayed_04s " + (state.loading ? "loading" : '')}>
|
||||
<div class={(state.loading ? "loading" : '')}>
|
||||
<div class="table-row header">
|
||||
{props.headers.map((header, i) => {
|
||||
let classes = i === 0 ? 'main-col cell' : 'cell';
|
||||
|
@ -46,12 +46,6 @@ class Dashboard extends Component {
|
||||
<DatePicker onChange={this.changePeriod} value={state.period} />
|
||||
</nav>
|
||||
|
||||
<div class="boxes">
|
||||
<div class="box box-graph">
|
||||
<Chart before={state.before} after={state.after} />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="boxes">
|
||||
<div class="box box-totals animated fadeInUp delayed_03s">
|
||||
<CountWidget title="Unique visitors" endpoint="stats/site/visitors" before={state.before} after={state.after} />
|
||||
@ -60,10 +54,18 @@ class Dashboard extends Component {
|
||||
<CountWidget title="Bounce rate" endpoint="stats/site/bounces" format="percentage" before={state.before} after={state.after} />
|
||||
</div>
|
||||
|
||||
<Table endpoint="stats/pages" headers={["Top pages", "Views", "Uniques"]} before={state.before} after={state.after} />
|
||||
<Table endpoint="stats/referrers" headers={["Top referrers", "Views", "Uniques"]} before={state.before} after={state.after} showHostname="true" />
|
||||
<div class="boxes-col">
|
||||
<div class="box box-graph">
|
||||
<Chart before={state.before} after={state.after} />
|
||||
</div>
|
||||
<div class="box box-pages animated fadeInUp delayed_04s">
|
||||
<Table endpoint="stats/pages" headers={["Top pages", "Views", "Uniques"]} before={state.before} after={state.after} />
|
||||
</div>
|
||||
<div class="box box-referrers animated fadeInUp delayed_04s">
|
||||
<Table endpoint="stats/referrers" headers={["Top referrers", "Views", "Uniques"]} before={state.before} after={state.after} showHostname="true" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
|
||||
<footer class="section"></footer>
|
||||
|
@ -20,12 +20,12 @@ g.visitors {
|
||||
}
|
||||
|
||||
line {
|
||||
stroke: rgb(218, 218, 218);
|
||||
stroke: rgba(218, 218, 218, 0.5);
|
||||
}
|
||||
|
||||
text {
|
||||
font-size: 12px;
|
||||
fill: #6c7680;
|
||||
fill: #98a0a6;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -22,6 +22,7 @@ font size 12, 16, 64
|
||||
::-moz-selection { background: #a0ffd1; }
|
||||
|
||||
html, body, #root { height: 100%; }
|
||||
body { overflow-y: scroll; }
|
||||
|
||||
html {}
|
||||
body {
|
||||
@ -48,18 +49,21 @@ body {
|
||||
stretch; width: 100%;
|
||||
}
|
||||
|
||||
.boxes-col {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.box {
|
||||
border-radius: 4px;
|
||||
margin-bottom: 8px;
|
||||
box-shadow: 0 2px 8px 0 rgba(70,73,77,.16);
|
||||
padding: 24px 0;
|
||||
padding: 16px;
|
||||
flex: 1;
|
||||
flex-basis: 100%;
|
||||
min-width: 40px;
|
||||
}
|
||||
.box-totals { background: #46494d; color: #fff; padding: 32px 16px 0 16px; }
|
||||
.box-pages { background: #fff; }
|
||||
.box-referrers { background: #fff; }
|
||||
.box-totals { background: #46494d; color: #fff; }
|
||||
.box-pages, .box-referrers, .box-graph { background: #fff; }
|
||||
|
||||
nav.main-nav ul { width: 100%; text-align: right; margin-top: 4px; margin-bottom: 0; padding: 0; }
|
||||
nav li { display: inline-block; }
|
||||
@ -146,8 +150,23 @@ body {
|
||||
|
||||
.boxes { justify-content: space-between; flex-wrap: nowrap; }
|
||||
.box { margin: 0 4px; }
|
||||
.boxes-col {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.box-graph {
|
||||
margin: 0 0 4px 0;
|
||||
}
|
||||
.box-totals { max-width: 230px; margin-left: 0; }
|
||||
.box-referrers { margin-right: 0; }
|
||||
.box-pages {
|
||||
flex-basis: 464px;
|
||||
width: 50%;
|
||||
margin: 0 2px 0 0;
|
||||
}
|
||||
.box-referrers {
|
||||
flex-basis: 464px;
|
||||
margin: 0 0 0 2px;
|
||||
}
|
||||
|
||||
.totals-detail { width: 100%; }
|
||||
.total-numbers { font-size: 64px; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user