discourse/app/assets/stylesheets/common/base/user-badges.scss

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

330 lines
5.2 KiB
SCSS
Raw Normal View History

2014-04-16 14:49:28 -04:00
/* Default badge styles. */
2014-04-16 06:02:57 -04:00
.user-badge {
padding: 3px 8px;
color: var(--primary);
border: 1px solid var(--primary-low);
2018-01-12 17:27:38 -05:00
line-height: $line-height-large;
2018-12-14 22:16:18 -05:00
display: inline-flex;
align-items: center;
background-color: var(--secondary);
margin: 4px 0 0;
2014-04-16 06:02:57 -04:00
img {
height: 16px;
width: 16px;
}
2019-01-23 05:29:51 -05:00
.badge-display-name {
margin-left: 0.25em;
}
2014-04-16 06:02:57 -04:00
&.badge-type-gold .fa {
color: var(--gold) !important;
2014-04-16 06:02:57 -04:00
}
&.badge-type-silver .fa {
color: var(--silver) !important;
2014-04-16 06:02:57 -04:00
}
&.badge-type-bronze .fa {
color: var(--bronze) !important;
2014-04-16 06:02:57 -04:00
}
&.disabled {
color: var(--primary-medium);
background-color: var(--primary-very-low);
.fa {
opacity: 0.4;
}
}
2014-04-16 06:02:57 -04:00
}
2015-11-05 04:51:05 -05:00
@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 {
2015-11-05 04:51:05 -05:00
text-align: left;
}
.row > div.info {
display: none;
}
2015-11-05 04:51:05 -05:00
.row {
display: block;
> div {
display: block;
margin-top: 10px;
}
}
}
}
2016-03-30 12:05:16 -04:00
.show-badge .badge-user-info {
.earned {
font-size: var(--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: var(--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: var(--font-up-1);
margin-left: 10px;
}
.post-link {
font-size: var(--font-up-2);
width: 500px;
margin: 0;
padding: 0;
}
width: 800px;
&:after {
content: "";
clear: both;
display: table;
}
}
.long-description.banner {
width: 88%;
2016-03-23 02:27:03 -04:00
margin-bottom: 15px;
margin-top: 15px;
}
.badge-card {
background-color: var(--primary-very-low);
border: 1px solid var(--primary-low);
position: relative;
.check-display {
position: absolute;
left: 5px;
top: 5px;
}
.grant-count {
position: absolute;
right: 5px;
top: 5px;
font-weight: bold;
color: var(--primary-medium);
font-size: var(--font-up-2);
}
.favorite-btn {
position: absolute;
right: 0;
bottom: 0;
}
.badge-contents {
display: flex;
min-height: 8em;
padding: 0 1.5em;
2018-03-02 12:42:02 -05:00
.badge-link {
color: var(--primary);
2018-03-02 12:42:02 -05:00
}
.badge-icon {
display: flex;
flex-shrink: 0;
margin-right: 1.5em;
align-items: center;
justify-content: center;
width: 64px;
svg {
font-size: 3.5em;
}
2016-03-28 14:39:55 -04:00
img {
width: 100%;
max-width: 64px;
max-height: 64px;
2016-03-28 14:39:55 -04:00
}
&.badge-type-gold .fa {
2016-04-05 03:05:38 -04:00
color: rgb(231, 195, 0) !important;
}
&.badge-type-silver .fa {
color: #c0c0c0 !important;
}
&.badge-type-bronze .fa {
color: #cd7f32 !important;
}
}
.badge-info {
display: flex;
2018-03-02 12:42:02 -05:00
flex: 1 1 auto;
align-items: center;
padding: 1em 0;
color: var(--primary);
h3 {
2018-03-02 12:42:02 -05:00
margin-bottom: 0.25em;
font-size: var(--font-up-1);
2018-03-02 12:42:02 -05:00
@media screen and (min-width: 900px) {
font-size: var(--font-up-2);
2018-03-02 12:42:02 -05:00
}
}
}
}
2018-03-02 12:42:02 -05:00
&.large {
2016-03-30 12:05:16 -04:00
width: 100%;
align-self: flex-start;
2018-03-02 12:42:02 -05:00
@media screen and (min-width: 767px) {
max-width: calc(var(--d-max-width) / 2);
margin-right: 1.5em;
2018-03-02 12:42:02 -05:00
}
2018-03-02 12:42:02 -05:00
.badge-contents {
padding: 0 5%;
h3 {
font-size: var(--font-up-3);
}
2018-03-02 12:42:02 -05:00
}
2016-03-30 12:05:16 -04:00
}
}
2018-03-02 12:42:02 -05:00
.badges-granted {
display: flex;
flex-wrap: wrap;
@media screen and (max-width: $small-width) {
justify-content: space-between;
}
}
.badge-groups {
margin: 20px 0;
color: var(--primary-med-or-secondary-med);
h3 {
margin-bottom: 1em;
}
}
.badge-title {
.user-content {
padding: 0;
}
}
.badge-group-list {
display: grid;
grid: auto-flow / repeat(3, 1fr);
grid-gap: 1em;
2021-07-27 00:15:09 -04:00
width: 100%;
margin-bottom: 1.5em;
2018-07-12 16:38:51 -04:00
@include breakpoint(medium) {
grid: auto-flow / repeat(2, 1fr);
}
@include breakpoint(mobile-extra-large) {
grid: auto-flow / 1fr;
2018-03-02 12:42:02 -05:00
}
.title {
font-size: var(--font-up-1);
2018-03-02 12:42:02 -05:00
}
}
.show-badge-details {
display: flex;
2018-03-02 13:21:04 -05:00
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: var(--primary-med-or-secondary-med);
&:first-of-type {
margin-right: 10px;
}
}
.badge-set-title {
padding: 1.5em;
border: 1px solid var(--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;
2019-01-31 15:27:46 -05:00
padding: 0 0.25em;
border-radius: 10px;
text-align: center;
.fa {
font-size: 0.9em;
color: var(--secondary);
}
}
.check-display.status-checked {
background-color: var(--success);
}
.check-display.status-unchecked {
background-color: var(--danger);
}
.hyperlink {
cursor: pointer;
}