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

701 lines
11 KiB
SCSS
Raw Normal View History

// Common styles for "/user" section
// These styles are also used for "/groups" — test those pages if making significant changes
.user-right {
.list-actions {
margin-bottom: 10px;
.btn {
margin-right: 10px;
}
}
.paginated-topics-list {
position: relative;
}
.show-mores {
width: 100%;
}
}
2015-07-22 19:19:15 +08:00
.user-main {
.about {
overflow: hidden;
width: 100%;
margin-bottom: 15px;
.secondary {
background: $secondary;
border-top: 1px solid $primary-low;
border-bottom: 1px solid $primary-low;
.btn {
padding: 4px 12px;
}
dl {
margin: 0;
padding: 5px 10px;
div {
display: inline-flex;
align-items: baseline;
margin-right: 15px;
2018-04-20 23:44:17 +08:00
margin: 4px 0;
}
}
dt,
dd {
display: inline-flex;
align-items: center;
}
dd {
padding: 0;
margin: 0 15px 0 0;
overflow: hidden;
text-overflow: ellipsis;
color: $primary;
&.groups {
span:after {
content: ",";
}
span:last-of-type:after {
content: "";
}
}
}
dt {
color: $secondary-medium;
2018-04-20 23:44:17 +08:00
margin-right: 5px;
display: inline-block;
}
}
.details {
background: rgba($secondary, 0.8);
h1 {
2018-01-13 06:27:38 +08:00
font-size: $font-up-5;
font-weight: normal;
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-27 05:49:57 +08:00
.d-icon {
font-size: 0.8em;
}
}
h2 {
2018-01-13 06:27:38 +08:00
font-size: $font-up-2;
font-weight: normal;
margin-top: 10px;
max-width: 100%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
h3 {
font-weight: normal;
2018-01-13 06:27:38 +08:00
font-size: $font-0;
margin: 5px 0;
.d-icon:not(:first-of-type) {
margin-left: 10px;
}
}
.groups {
margin-left: 10px;
display: inline;
}
img.avatar {
float: left;
}
.suspended {
color: $danger;
}
.primary {
width: 100%;
position: relative;
float: left;
h1 {
font-weight: bold;
}
.bio {
max-height: 300px;
overflow: auto;
a[href] {
text-decoration: underline;
}
img {
max-width: 100%;
}
}
}
.user-profile-avatar {
position: relative;
float: left;
.avatar-flair {
bottom: 8px;
right: 16px;
}
}
}
.controls {
ul {
list-style-type: none;
}
a {
margin-bottom: 10px;
line-height: $line-height-medium;
}
}
&.collapsed-info {
.controls {
margin-top: 0;
}
.profile-image {
height: 0;
}
.details {
margin-top: 0;
background: rgba($secondary, 0.8);
.bio {
display: none;
}
.primary {
text-align: left;
margin-top: 0;
width: 100%;
.avatar {
float: left;
margin-right: 10px;
width: 45px;
height: 45px;
}
h1 {
2018-01-13 06:27:38 +08:00
font-size: $font-up-3;
}
h2 {
2018-01-13 06:27:38 +08:00
font-size: $font-up-1;
margin-top: 4px;
}
h3 {
display: none;
}
}
}
.user-profile-avatar {
.avatar-flair {
bottom: 8px;
right: 2px;
.fa {
font-size: $font-0;
}
}
}
}
}
.staff-counters {
background: $primary;
color: $secondary;
display: flex;
padding: 10px;
> div,
> div a {
display: flex;
align-items: baseline;
flex: 0 1 auto;
margin: 0 10px 0 0;
span {
padding: 1px 6px;
border-radius: 10px;
margin-right: 5px;
}
}
a {
color: $secondary;
}
.active {
font-weight: bold;
}
}
.pill {
border-radius: 15px;
display: inline-block;
height: 30px;
width: 30px;
text-align: center;
vertical-align: middle;
2018-01-13 06:27:38 +08:00
line-height: $line-height-large;
}
.helpful-flags {
background-color: green;
}
.flagged-posts {
background-color: #e49735;
}
.warnings-received {
background-color: #ec441b;
}
.deleted-posts {
background-color: #ec441b;
}
.suspensions {
background-color: #c22020;
}
.user-field {
clear: both;
margin-bottom: 10px;
&.text {
padding-top: 18px;
}
.controls {
label {
width: auto;
text-align: left;
font-weight: normal;
}
.instructions {
color: dark-light-choose($primary-medium, $secondary-medium);
margin-top: 5px;
margin-bottom: 10px;
2018-01-13 06:27:38 +08:00
font-size: $font-down-1;
line-height: $line-height-large;
}
}
}
2015-07-22 19:19:15 +08:00
}
.user-field {
.required {
vertical-align: top;
color: $danger;
font-weight: bold;
margin-left: 0.25em;
}
}
.public-user-fields {
margin-top: 8px;
margin-bottom: 8px;
.user-field-name {
font-weight: bold;
}
.collapsed-info & {
display: none;
}
}
.user-navigation {
.map {
height: 50px;
}
.avatar {
float: left;
width: 45px;
}
nav.buttons {
width: 180px;
padding: 0;
.btn {
width: 100%;
margin-bottom: 5px;
box-sizing: border-box;
}
}
h2 {
a {
2018-01-13 06:27:38 +08:00
font-size: $font-0;
2015-11-21 00:36:55 +08:00
color: scale-color($tertiary, $lightness: -10%);
cursor: pointer;
}
}
}
.user-table {
position: relative;
margin-top: 20px;
}
.avatar-selector {
padding-bottom: 0 !important;
label.radio {
padding-left: 10px;
}
.avatar-choice {
min-height: 40px;
}
label {
display: inline-block;
margin-right: 10px;
}
#avatar-input {
width: 0;
height: 0;
overflow: hidden;
}
.avatar {
margin: 5px 10px 5px 0;
}
p.error {
color: $danger;
}
}
.new-private-message {
margin-bottom: 15px;
}
.user-nav {
margin: 5px 0;
}
.top-section {
@include clearfix();
2016-03-31 00:05:16 +08:00
ul {
list-style: none;
margin: 0;
}
2016-03-31 00:05:16 +08:00
}
.top-section,
.top-sub-section {
2016-03-31 00:05:16 +08:00
margin-bottom: 20px;
&.badges-section {
display: flex;
flex-wrap: wrap;
}
2016-03-31 00:05:16 +08:00
}
.stats-title {
text-transform: uppercase;
margin-bottom: 10px;
width: 100%;
2016-03-31 00:05:16 +08:00
}
.stats-section {
ul {
margin: 10px 0;
}
2016-03-31 00:05:16 +08:00
li {
display: inline-block;
padding: 10px 14px;
margin: 0 5px 10px 0;
&.linked-stat {
// This makes the entire "box" (the li) clickable instead of a narrow area.
padding: 0;
a {
padding: 10px 14px;
width: 100%;
height: 100%;
display: block;
2017-07-23 06:48:31 +08:00
color: $primary;
}
}
}
2016-03-31 00:05:16 +08:00
li:last-of-type {
margin: 0;
}
2016-03-31 00:05:16 +08:00
.value {
font-weight: bold;
2018-01-13 06:27:38 +08:00
font-size: $font-up-2;
}
.label {
// TODO: Remove once all languages have been translated to remove icons from
// their user-stat labels
.fa:nth-of-type(2) {
display: none;
}
2017-06-12 10:20:14 +08:00
color: blend-primary-secondary(50%);
}
2016-03-31 00:05:16 +08:00
}
.top-sub-section {
2016-03-31 00:05:16 +08:00
width: 50%;
ul {
max-width: 95%;
}
li {
2017-06-12 10:20:14 +08:00
border-left: $primary-low solid 2px;
2016-03-31 00:05:16 +08:00
padding: 5px 8px;
margin: 10px 0;
}
2016-03-31 00:05:16 +08:00
.topic-info {
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-medium, $secondary-high);
}
@media all and (max-width: 600px) {
float: none;
width: 100%;
}
}
2016-04-19 00:07:14 +08:00
.replies-section,
.topics-section,
.links-section {
li {
word-wrap: break-word;
}
}
.links-section {
.domain {
2018-01-13 06:27:38 +08:00
font-size: $font-down-1;
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-medium, $secondary-high);
}
2016-03-31 00:05:16 +08:00
}
.top-categories-section {
table {
max-width: 95%;
tr {
border: none;
}
td,
th {
padding: 0.5em;
&.topic-count,
&.reply-count {
text-align: center;
}
}
}
}
.summary-user-list {
li {
height: 40px;
}
2016-03-31 00:05:16 +08:00
}
.groups {
.group-link {
color: $tertiary;
}
}
.user-preferences {
textarea {
height: 100px;
}
.static {
color: $primary;
display: inline-block;
}
.instructions {
2017-10-11 04:07:46 +08:00
color: dark-light-choose($primary-medium, $secondary-medium);
margin-bottom: 10px;
2018-01-13 06:27:38 +08:00
font-size: $font-down-1;
line-height: $line-height-large;
a[href] {
color: $tertiary;
}
}
.avatar {
margin-left: 3px;
}
.warning {
2017-10-11 04:07:46 +08:00
background-color: $danger-medium;
padding: 5px 8px;
color: $secondary;
width: 520px;
}
.warning-wrap {
height: 30px;
margin-bottom: 10px;
}
.category-notifications .category-controls,
.tag-notifications .tag-controls {
margin-top: 24px;
}
2018-06-28 16:12:32 +08:00
&.second-factor-backup-preferences {
padding-left: 0;
.second-factor-token-input {
margin-right: 10px;
}
.form-horizontal .instructions {
margin-left: 0;
}
.backup-codes {
margin: 2em 0;
.wrapper {
display: inline-block;
position: relative;
padding: 10px;
border-radius: 3px;
border: 1px solid $primary-low;
}
.backup-codes-area {
resize: none;
padding: 0;
height: auto;
text-align: center;
width: 250px;
background: white;
border: 0;
cursor: auto;
overflow: hidden;
outline: none;
font-family: monospace;
&:focus {
box-shadow: none;
border-color: #e9e9e9;
}
}
.backup-codes-copy-btn,
.backup-codes-download-btn {
right: 5px;
position: absolute;
}
.backup-codes-copy-btn {
top: 5px;
}
.backup-codes-download-btn {
top: 40px;
}
}
}
.pref-associated-accounts table {
td {
padding: 8px;
}
}
}
.paginated-topics-list {
.user-content {
width: 100%;
margin-top: 0;
}
}
.large-notification {
display: flex;
align-items: center;
a {
display: flex;
align-items: center;
.d-icon {
margin-right: 0.5em;
}
span {
color: $primary;
}
// Can remove this once other languages have removed html from i18n values
div {
.fa {
display: none;
}
p {
margin: 0;
}
}
}
}
.qr-code-container {
display: flex;
.qr-code {
padding: 5px 5px 0 5px;
background-color: white;
}
}
2018-04-20 23:44:17 +08:00
.primary-textual .staged,
#user-card .staged {
font-style: italic;
}
2018-07-18 18:57:43 +08:00
.selectable-avatars {
max-height: 350px;
margin-bottom: 1em;
text-align: justify;
.selectable-avatar {
margin: 5px;
display: inline-block;
.avatar {
cursor: pointer;
2018-07-18 18:57:43 +08:00
width: 60px;
height: 60px;
&:hover {
box-shadow: 0 0 10px $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-27 05:49:57 +08:00
.user-summary-page .d-icon-heart {
color: $love;
}