mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Turning admin dashboard user counts into badges
This commit is contained in:
@@ -7,12 +7,12 @@
|
|||||||
<div class="table-container">
|
<div class="table-container">
|
||||||
{{#unless hasBlock}}
|
{{#unless hasBlock}}
|
||||||
{{#each report.data as |data|}}
|
{{#each report.data as |data|}}
|
||||||
<div class="table-cell">
|
<div class="table-cell user-{{data.key}}">
|
||||||
<span class="label">
|
<span class="label">
|
||||||
{{#if data.icon}}
|
{{#if data.icon}}
|
||||||
{{d-icon data.icon}}
|
{{d-icon data.icon}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{data.x}}:
|
{{data.x}}
|
||||||
</span>
|
</span>
|
||||||
<span class="value">
|
<span class="value">
|
||||||
{{#if data.url}}
|
{{#if data.url}}
|
||||||
|
|||||||
@@ -382,6 +382,59 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.table-cell {
|
||||||
|
display: flex;
|
||||||
|
flex: 0 1 auto;
|
||||||
|
margin: 0 1em .5em 0;
|
||||||
|
padding: 0 .5em 0 0;
|
||||||
|
border: 1px solid $primary-low;
|
||||||
|
border-radius: 10px;
|
||||||
|
|
||||||
|
.label {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
margin-right: .25em;
|
||||||
|
color: $primary;
|
||||||
|
background: $primary-very-low;
|
||||||
|
padding: 0 .5em;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 10px 0 0 10px;
|
||||||
|
.d-icon {
|
||||||
|
margin-right: 5px;
|
||||||
|
font-size: $font-down-1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&.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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.dashboard-inline-table {
|
.dashboard-inline-table {
|
||||||
margin-left: 5%;
|
margin-left: 5%;
|
||||||
margin-bottom: 1.25em;
|
margin-bottom: 1.25em;
|
||||||
@@ -396,20 +449,6 @@
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-cell {
|
|
||||||
display: flex;
|
|
||||||
flex: 0 1 auto;
|
|
||||||
margin: 0 2em .5em 0;
|
|
||||||
.label {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
margin-right: .5em;
|
|
||||||
.d-icon {
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-table.activity-metrics {
|
.dashboard-table.activity-metrics {
|
||||||
|
|||||||
@@ -20,15 +20,15 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
&.badge-type-gold .fa {
|
&.badge-type-gold .fa {
|
||||||
color: rgb(231, 195, 0) !important;
|
color: $gold !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.badge-type-silver .fa {
|
&.badge-type-silver .fa {
|
||||||
color: #c0c0c0 !important;
|
color: $silver !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.badge-type-bronze .fa {
|
&.badge-type-bronze .fa {
|
||||||
color: #cd7f32 !important;
|
color: $bronze !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.disabled {
|
&.disabled {
|
||||||
|
|||||||
@@ -22,6 +22,13 @@ $twitter: #00bced !default;
|
|||||||
$yahoo: #810293 !default;
|
$yahoo: #810293 !default;
|
||||||
$github: #6d6d6d !default;
|
$github: #6d6d6d !default;
|
||||||
|
|
||||||
|
// Badge color variables
|
||||||
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
$gold: rgb(231, 195, 0) !default;
|
||||||
|
$silver: #c0c0c0 !default;
|
||||||
|
$bronze: #cd7f32 !default;
|
||||||
|
|
||||||
// Fonts
|
// Fonts
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user