discourse/app/assets/stylesheets/common/admin/dashboard_next.scss
2018-05-16 15:49:02 -04:00

370 lines
6.1 KiB
SCSS

.dashboard-next {
&.admin-contents {
margin: 0;
}
.section-top {
margin-bottom: 1em;
}
.section-columns {
display: flex;
justify-content: space-between;
@include small-width {
flex-direction: column;
}
.section-column {
min-width: calc(50% - .5em);
@include small-width {
min-width: 100%;
&:last-child {
order: 1;
}
&:first-child {
order: 2;
}
}
}
.section-column:last-child, {
margin-left: 1em;
}
.section-column:first-child {
margin-right: 1em;
}
@include small-width {
.section-column:last-child, .section-column:first-child {
margin: 0;
}
}
}
.section {
.section-title {
h2 {
margin: 0 .5em 0 0;
}
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 1px solid $primary-low;
margin-bottom: .5em;
padding-bottom: .5em;
}
.section-body {
padding: 1em 0;
}
}
.charts {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.chart {
max-width: calc(100% * 1/3.2);
width: 100%;
flex-grow: 1;
flex-basis: 100%;
display: flex;
margin-bottom: 1em;
}
@include small-width {
.chart {
max-width: 100%;
}
}
.chart-canvas-container {
position: relative;
margin-left: -5px;
}
.chart-canvas {
width: 100%;
height: 100%;
}
}
.misc {
display: flex;
border: 1px solid $primary-low;
.durability, .last-dashboard-update {
flex: 1 1 50%;
box-sizing: border-box;
margin: 20px 0;
padding: 0 20px;
}
.durability {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.backups, .uploads {
flex: 1 1 100%;
}
.uploads p:last-of-type {
margin-bottom: 0;
}
.durability-title {
text-transform: capitalize;
}
}
@media screen and (max-width: 400px) {
flex-wrap: wrap;
.durability, .last-dashboard-update {
flex: 1 1 100%;
text-align: left;
}
.last-dashboard-update {
display: block;
margin: 0 20px 20px 20px;
padding: 20px 0 0 0;
border-top: 1px solid $primary-low;
border-left: none;
}
}
.last-dashboard-update {
border-left: 1px solid $primary-low;
text-align: center;
display: flex;
justify-content: center;
div {
align-self: center;
h4 {
margin-bottom: 0;
}
}
}
}
.community-health {
.period-chooser .period-chooser-header {
.selected-name, .d-icon {
font-size: $font-up-1;
}
.d-icon {
margin: 0;
}
}
}
}
.dashboard-mini-chart {
.status {
display: flex;
justify-content: space-between;
margin-bottom: .5em;
padding: 0 .45em 0 0;
.title {
font-size: $font-up-1;
font-weight: 700;
margin: 0;
a { color: $primary; }
.info {
cursor: pointer;
margin-left: .25em;
color: $primary-low-mid;
}
}
.trend {
align-items: center;
&.trending-down, &.high-trending-down {
color: $danger;
}
&.trending-up, &.high-trending-up {
color: $success;
}
.trend-value {
font-size: $font-up-1;
}
.trend-icon {
font-size: $font-up-1;
font-weight: 700;
}
}
}
.conditional-loading-section {
display: flex;
flex-direction: column;
justify-content: space-between;
flex: 1;
}
@include small-width {
max-width: 100%;
}
&.is-loading {
height: 200px;
}
.loading-container.visible {
display: flex;
align-items: center;
height: 100%;
width: 100%;
}
.d-icon-question-circle {
cursor: pointer;
}
.chart-title {
align-items: center;
display: flex;
justify-content: space-between;
h3 {
margin: 1em 0;
a, a:visited {
color: $primary;
}
}
}
&.high-trending-up, &.trending-up {
.chart-trend, .data-point {
color: $success;
}
}
&.high-trending-down, &.trending-down {
.chart-trend, .data-point {
color: $danger;
}
}
}
.top-referred-topics, .trending-search {
th:first-of-type {
text-align: left;
}
}
.dashboard-table {
margin-bottom: 1em;
&.is-disabled {
background: $primary-low;
padding: 1em;
}
@media screen and (max-width: 650px) {
table {
tbody tr td {
font-size: $font-down-1;
}
}
}
&.is-loading {
height: 150px;
}
.table-title {
align-items: center;
display: flex;
justify-content: space-between;
h3 {
margin: 1em 0 0 0;
}
}
table {
table-layout: fixed;
border: 1px solid $primary-low;
thead {
border: 1px solid $primary-low;
tr {
th {
text-align: center;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}
}
}
tbody {
border-top: none;
tr {
td:first-child {
text-overflow: ellipsis;
overflow: hidden;
white-space: normal;
}
td {
text-align: center;
padding: 8px 20px 8px 8px;
}
td.left {
text-align: left;
}
td.title {
text-align: left;
}
td.value {
text-align: right;
transform: translateX(-30%);
i {
display: none;
margin-right: -12px;
}
&.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;
}
}
}
}
}
}
}