Skip to content

Commit

Permalink
Break facetlist into separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
tiberiuichim committed Jan 28, 2022
1 parent 9da49bf commit b4b50ca
Show file tree
Hide file tree
Showing 2 changed files with 198 additions and 189 deletions.
197 changes: 197 additions & 0 deletions src/SearchBlock/less/facetslist.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
div#page-document {
div.facets {
i.icon.dropdown {
margin-right: 0px;
float: left;
}

div.content.active {
padding-top: 0px;
}
}

div.col-left {
padding-right: 5px;
padding-left: 0px;
margin-top: 3em;

.facetslist-wrapper {
padding: 0em;
border: 0px;
margin: 0em;
box-shadow: none;
}

div.ui.fixed.top.sticky {
overflow: auto;
max-height: 100vh;
}

button.show-filters {
margin-top: 0.3em;
margin-right: 0px;
background: @sf-light-gray !important;
border-radius: 2px;
color: @sf-azure !important;
float: right;
font-size: 12px;
}

div.filter-list-item {
max-width: 100%;

.ui.label {
display: inline-flex;
}

img.facet-option-icon {
display: inline;
width: auto;
max-height: 12px !important;
margin-right: 0.5em;
}
}

div.filter-list-item.more-like-this {
margin-bottom: 1em;

div.ui.label {
width: 100%;
}

i.icon.delete {
position: absolute;
top: 10px;
right: 10px;
color: @sf-azure;
}

div.meta {
line-height: normal;

i.icon {
margin-right: 0.5em;
}
}

a.centered {
img {
width: 100%;
height: auto;
max-height: 200px;
margin-top: 0.5em;
margin-bottom: 0.5em;
object-fit: cover;
object-position: top;
}
}

h4 {
margin-top: 0.5em;
line-height: inherit;
}
}

div.filter-list-item.more-like-this > .labels > .label {
overflow: hidden;
max-width: 100%;
padding: 0px;
margin: 0px;
}

div.mlt-filter {
img {
width: 100%;
height: auto;
}

a {
font-size: 12px;
}

.meta {
font-size: 12px;
font-weight: 400;
}
}

.card .meta {
color: @s-medium-gray2 !important;
}

.card {
width: 100% !important;
border: 1px solid @sf-light-gray2;
margin: 3px 0px 3px 0px;
border-radius: 3px;
box-shadow: none;

div.content {
padding: 0.5em;

div.header {
padding: 0px;
margin: 0px;
color: @sf-dark-gray;
font-size: 16px;
font-weight: 400;

span.text {
display: block;
overflow: hidden;
max-width: calc(100% - 35px);
float: left;
text-overflow: ellipsis;
white-space: nowrap;
}

span.clear-filters {
button {
padding: 3px;
background: @sf-light-gray !important;
color: @sf-azure;
float: right;
font-size: 10px;
}
}
}
}

div.filter.description {
display: flex;

div.ui.label {
padding: 5px;
margin-top: 4px;
margin-bottom: 0px;
background: white;
font-size: 12px;

span.text {
min-height: 13px !important;
}
}
}

&.active {
background: white;

div.label {
max-width: 100%;
background: @sf-light-gray !important;
color: @sf-azure;
font-weight: 600;

span.text {
display: block;
overflow: hidden;
max-width: calc(100% - 14px);
float: left;
text-overflow: hidden;
white-space: nowrap;
}
}
}
}
}
}
190 changes: 1 addition & 189 deletions src/SearchBlock/less/styles.less
Original file line number Diff line number Diff line change
Expand Up @@ -526,195 +526,6 @@ div#page-document {
}
}

div.facets {
i.icon.dropdown {
margin-right: 0px;
float: left;
}

div.content.active {
padding-top: 0px;
}
}

div.col-left {
padding-right: 5px;
padding-left: 0px;
margin-top: 3em;

div.ui.fixed.top.sticky {
overflow: auto;
max-height: 100vh;
}

button.show-filters {
margin-top: 0.3em;
margin-right: 0px;
background: @sf-light-gray !important;
border-radius: 2px;
color: @sf-azure !important;
float: right;
font-size: 12px;
}

div.filter-list-item {
max-width: 100%;

.ui.label {
display: inline-flex;
}

img.facet-option-icon {
display: inline;
width: auto;
max-height: 12px !important;
margin-right: 0.5em;
}
}

div.filter-list-item.more-like-this {
margin-bottom: 1em;

div.ui.label {
width: 100%;
}

i.icon.delete {
position: absolute;
top: 10px;
right: 10px;
color: @sf-azure;
}

div.meta {
line-height: normal;

i.icon {
margin-right: 0.5em;
}
}

a.centered {
img {
width: 100%;
height: auto;
max-height: 200px;
margin-top: 0.5em;
margin-bottom: 0.5em;
object-fit: cover;
object-position: top;
}
}

h4 {
margin-top: 0.5em;
line-height: inherit;
}
}

div.filter-list-item.more-like-this > .labels > .label {
overflow: hidden;
max-width: 100%;
padding: 0px;
margin: 0px;
}

div.mlt-filter {
img {
width: 100%;
height: auto;
}

a {
font-size: 12px;
}

.meta {
font-size: 12px;
font-weight: 400;
}
}

.card .meta {
color: @s-medium-gray2 !important;
}

.card {
width: 100% !important;
border: 1px solid @sf-light-gray2;
margin: 3px 0px 3px 0px;
border-radius: 3px;
box-shadow: none;

div.content {
padding: 0.5em;

div.header {
padding: 0px;
margin: 0px;
color: @sf-dark-gray;
font-size: 16px;
font-weight: 400;

span.text {
display: block;
overflow: hidden;
max-width: calc(100% - 35px);
float: left;
text-overflow: ellipsis;
white-space: nowrap;
}

span.clear-filters {
button {
padding: 3px;
background: @sf-light-gray !important;
color: @sf-azure;
float: right;
font-size: 10px;
}
}
}
}

div.filter.description {
display: flex;

div.ui.label {
padding: 5px;
margin-top: 4px;
margin-bottom: 0px;
background: white;
font-size: 12px;

span.text {
min-height: 13px !important;
}
}
}

&.active {
background: white;

div.label {
max-width: 100%;
background: @sf-light-gray !important;
color: @sf-azure;
font-weight: 600;

span.text {
display: block;
overflow: hidden;
max-width: calc(100% - 14px);
float: left;
text-overflow: hidden;
white-space: nowrap;
}
}
}
}
}

div.body-content {
padding: 0px !important;

Expand Down Expand Up @@ -1965,3 +1776,4 @@ p.demo-question {
}

@import '~./answersbox.less';
@import '~./facetslist.less';

0 comments on commit b4b50ca

Please sign in to comment.