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

316 lines
5.4 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-18 16:28:02 -04:00
#user-card,
#group-card {
position: absolute;
width: 580px;
2015-03-04 07:02:36 -05:00
left: -9999px;
top: -9999px;
z-index: z("usercard");
box-shadow: shadow("card");
margin-top: -2px;
2015-08-18 16:28:02 -04:00
color: $user_card_primary;
background: $user_card_background center center;
2015-10-15 20:10:02 -04:00
background-size: cover;
min-height: 175px;
-webkit-transition: opacity 0.2s, -webkit-transform 0.2s;
transition: opacity 0.2s, transform 0.2s;
opacity: 0;
@include transform(scale(0.9));
&.show {
opacity: 1;
@include transform(scale(1));
}
&.fixed {
position: fixed;
z-index: z("composer", "content") + 1;
}
2014-10-29 19:48:20 -04:00
.card-content {
2014-11-01 22:58:18 -04:00
padding: 12px 12px 0 12px;
background: rgba($user_card_background, 0.85);
2014-11-01 22:58:18 -04:00
margin-top: 80px;
2014-10-29 19:48:20 -04:00
&:after {
content: "";
2014-10-29 19:48:20 -04:00
display: block;
clear: both;
}
a.card-huge-avatar {
outline: none;
}
2014-10-29 19:48:20 -04:00
}
.bio {
2018-05-08 15:38:55 -04:00
max-height: 150px;
overflow: auto;
}
&.no-bg {
min-height: 50px;
.card-content {
margin-top: 0;
}
2014-10-29 19:48:20 -04:00
}
.avatar-placeholder {
width: 120px;
height: 120px;
float: left;
padding-right: 10px;
}
h1 {
min-width: 120px;
2018-01-12 17:27:38 -05:00
font-size: $font-up-4;
line-height: $line-height-medium;
2014-07-03 23:40:49 -04:00
display: block;
2014-10-29 19:48:20 -04:00
max-width: 250px;
2014-07-03 23:40:49 -04:00
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
2013-10-04 16:55:54 -04:00
a {
2015-08-18 16:28:02 -04:00
color: $user_card_primary;
2013-10-04 16:55:54 -04:00
}
Upgrade to FontAwesome 5 (take two) (#6673) * Add missing icons to set * Revert FA5 revert This reverts commit 42572ff * use new SVG syntax in locales * Noscript page changes (remove login button, center "powered by" footer text) * Cast wider net for SVG icons in settings - include any _icon setting for SVG registry (offers better support for plugin settings) - let themes store multiple pipe-delimited icons in a setting - also replaces broken onebox image icon with SVG reference in cooked post processor * interpolate icons in locales * Fix composer whisper icon alignment * Add support for stacked icons * SECURITY: enforce hostname to match discourse hostname This ensures that the hostname rails uses for various helpers always matches the Discourse hostname * load SVG sprite with pre-initializers * FIX: enable caching on SVG sprites * PERF: use JSONP for SVG sprites so they are served from CDN This avoids needing to deal with CORS for loading of the SVG Note, added the svg- prefix to the filename so we can quickly tell in dev tools what the file is * Add missing SVG sprite JSONP script to CSP * Upgrade to FA 5.5.0 * Add support for all FA4.7 icons - adds complete frontend and backend for renamed FA4.7 icons - improves performance of SvgSprite.bundle and SvgSprite.all_icons * Fix group avatar flair preview - adds an endpoint at /svg-sprites/search/:keyword - adds frontend ajax call that pulls icon in avatar flair preview even when it is not in subset * Remove FA 4.7 font files
2018-11-26 16:49:57 -05:00
.d-icon {
2018-01-12 17:27:38 -05:00
font-size: $font-down-1;
2015-08-18 16:28:02 -04:00
color: $user_card_primary;
2014-11-01 22:58:18 -04:00
}
}
h2 {
2018-01-12 17:27:38 -05:00
font-size: $font-up-1;
2018-05-08 15:38:55 -04:00
line-height: $line-height-large;
margin: 0;
font-weight: normal;
2014-07-03 23:40:49 -04:00
display: block;
2014-10-29 19:48:20 -04:00
max-width: 250px;
2014-07-03 23:40:49 -04:00
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
a {
2015-08-18 16:28:02 -04:00
color: $user_card_primary;
}
}
h3 {
2018-01-12 17:27:38 -05:00
font-size: $font-0;
font-weight: normal;
margin-top: 0;
color: scale-color($user_card_primary, $lightness: 20%);
overflow: hidden;
text-overflow: ellipsis;
2014-10-29 19:48:20 -04:00
a {
2015-08-18 16:28:02 -04:00
color: scale-color($user_card_background, $lightness: 50%);
2014-10-29 19:48:20 -04:00
}
}
.groups {
2018-01-12 17:27:38 -05:00
font-size: $font-down-1;
font-weight: normal;
margin-top: 0;
2015-08-18 16:28:02 -04:00
color: $user_card_background;
.group-link {
2015-08-18 16:28:02 -04:00
color: $user_card_background;
}
}
.metadata {
2014-11-01 22:58:18 -04:00
width: 100%;
clear: both;
2018-05-08 15:38:55 -04:00
padding-top: 10px;
padding-bottom: 10px;
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%);
}
2014-11-01 22:58:18 -04:00
}
}
.bottom {
clear: both;
padding-top: 10px;
}
.bio {
2018-05-08 15:38:55 -04:00
margin-top: 80px;
2014-11-01 22:58:18 -04:00
clear: left;
2014-10-29 19:48:20 -04:00
a {
2015-08-18 16:28:02 -04:00
color: $user_card_primary;
2014-10-29 19:48:20 -04:00
text-decoration: underline;
}
img {
max-width: 100%;
}
2014-11-01 22:58:18 -04:00
a.mention {
text-decoration: none;
}
2016-09-15 16:15:08 -04:00
2014-11-01 22:58:18 -04:00
.overflow {
max-height: 60px;
overflow: hidden;
}
}
.location-and-website {
display: flex;
width: 100%;
align-items: center;
padding-top: 5px;
.location,
.website-name {
display: flex;
2018-02-10 21:27:25 -05:00
max-width: 90%;
overflow: hidden;
align-items: baseline;
Upgrade to FontAwesome 5 (take two) (#6673) * Add missing icons to set * Revert FA5 revert This reverts commit 42572ff * use new SVG syntax in locales * Noscript page changes (remove login button, center "powered by" footer text) * Cast wider net for SVG icons in settings - include any _icon setting for SVG registry (offers better support for plugin settings) - let themes store multiple pipe-delimited icons in a setting - also replaces broken onebox image icon with SVG reference in cooked post processor * interpolate icons in locales * Fix composer whisper icon alignment * Add support for stacked icons * SECURITY: enforce hostname to match discourse hostname This ensures that the hostname rails uses for various helpers always matches the Discourse hostname * load SVG sprite with pre-initializers * FIX: enable caching on SVG sprites * PERF: use JSONP for SVG sprites so they are served from CDN This avoids needing to deal with CORS for loading of the SVG Note, added the svg- prefix to the filename so we can quickly tell in dev tools what the file is * Add missing SVG sprite JSONP script to CSP * Upgrade to FA 5.5.0 * Add support for all FA4.7 icons - adds complete frontend and backend for renamed FA4.7 icons - improves performance of SvgSprite.bundle and SvgSprite.all_icons * Fix group avatar flair preview - adds an endpoint at /svg-sprites/search/:keyword - adds frontend ajax call that pulls icon in avatar flair preview even when it is not in subset * Remove FA 4.7 font files
2018-11-26 16:49:57 -05:00
.d-icon {
margin-right: 0.25em;
}
}
.website-name a,
.location span {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: $user_card_primary;
}
.location {
margin-right: 0.5em;
}
.website-name a {
text-decoration: underline;
}
}
.user-card-avatar,
.group-card-avatar {
float: left;
2015-04-02 21:28:13 -04:00
margin-right: 10px;
2014-11-01 22:58:18 -04:00
margin-top: -53px;
}
.group-card-avatar {
2018-05-08 15:38:55 -04:00
$size: 120px;
width: $size;
height: $size;
.avatar-flair {
2018-04-17 12:27:48 -04:00
width: $size;
height: $size;
display: flex;
align-items: center;
background-repeat: no-repeat;
background-position: center;
2018-04-17 12:27:48 -04:00
background-size: $size;
color: $primary;
Upgrade to FontAwesome 5 (take two) (#6673) * Add missing icons to set * Revert FA5 revert This reverts commit 42572ff * use new SVG syntax in locales * Noscript page changes (remove login button, center "powered by" footer text) * Cast wider net for SVG icons in settings - include any _icon setting for SVG registry (offers better support for plugin settings) - let themes store multiple pipe-delimited icons in a setting - also replaces broken onebox image icon with SVG reference in cooked post processor * interpolate icons in locales * Fix composer whisper icon alignment * Add support for stacked icons * SECURITY: enforce hostname to match discourse hostname This ensures that the hostname rails uses for various helpers always matches the Discourse hostname * load SVG sprite with pre-initializers * FIX: enable caching on SVG sprites * PERF: use JSONP for SVG sprites so they are served from CDN This avoids needing to deal with CORS for loading of the SVG Note, added the svg- prefix to the filename so we can quickly tell in dev tools what the file is * Add missing SVG sprite JSONP script to CSP * Upgrade to FA 5.5.0 * Add support for all FA4.7 icons - adds complete frontend and backend for renamed FA4.7 icons - improves performance of SvgSprite.bundle and SvgSprite.all_icons * Fix group avatar flair preview - adds an endpoint at /svg-sprites/search/:keyword - adds frontend ajax call that pulls icon in avatar flair preview even when it is not in subset * Remove FA 4.7 font files
2018-11-26 16:49:57 -05:00
.d-icon {
margin: auto;
2018-05-08 15:38:55 -04:00
font-size: $size / 1.5 !important;
}
&.rounded {
border-radius: 50%;
}
}
}
2018-04-17 12:27:48 -04:00
.members {
2018-05-08 15:38:55 -04:00
padding: 0 0 10px 0;
a {
color: lighten($primary, 40%);
&:hover {
color: $primary;
}
}
}
p {
margin: 0 0 5px 0;
}
.btn {
margin: 0 0 7px 0;
2014-10-29 19:48:20 -04:00
box-sizing: border-box;
}
.usercard-controls {
list-style-type: none;
2014-11-01 22:58:18 -04:00
float: right;
margin: 0;
2014-10-29 19:48:20 -04:00
button {
width: 100%;
min-width: 150px;
}
}
2013-12-19 18:58:48 -05:00
.new-user a {
2015-08-18 16:28:02 -04:00
color: scale-color($user_card_background, $lightness: 70%);
2013-12-19 18:58:48 -05:00
}
.names {
float: left;
width: 45%;
2014-10-29 19:48:20 -04:00
span {
display: block;
width: 250px;
}
}
.badge-section {
float: left;
width: 500px;
padding-bottom: 10px;
margin-top: 5px;
2014-07-03 23:40:49 -04:00
.user-badge {
background: $primary-very-low;
border: 1px solid $primary-low;
color: $user_card_primary;
}
2014-04-14 01:58:36 -04:00
h3 {
color: $user_card_background;
font-size: $font-0;
margin-bottom: -8px;
2014-04-16 06:02:57 -04:00
}
2014-04-14 01:58:36 -04:00
}
.more-user-badges {
@extend .user-badge;
padding: 3px 8px;
}
.suspended {
color: $danger;
margin-bottom: 5px;
clear: left;
padding-top: 15px;
}
.metadata .email .btn {
padding: 2px 12px;
}
2014-04-14 01:58:36 -04:00
}