mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 21:50:24 +08:00
309 lines
5.5 KiB
SCSS
309 lines
5.5 KiB
SCSS
// 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;
|
|
|
|
#user-card {
|
|
position: absolute;
|
|
width: 500px;
|
|
left: -9999px;
|
|
top: -9999px;
|
|
z-index: z("usercard");
|
|
box-shadow: shadow("card");
|
|
margin-top: -2px;
|
|
color: $user_card_primary;
|
|
background: $user_card_background center center;
|
|
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));
|
|
}
|
|
|
|
.card-content {
|
|
padding: 12px 12px 0 12px;
|
|
background: rgba($user_card_background, .85);
|
|
margin-top: 80px;
|
|
|
|
&:after {
|
|
content: '';
|
|
display: block;
|
|
clear: both;
|
|
}
|
|
|
|
a.card-huge-avatar {
|
|
outline: none;
|
|
}
|
|
}
|
|
|
|
&.no-bg {
|
|
min-height: 50px;
|
|
|
|
.card-content {
|
|
margin-top: 0;
|
|
}
|
|
}
|
|
|
|
.avatar-placeholder {
|
|
width: 120px;
|
|
height: 120px;
|
|
float: left;
|
|
padding-right: 10px;
|
|
}
|
|
|
|
h1 {
|
|
min-width: 120px;
|
|
font-size: $font-up-4;
|
|
line-height: $line-height-medium;
|
|
display: block;
|
|
max-width: 250px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
a {
|
|
color: $user_card_primary;
|
|
}
|
|
i {
|
|
font-size: $font-down-1;
|
|
color: $user_card_primary;
|
|
}
|
|
}
|
|
|
|
h2 {
|
|
font-size: $font-up-1;
|
|
line-height: $line-height-medium;
|
|
font-weight: normal;
|
|
display: block;
|
|
max-width: 250px;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
a {
|
|
color: $user_card_primary;
|
|
}
|
|
}
|
|
|
|
h3 {
|
|
font-size: $font-0;
|
|
font-weight: normal;
|
|
margin-top: 0;
|
|
color: scale-color($user_card_primary, $lightness: 20%);
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
a {
|
|
color: scale-color($user_card_background, $lightness: 50%);
|
|
}
|
|
}
|
|
|
|
.groups {
|
|
font-size: $font-down-1;
|
|
font-weight: normal;
|
|
margin-top: 0;
|
|
color: $user_card_background;
|
|
|
|
.group-link {
|
|
color: $user_card_background;
|
|
}
|
|
}
|
|
|
|
.metadata {
|
|
width: 100%;
|
|
clear: both;
|
|
padding-top: 5px;
|
|
padding-bottom: 5px;
|
|
h3 {
|
|
display: inline;
|
|
margin-right: 5px;
|
|
.desc, a {
|
|
color: scale-color($user_card_primary, $lightness: 35%);
|
|
}
|
|
}
|
|
div {display: inline; color: scale-color($user_card_background, $lightness: 50%);
|
|
.group-link {color: scale-color($user_card_background, $lightness: 50%);}
|
|
}
|
|
}
|
|
|
|
.bottom {
|
|
clear: both;
|
|
padding-top: 10px;
|
|
}
|
|
|
|
&.has-card-badge-image .bio {
|
|
width: 75%;
|
|
}
|
|
|
|
.bio {
|
|
padding: 10px 0 0 0;
|
|
clear: left;
|
|
|
|
a {
|
|
color: $user_card_primary;
|
|
text-decoration: underline;
|
|
}
|
|
img {
|
|
max-width: 100%;
|
|
}
|
|
|
|
a.mention {
|
|
text-decoration: none;
|
|
}
|
|
|
|
.overflow {
|
|
max-height: 60px;
|
|
overflow: hidden;
|
|
}
|
|
}
|
|
|
|
.location-and-website {
|
|
display: flex;
|
|
width: 100%;
|
|
align-items: center;
|
|
padding-top: 5px;
|
|
.location, .website-name {
|
|
display: flex;
|
|
max-width: 90%;
|
|
overflow: hidden;
|
|
align-items: baseline;
|
|
i {
|
|
margin-right: .25em;
|
|
}
|
|
}
|
|
.website-name a, .location span {
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
color: $user_card_primary;
|
|
}
|
|
.location {
|
|
margin-right: .5em;
|
|
}
|
|
.website-name a {
|
|
text-decoration: underline;
|
|
}
|
|
}
|
|
|
|
.user-card-avatar {
|
|
float: left;
|
|
margin-right: 10px;
|
|
margin-top: -53px;
|
|
}
|
|
|
|
.group-card-avatar {
|
|
float: left;
|
|
margin-right: 10px;
|
|
margin-top: -5px;
|
|
$size: 50px;
|
|
.avatar-flair {
|
|
width: $size;
|
|
height: $size;
|
|
display: flex;
|
|
align-items: center;
|
|
background-repeat: no-repeat;
|
|
background-position: center;
|
|
background-size: $size;
|
|
color: $primary;
|
|
i {
|
|
margin: auto;
|
|
font-size: $size !important;
|
|
}
|
|
}
|
|
}
|
|
|
|
.members {
|
|
a {
|
|
color: lighten($primary, 40%);
|
|
&:hover {
|
|
color: $primary;
|
|
}
|
|
}
|
|
}
|
|
|
|
p {
|
|
margin: 0 0 5px 0;
|
|
}
|
|
|
|
.btn {
|
|
margin: 0 0 7px 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.usercard-controls {
|
|
list-style-type: none;
|
|
float: right;
|
|
margin: 0;
|
|
|
|
button { width: 100%; min-width: 150px; }
|
|
}
|
|
|
|
.new-user a {
|
|
color: scale-color($user_card_background, $lightness: 70%);
|
|
}
|
|
|
|
&.show-badges {
|
|
width: 580px;
|
|
|
|
.names {
|
|
float: left;
|
|
width: 45%;
|
|
|
|
span {
|
|
display: block;
|
|
width: 250px;
|
|
}
|
|
}
|
|
|
|
.badge-section {
|
|
float: left;
|
|
width: 500px;
|
|
padding-bottom: 10px;
|
|
margin-top: 5px;
|
|
|
|
.user-badge {
|
|
background: scale-color($user_card_background, $lightness: -5%);
|
|
border: 1px solid $primary-low;
|
|
color: $user_card_primary;
|
|
}
|
|
|
|
h3 {
|
|
color: $user_card_background;
|
|
font-size: $font-0;
|
|
margin-bottom: -8px;
|
|
}
|
|
}
|
|
|
|
.more-user-badges {
|
|
@extend .user-badge;
|
|
padding: 3px 8px;
|
|
}
|
|
}
|
|
|
|
.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: $font-up-5;
|
|
i {color: $user_card_primary;}
|
|
}
|
|
|
|
.metadata .email .btn {
|
|
padding: 2px 12px;
|
|
}
|
|
}
|