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

467 lines
8.1 KiB
SCSS
Raw Normal View History

.dashboard-next {
.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);
max-width: 100%;
&:last-child, {
margin-left: 1em;
}
&:first-child {
margin-right: 1em;
}
@include small-width {
min-width: 100%;
&:last-child {
order: 1;
}
&:first-child {
order: 2;
}
}
}
@include small-width {
.section-column:last-child,
.section-column:first-child {
margin: 0;
}
}
}
.section {
.section-title {
h2 {
margin: 0 .5em 0 0;
}
display: flex;
2018-05-17 11:41:58 -04:00
@media screen and (max-width: 400px) {
flex-wrap: wrap;
}
align-items: center;
justify-content: space-between;
2018-05-15 20:18:21 -04:00
border-bottom: 1px solid $primary-low;
margin-bottom: .5em;
padding-bottom: .5em;
}
.section-body {
2018-05-17 11:41:58 -04:00
padding: 1em 0 0;
}
}
.charts {
display: flex;
2018-05-16 15:06:23 -04:00
justify-content: space-between;
flex-wrap: wrap;
.chart {
2018-05-16 15:06:23 -04: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-16 15:06:23 -04:00
margin-left: -5px;
}
.chart-canvas {
width: 100%;
height: 100%;
}
}
.misc {
2018-05-16 15:49:02 -04:00
display: flex;
2018-05-16 15:06:23 -04:00
border: 1px solid $primary-low;
2018-05-16 15:49:02 -04:00
.durability, .last-dashboard-update {
flex: 1 1 50%;
box-sizing: border-box;
margin: 1em 0;
padding: 0 1em;
2018-05-16 15:49:02 -04:00
}
.durability {
display: flex;
2018-05-16 15:49:02 -04:00
flex-wrap: wrap;
justify-content: space-between;
2018-05-16 15:49:02 -04:00
.backups, .uploads {
flex: 1 1 100%;
2018-05-16 15:49:02 -04:00
}
.uploads p:last-of-type {
margin-bottom: 0;
}
.durability-title {
text-transform: capitalize;
}
}
2018-05-16 15:49:02 -04:00
@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;
2018-05-16 15:49:02 -04:00
div {
align-self: center;
h4 {
margin-bottom: 0;
}
}
}
}
.top-referred-topics, .trending-search {
th:first-of-type {
text-align: left;
}
}
2018-05-16 15:49:02 -04:00
.top-referred-topics {
.dashboard-table table {
table-layout: auto;
}
}
2018-05-16 15:49:02 -04:00
.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-16 15:06:23 -04:00
margin-bottom: .5em;
padding: 0 .45em 0 0;
.title {
2018-05-16 15:06:23 -04:00
font-size: $font-up-1;
font-weight: 700;
margin: 0;
a { color: $primary; }
.info {
cursor: pointer;
margin-left: .25em;
2018-05-16 15:06:23 -04:00
color: $primary-low-mid;
}
}
.trend {
align-items: center;
&.trending-down, &.high-trending-down {
color: $danger;
}
&.trending-up, &.high-trending-up {
color: $success;
}
&.no-change {
color: $primary-medium;
}
.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;
width: 100%;
2018-05-17 00:47:10 -04:00
min-width: 0;
}
@include small-width {
max-width: 100%;
}
&.is-loading {
height: 200px;
}
.loading-container.visible {
display: flex;
align-items: center;
height: 100%;
width: 100%;
}
.tooltip {
cursor: pointer;
}
.chart-title {
align-items: center;
display: flex;
justify-content: space-between;
h3 {
margin: 1em 0;
a, a:visited {
color: $primary;
}
}
}
2018-05-16 17:18:13 -04:00
}
.dashboard-table {
margin-bottom: 1em;
&.is-disabled {
background: $primary-low;
padding: 1em;
}
2018-05-16 15:49:02 -04:00
@media screen and (max-width: 650px) {
table {
tbody tr td {
2018-05-16 15:49:02 -04:00
font-size: $font-down-1;
}
}
}
&.is-loading {
height: 150px;
}
.table-title {
align-items: center;
display: flex;
justify-content: space-between;
h3 {
2018-05-16 15:06:23 -04:00
margin: 1em 0 0 0;
}
}
table {
table-layout: fixed;
2018-05-16 15:06:23 -04: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-16 15:06:23 -04:00
border-top: none;
tr {
td:first-child {
text-overflow: ellipsis;
overflow: hidden;
white-space: normal;
}
td {
text-align: center;
2018-05-16 16:04:22 -04:00
padding: 8px;
}
td.left {
text-align: left;
}
2018-05-16 15:06:23 -04:00
td.title {
text-align: left;
}
td.value {
2018-05-16 15:06:23 -04:00
text-align: right;
2018-05-17 11:41:58 -04:00
padding: 8px 21px 8px 8px; // accounting for negative right caret margin
&:nth-of-type(2) {
padding: 8px 12px 8px;
}
i {
2018-05-16 16:04:22 -04:00
margin-right: -12px; // align on caret
@media screen and (max-width: 650px) {
margin-right: -9px;
}
}
&.high-trending-up, &.trending-up {
i { color: $success; }
}
&.high-trending-down, &.trending-down {
i { color: $danger; }
}
}
}
}
}
}
2018-05-22 15:33:06 -04:00
.user-metrics {
display: flex;
2018-05-22 15:33:06 -04:00
flex-wrap: wrap;
justify-content: space-between;
margin-left: -5%;
margin: 2em 0 .75em -5%; // Negative margin allows for a margin when in 2-columns,
2018-05-22 15:33:06 -04:00
.dashboard-inline-table { // and "hides" margin when the item spans 100% width
flex: 1 0 auto;
max-width: 95%;
}
.table-cell {
display: flex;
flex: 0 1 auto;
2018-05-23 18:46:25 -04:00
margin: 0 10px 5px 0;
border: 1px solid $primary-low;
border-radius: 10px;
.label {
display: flex;
align-items: center;
color: $primary;
background: $primary-very-low;
justify-content: center;
2018-05-23 18:46:25 -04:00
border-radius: 9px 0 0 9px;
padding: 0 5px 0 8px;
.d-icon {
margin-right: 5px;
font-size: $font-down-1;
}
}
2018-05-23 18:46:25 -04:00
.value {
padding: 0 8px 0 5px;
}
&.user-newuser{
.label {
color: $primary-high;
}
}
&.user-basic , &.user-member {
border-color: $bronze;
.label {
border-color: $bronze;
background: $bronze;
color: $secondary;
}
}
&.user-regular {
border-color: $silver;
.label {
border-color: $silver;
background: $silver;
color: $secondary;
}
}
&.user-leader {
border-color: $gold;
.label {
background: $gold;
border-color: $gold;
color: $secondary;
}
}
}
2018-05-23 18:46:25 -04:00
}
.dashboard-inline-table {
2018-05-22 15:33:06 -04:00
margin-left: 5%;
margin-bottom: 1.25em;
.table-title {
border-bottom: 1px solid $primary-low;
margin-bottom: 1em;
}
.table-container {
display: flex;
flex-wrap: wrap;
2018-05-22 15:33:06 -04:00
flex: 1 1 auto;
}
}
.dashboard-table.activity-metrics {
table {
@media screen and (min-width: 400px) {
table-layout: auto;
}
tr th {
text-align: right;
}
2018-05-17 17:03:56 -04:00
.d-icon {
color: $primary-low-mid;
min-width: 14px;
text-align: center;
2018-05-17 17:03:56 -04:00
}
@media screen and (max-width: 400px) {
.d-icon { display: none; }
td.title {
padding: 8px 0 8px 4px;
}
}
}
}