discourse/app/assets/stylesheets/common/admin/dashboard_next.scss
Joffrey JAFFEUX 9fabf2543b
dashboard next: activity metrics and new contributors
This commit also introduces a better grouping of data points.
2018-04-26 14:49:41 +02:00

211 lines
3.7 KiB
SCSS

.dashboard-next {
&.admin-contents {
margin: 0;
}
.section-columns {
display: flex;
justify-content: space-between;
.section-column {
min-width: calc(50% - .5em);
}
.section-column:last-child {
margin-left: .5em;
}
.section-column:first-child {
margin-right: .5em;
}
}
.section {
.section-title {
h2 {
margin: 0 .5em 0 0;
}
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid $primary-low-mid;
margin-bottom: .5em;
padding-bottom: .5em;
}
.section-body {
padding: 1em 0;
}
}
.dashboard-table {
margin-bottom: 1em;
&.fixed table {
table-layout: fixed;
}
&.is-loading {
height: 150px;
}
.table-title {
align-items: center;
display: flex;
justify-content: space-between;
h3 {
margin: .5em 0;
}
}
table {
border: 1px solid $primary-low-mid;
thead {
tr {
background: $primary-low;
th {
border: 1px solid $primary-low-mid;
text-align: center;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}
}
tbody {
tr {
td {
border: 1px solid $primary-low-mid;
text-align: center;
}
td.value {
i {
display: none;
}
&.high-trending-up, &.trending-up {
i.up {
color: $success;
display: inline;
}
}
&.high-trending-down, &.trending-down {
i.down {
color: $danger;
display: inline;
}
}
&.no-change {
i.down {
display: inline;
visibility: hidden;
}
}
}
}
}
}
}
.charts {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.dashboard-mini-chart {
width: calc(100% * (1/3));
margin-bottom: 1em;
flex-grow: 1;
&.is-loading {
height: 150px;
}
.d-icon-question-circle {
cursor: pointer;
margin-left: .25em;
}
.chart-title {
align-items: center;
display: flex;
h3 {
margin: 1em 0;
}
}
&.high-trending-up, &.trending-up {
.chart-trend, .data-point {
color: rgb(17, 141, 0);
}
}
&.high-trending-down, &.trending-down {
.chart-trend, .data-point {
color: $danger;
}
}
&.one-data-point {
.chart-container {
min-height: 150px;
justify-content: center;
align-items: center;
display: flex;
}
.data-point {
width: 100%;
font-size: 6em;
font-weight: bold;
border-radius: 3px;
background: rgba(200,220,240,0.3);
text-align: center;
padding: .5em 0;
}
}
}
.chart-container {
position: relative;
padding: 0 1em;
min-height: 200px;
}
.chart-trend {
font-size: $font-up-5;
position: absolute;
right: 40px;
top: 5px;
display: flex;
justify-content: space-between;
align-items: center;
font-weight: bold;
}
.chart-canvas {
width: 100%;
height: 100%;
}
}
.misc {
.durability {
display: flex;
justify-content: space-between;
.durability-title {
text-transform: capitalize;
}
}
}
}