Skip to content

Commit

Permalink
feat(search): Add layout to filter sidebar #287
Browse files Browse the repository at this point in the history
* create scss component _filters.scss and move filter styles from
search.scss to it
  • Loading branch information
plutonik-a committed Nov 16, 2017
1 parent c6bfcb9 commit c373eaa
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 45 deletions.
2 changes: 1 addition & 1 deletion app/scss/_customized-bootstrap.scss
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ dd {
cursor: pointer;
display: table;
> input {
margin: 4px 20px 0 0;
margin: 4px 15px 0 0;
line-height: $base-line-height;
height: 14px;
display: table-cell;
Expand Down
46 changes: 46 additions & 0 deletions app/scss/_filters.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/* Filters -------------- */

.hsg-search-inputs-vertical {
@extend .c-inputs-stacked;
margin: 1rem 0;
.hsg-search-input-label {
@extend .c-input;
}
}

.hsg-search-inputs-horizontal {
margin-bottom: 1em;

.hsg-search-input {
cursor: pointer;
display: inline-block;
margin-right: $margin-horizontal-base;
}

input[type="checkbox"] {
cursor: pointer;
margin: 0;
width: 12px;
height: 14px;
position: relative;
left: 0;
vertical-align: middle;
}

label{
width: auto;
margin: 0 0 0 5px;
position: relative;
left: 0;
display: inline-block;
vertical-align: middle;
}
}

// Elements in sidebar on search result page
.filter {
&-sidebar {
border-bottom: $default-border-style;
margin-bottom: 2rem;
}
}
57 changes: 13 additions & 44 deletions app/scss/_search.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,54 +68,12 @@ input[type=search] {
}
}

.hsg-search-inputs-vertical {
@extend .c-inputs-stacked;
margin: 2rem 0;
.hsg-search-input-label {
@extend .c-input;
}
}

.hsg-search-inputs-horizontal {
margin-bottom: 1em;

.hsg-search-input {
cursor: pointer;
display: inline-block;
margin-right: $margin-horizontal-base;
}

input[type="checkbox"] {
cursor: pointer;
margin: 0;
width: 12px;
height: 14px;
position: relative;
left: 0;
vertical-align: middle;
}

label{
width: auto;
margin: 0 0 0 5px;
position: relative;
left: 0;
display: inline-block;
vertical-align: middle;
}
}

.hsg-search-help {
margin: 0 0 2rem 0;
}

.hsg-search-result-message {
margin-top: 4rem;
font-size: $h2-font-size;
margin-bottom: 0.5rem;
.hsg-search-query {
color: $color-primary;
}
.hsg-search-query {
color: $color-primary;
}

.hsg-search-result {
Expand Down Expand Up @@ -148,6 +106,17 @@ input[type=search] {
border-left: none;
}

// Reset button in sidebar

.hsg-sidebar-reset-btn {
@extend .btn;
@extend .btn-default;
background-color: $color-gray-lightest;
> span {
top: 2px;
}
}

// Text in searchbar button
.hsg-search-submit-text {
position: absolute;
Expand Down
1 change: 1 addition & 0 deletions app/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,6 @@

@import "tei-overrides";
@import "toc";
@import "filters";
@import "tei";
@import "miscellaneous";

0 comments on commit c373eaa

Please sign in to comment.