discourse/app/assets/stylesheets/desktop/user-card.scss

266 lines
4.6 KiB
SCSS
Raw Normal View History

// styles that apply to the "share" popup when sharing a link to a post or topic
// Colors should mostly be absolute here, it will look the same in dark & light themes
$user_card_primary: $primary;
$user_card_background: $secondary;
2015-08-19 04:28:02 +08:00
#user-card {
position: absolute;
2014-10-30 07:48:20 +08:00
width: 500px;
2015-03-04 20:02:36 +08:00
left: -9999px;
top: -9999px;
z-index: 990;
box-shadow: 1px 2px 6px rgba(0,0,0, .25);
margin-top: -2px;
2015-08-19 04:28:02 +08:00
color: $user_card_primary;
background: $user_card_background center center;
2015-10-16 08:10:02 +08:00
background-size: cover;
min-height: 175px;
-webkit-transition: opacity .2s, -webkit-transform .2s;
transition: opacity .2s, transform .2s;
opacity: 0;
@include transform(scale(.9));
&.show {
opacity: 1;
@include transform(scale(1));
}
2014-10-30 07:48:20 +08:00
.card-content {
2014-11-02 10:58:18 +08:00
padding: 12px 12px 0 12px;
2015-08-19 04:28:02 +08:00
background: rgba($user_card_background, .85);
2014-11-02 10:58:18 +08:00
margin-top: 80px;
2014-10-30 07:48:20 +08:00
&:after {
content: '';
display: block;
clear: both;
}
a.card-huge-avatar {
outline: none;
}
.staged {
font-style: italic;
}
2014-10-30 07:48:20 +08:00
}
&.no-bg {
min-height: 50px;
.card-content {
margin-top: 0;
}
2014-10-30 07:48:20 +08:00
}
.avatar-placeholder {
width: 120px;
height: 120px;
float: left;
padding-right: 10px;
}
h1 {
min-width: 120px;
font-size: 1.786em;
2014-07-04 11:40:49 +08:00
line-height: 1.25;
display: block;
2014-10-30 07:48:20 +08:00
max-width: 250px;
2014-07-04 11:40:49 +08:00
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
2013-10-05 04:55:54 +08:00
a {
2015-08-19 04:28:02 +08:00
color: $user_card_primary;
2013-10-05 04:55:54 +08:00
}
2014-11-02 10:58:18 +08:00
i {
font-size: .8em;
2015-08-19 04:28:02 +08:00
color: $user_card_primary;
2014-11-02 10:58:18 +08:00
}
}
h2 {
font-size: 1.071em;
2014-07-04 11:40:49 +08:00
line-height: 1.25;
font-weight: normal;
2014-07-04 11:40:49 +08:00
display: block;
2014-10-30 07:48:20 +08:00
max-width: 250px;
2014-07-04 11:40:49 +08:00
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
a {
2015-08-19 04:28:02 +08:00
color: $user_card_primary;
}
}
h3 {
font-size: 0.929em;
font-weight: normal;
margin-top: 0;
color: scale-color($user_card_primary, $lightness: 20%);
overflow: hidden;
text-overflow: ellipsis;
2014-10-30 07:48:20 +08:00
a {
2015-08-19 04:28:02 +08:00
color: scale-color($user_card_background, $lightness: 50%);
2014-10-30 07:48:20 +08:00
}
}
.groups {
font-size: 0.929em;
font-weight: normal;
margin-top: 0;
2015-08-19 04:28:02 +08:00
color: $user_card_background;
.group-link {
2015-08-19 04:28:02 +08:00
color: $user_card_background;
}
}
.metadata {
2014-11-02 10:58:18 +08:00
width: 100%;
clear: both;
padding-top: 5px;
2017-02-16 17:49:29 +08:00
padding-bottom: 5px;
h3 {
display: inline;
margin-right: 5px;
.desc, a {
color: scale-color($user_card_primary, $lightness: 35%);
}
}
2015-08-19 04:28:02 +08:00
div {display: inline; color: scale-color($user_card_background, $lightness: 50%);
.group-link {color: scale-color($user_card_background, $lightness: 50%);}
2014-11-02 10:58:18 +08:00
}
}
.bottom {
clear: both;
padding-top: 10px;
}
&.has-card-badge-image .bio {
width: 75%;
}
.bio {
padding: 10px 0 0 0;
2014-11-02 10:58:18 +08:00
clear: left;
2014-10-30 07:48:20 +08:00
a {
2015-08-19 04:28:02 +08:00
color: $user_card_primary;
2014-10-30 07:48:20 +08:00
text-decoration: underline;
}
img {
max-width: 100%;
}
2014-11-02 10:58:18 +08:00
a.mention {
text-decoration: none;
}
2016-09-16 04:15:08 +08:00
2014-11-02 10:58:18 +08:00
.overflow {
max-height: 60px;
overflow: hidden;
}
}
.location-and-website {
clear: left;
margin-top: 5px;
.location {margin-right: 10px;}
.website-name {
a {
text-decoration: underline;
color: $user_card_primary;
}
}
}
2016-09-16 04:15:08 +08:00
.user-card-avatar {
float: left;
2015-04-03 09:28:13 +08:00
margin-right: 10px;
2014-11-02 10:58:18 +08:00
margin-top: -53px;
}
p {
margin: 0 0 5px 0;
}
.btn {
margin: 0 0 7px 0;
2014-10-30 07:48:20 +08:00
box-sizing: border-box;
}
.usercard-controls {
list-style-type: none;
2014-11-02 10:58:18 +08:00
float: right;
margin: 0;
2014-10-30 07:48:20 +08:00
button { width: 100%; min-width: 150px; }
}
2013-12-20 07:58:48 +08:00
.new-user a {
2015-08-19 04:28:02 +08:00
color: scale-color($user_card_background, $lightness: 70%);
2013-12-20 07:58:48 +08:00
}
&.show-badges {
2014-10-30 07:48:20 +08:00
width: 580px;
.names {
float: left;
2014-10-30 07:48:20 +08:00
width: 45%;
span {
display: block;
width: 250px;
2014-10-30 07:48:20 +08:00
}
}
.badge-section {
2014-07-04 11:40:49 +08:00
float: left;
2014-11-02 10:58:18 +08:00
width: 500px;
padding-bottom: 10px;
margin-top: 5px;
2014-10-30 07:48:20 +08:00
.user-badge {
background: scale-color($user_card_background, $lightness: -5%);
border: 1px solid $primary-low;
color: $user_card_primary;
2014-10-30 07:48:20 +08:00
}
2014-07-04 11:40:49 +08:00
h3 {
2015-08-19 04:28:02 +08:00
color: $user_card_background;
font-size: 1em;
margin-bottom: -8px;
}
}
2014-04-14 13:58:36 +08:00
2014-04-16 18:02:57 +08:00
.more-user-badges {
@extend .user-badge;
padding: 3px 8px;
2014-04-16 18:02:57 +08:00
}
2014-04-14 13:58:36 +08:00
}
.suspended {
color: $danger;
margin-bottom: 5px;
clear: left;
padding-top: 15px;
}
.card-badge {
img {
max-width: 120px;
}
position: absolute;
right: 12px;
bottom: 12px;
font-size: 2.143em;
2015-08-19 04:28:02 +08:00
i {color: $user_card_primary;}
}
.metadata .email .btn {
padding: 2px 12px;
}
2014-04-14 13:58:36 +08:00
}