discourse/app/assets/stylesheets/common/admin/dashboard_next.scss

325 lines
5.2 KiB
SCSS
Raw Normal View History

.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;
}
}
}
2018-05-17 03:06:23 +08:00
.section-column:last-child, {
margin-left: 1em;
}
.section-column:first-child {
2018-05-17 03:06:23 +08:00
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;
2018-05-16 08:18:21 +08:00
border-bottom: 1px solid $primary-low;
margin-bottom: .5em;
padding-bottom: .5em;
}
.section-body {
padding: 1em 0;
}
}
.charts {
display: flex;
2018-05-17 03:06:23 +08:00
justify-content: space-between;
flex-wrap: wrap;
.chart {
2018-05-17 03:06:23 +08:00
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;
2018-05-17 03:06:23 +08:00
margin-left: -5px;
}
.chart-canvas {
width: 100%;
height: 100%;
}
}
.misc {
2018-05-17 03:06:23 +08:00
border: 1px solid $primary-low;
padding: 20px;
.durability {
display: flex;
justify-content: space-between;
.durability-title {
text-transform: capitalize;
}
}
}
.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;
2018-05-17 03:06:23 +08:00
margin-bottom: .5em;
padding: 0 .45em 0 0;
.title {
2018-05-17 03:06:23 +08:00
font-size: $font-up-1;
font-weight: 700;
margin: 0;
a { color: $primary; }
.info {
cursor: pointer;
margin-left: .25em;
2018-05-17 03:06:23 +08:00
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;
}
}
}
2018-05-17 03:06:23 +08:00
.top-referred-topics, .trending-search {
th:first-of-type {
text-align: left;
}
}
.dashboard-table {
margin-bottom: 1em;
&.is-disabled {
background: $primary-low;
padding: 1em;
}
@include small-width {
table {
tbody tr td {
font-size: $font-down-2;
}
}
}
&.is-loading {
height: 150px;
}
.table-title {
align-items: center;
display: flex;
justify-content: space-between;
h3 {
2018-05-17 03:06:23 +08:00
margin: 1em 0 0 0;
}
}
table {
table-layout: fixed;
2018-05-17 03:06:23 +08:00
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 {
2018-05-17 03:06:23 +08:00
border-top: none;
tr {
td:first-child {
text-overflow: ellipsis;
overflow: hidden;
white-space: normal;
}
td {
text-align: center;
2018-05-17 03:06:23 +08:00
padding: 8px 20px 8px 8px;
}
td.left {
text-align: left;
}
2018-05-17 03:06:23 +08:00
td.title {
text-align: left;
}
td.value {
2018-05-17 03:06:23 +08:00
text-align: right;
transform: translateX(-30%);
i {
display: none;
2018-05-17 03:06:23 +08:00
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;
}
}
}
}
}
}
}