mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:23:13 +08:00
347 lines
5.6 KiB
SCSS
347 lines
5.6 KiB
SCSS
/* Default badge styles. */
|
|
.user-badge {
|
|
padding: 3px 8px;
|
|
color: $primary;
|
|
border: 1px solid $primary-low;
|
|
line-height: $line-height-large;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
background-color: $secondary;
|
|
margin: 0 0 3px;
|
|
|
|
img {
|
|
height: 16px;
|
|
width: 16px;
|
|
}
|
|
|
|
.badge-display-name {
|
|
margin-left: 0.25em;
|
|
}
|
|
|
|
&.badge-type-gold .fa {
|
|
color: $gold !important;
|
|
}
|
|
|
|
&.badge-type-silver .fa {
|
|
color: $silver !important;
|
|
}
|
|
|
|
&.badge-type-bronze .fa {
|
|
color: $bronze !important;
|
|
}
|
|
|
|
&.disabled {
|
|
color: $primary-medium;
|
|
background-color: $primary-very-low;
|
|
.fa {
|
|
opacity: 0.4;
|
|
}
|
|
}
|
|
}
|
|
|
|
@media all and (max-width: 750px) {
|
|
.show-badge .user-badge-with-posts .badge-user a.post-link {
|
|
width: auto;
|
|
}
|
|
.show-badge div.badge-user {
|
|
padding: 0;
|
|
}
|
|
.badges-listing {
|
|
display: block;
|
|
|
|
.info,
|
|
.grant-count {
|
|
text-align: left;
|
|
}
|
|
|
|
.row > div.info {
|
|
display: none;
|
|
}
|
|
|
|
.row {
|
|
display: block;
|
|
> div {
|
|
display: block;
|
|
margin-top: 10px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.show-badge .badge-user-info {
|
|
.earned {
|
|
font-size: $font-up-2;
|
|
margin-bottom: 1em;
|
|
}
|
|
}
|
|
|
|
.show-badge .single-user {
|
|
margin-left: 2%;
|
|
padding-bottom: 20px;
|
|
.load-more {
|
|
padding-top: 30px;
|
|
display: block;
|
|
font-size: $font-up-2;
|
|
}
|
|
}
|
|
|
|
.show-badge .single-user .badge-user {
|
|
padding-left: 0;
|
|
|
|
text-align: left;
|
|
display: block;
|
|
margin: 20px 0;
|
|
.badge-info {
|
|
display: none;
|
|
}
|
|
.date {
|
|
display: inline-block;
|
|
font-size: $font-up-1;
|
|
margin-left: 10px;
|
|
}
|
|
.post-link {
|
|
font-size: $font-up-2;
|
|
width: 500px;
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
width: 800px;
|
|
|
|
&:after {
|
|
content: "";
|
|
clear: both;
|
|
display: table;
|
|
}
|
|
}
|
|
|
|
.long-description.banner {
|
|
width: 88%;
|
|
margin-bottom: 15px;
|
|
margin-top: 15px;
|
|
}
|
|
|
|
.badge-card {
|
|
position: relative;
|
|
display: inline-block;
|
|
background-color: $primary-very-low;
|
|
border: 1px solid $primary-low;
|
|
margin-bottom: 2vh;
|
|
transition: box-shadow 0.25s;
|
|
|
|
.check-display {
|
|
position: absolute;
|
|
left: 5px;
|
|
top: 5px;
|
|
}
|
|
|
|
.grant-count {
|
|
position: absolute;
|
|
right: 5px;
|
|
top: 5px;
|
|
font-weight: bold;
|
|
color: $primary-medium;
|
|
font-size: $font-up-2;
|
|
}
|
|
|
|
.badge-contents {
|
|
display: flex;
|
|
min-height: 128px;
|
|
height: 100%;
|
|
padding: 0 10%;
|
|
|
|
.badge-link {
|
|
color: $primary;
|
|
}
|
|
|
|
.badge-icon {
|
|
display: flex;
|
|
flex: 0 0 auto;
|
|
width: 1.23em;
|
|
margin-right: 5%;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 3.5em;
|
|
a {
|
|
width: 100%;
|
|
}
|
|
img {
|
|
width: 100%;
|
|
max-width: 65px;
|
|
max-height: 80px;
|
|
}
|
|
|
|
&.badge-type-gold .fa {
|
|
color: rgb(231, 195, 0) !important;
|
|
}
|
|
|
|
&.badge-type-silver .fa {
|
|
color: #c0c0c0 !important;
|
|
}
|
|
|
|
&.badge-type-bronze .fa {
|
|
color: #cd7f32 !important;
|
|
}
|
|
}
|
|
|
|
.badge-info {
|
|
display: flex;
|
|
flex: 1 1 auto;
|
|
align-items: center;
|
|
padding: 1em 1.5em 1em 0;
|
|
color: $primary;
|
|
@media screen and (max-width: 600px) {
|
|
padding-right: 0;
|
|
}
|
|
|
|
h3 {
|
|
margin-bottom: 0.25em;
|
|
font-size: $font-up-1;
|
|
@media screen and (min-width: 900px) {
|
|
font-size: $font-up-2;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
&.medium {
|
|
flex: 0 0 auto;
|
|
width: 32%;
|
|
margin-right: 1.63%;
|
|
@media screen and (min-width: 851px) {
|
|
&:nth-of-type(3n) {
|
|
margin-right: 0;
|
|
}
|
|
}
|
|
@include breakpoint(medium) {
|
|
width: 48.5%;
|
|
&:nth-of-type(2n) {
|
|
margin-right: 0;
|
|
}
|
|
}
|
|
@include breakpoint(mobile-extra-large) {
|
|
flex: 0 0 100%;
|
|
}
|
|
&:hover {
|
|
box-shadow: shadow("card");
|
|
}
|
|
&:active {
|
|
box-shadow: none;
|
|
}
|
|
}
|
|
&.large {
|
|
width: 100%;
|
|
align-self: flex-start;
|
|
@media screen and (min-width: 767px) {
|
|
max-width: calc(#{$large-width} / 2);
|
|
margin-right: 1.5em;
|
|
}
|
|
.badge-contents {
|
|
padding: 0 5%;
|
|
h3 {
|
|
font-size: $font-up-3;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.badges-granted {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
@media screen and (max-width: $small-width) {
|
|
justify-content: space-between;
|
|
}
|
|
}
|
|
|
|
.badge-groups {
|
|
margin: 20px 0;
|
|
color: dark-light-choose($primary-medium, $secondary-medium);
|
|
h3 {
|
|
margin-bottom: 1em;
|
|
}
|
|
}
|
|
|
|
.badge-title {
|
|
.user-content {
|
|
padding: 0;
|
|
}
|
|
}
|
|
|
|
.badge-group-list {
|
|
margin-bottom: 1.5em;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
@include breakpoint(medium) {
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.title {
|
|
width: 100%;
|
|
font-size: $font-up-1;
|
|
}
|
|
}
|
|
|
|
.show-badge-details {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
flex-direction: row;
|
|
margin-bottom: 2em;
|
|
margin-top: 1em;
|
|
|
|
.badge-grant-info {
|
|
&.hidden {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.grant-info-item {
|
|
margin-bottom: 1em;
|
|
color: dark-light-choose($primary-medium, $secondary-medium);
|
|
&:first-of-type {
|
|
margin-right: 10px;
|
|
}
|
|
}
|
|
|
|
.badge-set-title {
|
|
padding: 1.5em;
|
|
border: 1px solid $primary-low;
|
|
|
|
.user-content {
|
|
padding: 0;
|
|
.control-group {
|
|
margin-bottom: 1em;
|
|
}
|
|
}
|
|
}
|
|
|
|
.badge-title .form-horizontal .controls {
|
|
margin-left: 0;
|
|
}
|
|
|
|
.form-horizontal {
|
|
margin-bottom: 0;
|
|
}
|
|
}
|
|
|
|
.check-display {
|
|
display: inline-block;
|
|
padding: 0 0.25em;
|
|
border-radius: 10px;
|
|
text-align: center;
|
|
.fa {
|
|
font-size: 0.9em;
|
|
color: $secondary;
|
|
}
|
|
}
|
|
|
|
.check-display.status-checked {
|
|
background-color: $success;
|
|
}
|
|
|
|
.check-display.status-unchecked {
|
|
background-color: $danger;
|
|
}
|
|
|
|
.hyperlink {
|
|
cursor: pointer;
|
|
}
|