mirror of
https://github.com/discourse/discourse.git
synced 2024-11-29 07:33:38 +08:00
415 lines
7.6 KiB
SCSS
415 lines
7.6 KiB
SCSS
@mixin search-page-spacing {
|
|
padding: 1rem 10%;
|
|
|
|
@include breakpoint(medium) {
|
|
padding: 1rem;
|
|
}
|
|
}
|
|
|
|
.search-highlight {
|
|
font-weight: bold;
|
|
}
|
|
|
|
.search-container {
|
|
.search-header {
|
|
@include search-page-spacing();
|
|
background: var(--primary-very-low);
|
|
}
|
|
.warning {
|
|
background-color: var(--danger-medium);
|
|
padding: 5px 8px;
|
|
margin-block: 0.5rem;
|
|
color: var(--secondary);
|
|
}
|
|
|
|
.search-page-heading {
|
|
font-size: var(--font-up-3);
|
|
|
|
// spans can be in different orders depending of locale
|
|
span + span {
|
|
margin-left: 0.25em;
|
|
}
|
|
|
|
span.term {
|
|
background: var(--tertiary-low);
|
|
}
|
|
}
|
|
|
|
.search-bar {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: stretch;
|
|
background: var(--primary-very-low);
|
|
|
|
input.search-query {
|
|
flex: 1 0 60%;
|
|
margin: 0 1em 0 0;
|
|
}
|
|
|
|
.select-kit {
|
|
margin-right: 1em;
|
|
flex: 1 0 20%;
|
|
}
|
|
|
|
@include breakpoint(mobile-extra-large) {
|
|
flex-direction: column;
|
|
|
|
input.search-query,
|
|
.select-kit {
|
|
margin-right: 0;
|
|
margin-bottom: 0.5em;
|
|
}
|
|
}
|
|
}
|
|
|
|
.search-advanced {
|
|
position: relative;
|
|
.search-actions,
|
|
.search-title,
|
|
.search-bar {
|
|
margin-bottom: 1em;
|
|
}
|
|
|
|
.search-results {
|
|
@include search-page-spacing();
|
|
}
|
|
|
|
.search-info {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
padding: 1em 10%;
|
|
background-color: var(--secondary);
|
|
border-bottom: 1px solid var(--primary-low);
|
|
@include breakpoint(medium) {
|
|
padding: 0.5em 0;
|
|
}
|
|
|
|
&.bulk-select-visible {
|
|
@include sticky;
|
|
top: 60px;
|
|
z-index: 10;
|
|
}
|
|
|
|
.sort-by {
|
|
margin-left: auto;
|
|
}
|
|
|
|
button {
|
|
margin: 0 0.5em 0 0;
|
|
@include breakpoint(medium) {
|
|
margin: 0 0.5em 0.5em 0;
|
|
}
|
|
}
|
|
|
|
#bulk-select {
|
|
position: relative;
|
|
right: unset;
|
|
margin: 0;
|
|
padding: 0;
|
|
display: inline;
|
|
button {
|
|
margin-right: 0.5em;
|
|
}
|
|
}
|
|
|
|
.sort-by.inline-form label {
|
|
margin-bottom: 0;
|
|
}
|
|
#search-sort-by {
|
|
margin-bottom: 0;
|
|
}
|
|
}
|
|
}
|
|
|
|
.search-notice .fps-invalid {
|
|
padding: 0.5em;
|
|
background-color: var(--danger-low);
|
|
border: 1px solid var(--danger-medium);
|
|
color: var(--danger);
|
|
}
|
|
|
|
.search-context {
|
|
margin-top: 1em;
|
|
}
|
|
|
|
.user-items {
|
|
display: grid;
|
|
gap: 2em 1em;
|
|
grid: auto-flow / repeat(4, minmax(0, 1fr));
|
|
|
|
@include breakpoint(medium) {
|
|
grid: auto-flow / repeat(3, 1fr);
|
|
}
|
|
|
|
@include breakpoint(tablet) {
|
|
grid: auto-flow / 1fr 1fr;
|
|
}
|
|
|
|
@include breakpoint(mobile-large) {
|
|
grid: auto-flow / 1fr;
|
|
}
|
|
}
|
|
|
|
.search-filters {
|
|
background: var(--primary-very-low);
|
|
display: flex;
|
|
flex-direction: column;
|
|
|
|
details.advanced-filters,
|
|
details.search-advanced-additional-options {
|
|
margin-top: 1em;
|
|
> summary {
|
|
color: var(--tertiary);
|
|
cursor: pointer;
|
|
padding-top: 0.25em;
|
|
padding-bottom: 0.25em;
|
|
&:focus-visible {
|
|
outline: 2px solid transparent;
|
|
background-color: var(--tertiary-very-low);
|
|
}
|
|
}
|
|
&[open] > summary {
|
|
color: var(--primary);
|
|
margin-bottom: 1em;
|
|
&:focus-visible {
|
|
background-color: var(--tertiary-very-low);
|
|
}
|
|
}
|
|
}
|
|
|
|
details.search-advanced-additional-options {
|
|
> summary {
|
|
font-size: var(--font-down-1);
|
|
}
|
|
}
|
|
|
|
.combo-box:not(#postTime),
|
|
.control-group,
|
|
.multi-select {
|
|
width: 100%;
|
|
min-width: 100%;
|
|
}
|
|
|
|
.search-advanced-filters {
|
|
background: var(--primary-very-low);
|
|
|
|
@include breakpoint(mobile-extra-large, min-width) {
|
|
.search-advanced-options {
|
|
column-count: 2;
|
|
column-gap: 2em;
|
|
.control-group {
|
|
break-inside: avoid;
|
|
}
|
|
}
|
|
}
|
|
|
|
@include breakpoint(medium, min-width) {
|
|
.search-advanced-options {
|
|
column-gap: 5em;
|
|
}
|
|
}
|
|
|
|
@include breakpoint(medium) {
|
|
.choices,
|
|
.select-kit.multi-select {
|
|
// overriding inline width from JS
|
|
width: 100% !important;
|
|
}
|
|
.select-kit {
|
|
min-width: unset;
|
|
}
|
|
}
|
|
|
|
.control-group {
|
|
margin-bottom: 1em;
|
|
}
|
|
|
|
.count-group {
|
|
input[type="number"] {
|
|
width: 8em;
|
|
}
|
|
|
|
.d-icon {
|
|
margin-left: 0.25em;
|
|
margin-right: 0.25em;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.fps-invalid {
|
|
margin-top: 1em;
|
|
margin-bottom: 1em;
|
|
}
|
|
|
|
.fps-result {
|
|
display: flex;
|
|
padding: 0 0.5em 0 0;
|
|
margin-bottom: 2em;
|
|
max-width: 100%;
|
|
word-break: break-word;
|
|
position: relative;
|
|
|
|
&.bulk-select-enabled {
|
|
padding-left: 3em;
|
|
}
|
|
|
|
.author {
|
|
display: inline-block;
|
|
vertical-align: top;
|
|
padding-top: 0.15em;
|
|
padding-left: 0.15em;
|
|
margin-right: 1em;
|
|
}
|
|
|
|
.topic {
|
|
padding-bottom: 0.25em;
|
|
display: grid;
|
|
grid-template-areas:
|
|
"bulk-select title"
|
|
"meta meta";
|
|
grid-template-columns: auto 1fr;
|
|
|
|
.bulk-select {
|
|
position: absolute;
|
|
left: 0.5em;
|
|
top: 0.75em;
|
|
padding: 0.25em 0.5em;
|
|
background-color: var(--tertiary-low);
|
|
|
|
input[type="checkbox"] {
|
|
margin: 0;
|
|
}
|
|
}
|
|
|
|
.search-link {
|
|
align-items: baseline;
|
|
display: flex;
|
|
grid-area: title;
|
|
}
|
|
|
|
.search-category {
|
|
grid-area: meta;
|
|
}
|
|
}
|
|
|
|
.search-category {
|
|
max-width: 100%;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
margin-top: 0.25em;
|
|
.badge-wrapper {
|
|
max-width: 100%;
|
|
}
|
|
}
|
|
|
|
.discourse-tags {
|
|
flex-wrap: wrap;
|
|
display: inline-flex;
|
|
font-weight: normal;
|
|
|
|
.discourse-tag.simple {
|
|
font-size: var(--font-down-1);
|
|
margin-right: 0.25em;
|
|
}
|
|
}
|
|
|
|
.blurb {
|
|
font-size: var(--font-0);
|
|
line-height: var(--line-height-large);
|
|
color: var(--primary-medium);
|
|
.date {
|
|
color: var(--primary-high);
|
|
}
|
|
|
|
.search-highlight {
|
|
color: var(--primary-high);
|
|
}
|
|
}
|
|
|
|
.like-count {
|
|
display: block;
|
|
color: var(--primary-high);
|
|
margin-top: 0.25em;
|
|
.d-icon {
|
|
color: var(--love);
|
|
font-size: var(--font-down-1);
|
|
}
|
|
}
|
|
|
|
a.search-link.visited .topic-title {
|
|
color: var(--primary-medium);
|
|
}
|
|
.search-link {
|
|
.topic-title {
|
|
font-size: var(--font-up-1);
|
|
line-height: var(--line-height-medium);
|
|
color: var(--primary);
|
|
}
|
|
.topic-statuses {
|
|
display: inline-block;
|
|
flex-shrink: 0;
|
|
font-size: 1.3em;
|
|
line-height: var(--line-height-medium);
|
|
color: var(--primary-medium);
|
|
span {
|
|
line-height: 1;
|
|
}
|
|
}
|
|
}
|
|
|
|
.discourse-tag.simple {
|
|
font-size: var(--font-down-1);
|
|
margin-right: 0.25em;
|
|
}
|
|
}
|
|
|
|
.no-results-suggestion,
|
|
.google-search-form {
|
|
margin-top: 1em;
|
|
}
|
|
|
|
// temporary
|
|
|
|
.search-results {
|
|
.fps-user-item {
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
|
|
.avatar {
|
|
margin-right: 0.5em;
|
|
min-width: 25px;
|
|
flex: 0 0 auto;
|
|
}
|
|
.user-titles {
|
|
display: flex;
|
|
flex-direction: column;
|
|
max-width: 300px;
|
|
overflow: hidden;
|
|
.name {
|
|
color: var(--primary-high-or-secondary-low);
|
|
font-size: var(--font-0);
|
|
font-weight: 700;
|
|
@include ellipsis;
|
|
}
|
|
.username {
|
|
color: var(--primary-high-or-secondary-low);
|
|
font-size: var(--font-down-1);
|
|
@include ellipsis;
|
|
}
|
|
}
|
|
}
|
|
|
|
.category-items,
|
|
.tag-items {
|
|
margin-bottom: 1.5em;
|
|
.fps-category-item,
|
|
.fps-tag-item {
|
|
margin-bottom: 1.5em;
|
|
display: block;
|
|
}
|
|
}
|
|
}
|