Skip to content
Snippets Groups Projects
Commit 594731b9 authored by Olivia206's avatar Olivia206
Browse files

added class for search with toc

parent addce360
No related branches found
No related tags found
No related merge requests found
...@@ -15,6 +15,9 @@ class Search { ...@@ -15,6 +15,9 @@ class Search {
} }
listen() { listen() {
if (document.body.querySelector(".toc-cta")) {
this.button.classList.add('in-page-with-toc');
}
this.button.addEventListener('click', () => { this.button.addEventListener('click', () => {
this.toggle(true); this.toggle(true);
this.removedItems = this.element.querySelector('.pagefind-ui__suppressed', '.pagefind-ui__search-clear'); this.removedItems = this.element.querySelector('.pagefind-ui__suppressed', '.pagefind-ui__search-clear');
......
...@@ -14,9 +14,10 @@ ...@@ -14,9 +14,10 @@
line-height: inherit line-height: inherit
margin-left: px2rem(8) margin-left: px2rem(8)
@include media-breakpoint-down(md) @include media-breakpoint-down(md)
border-bottom: 1px solid #adb5bd &:not(.pagefind-fixed)
padding: $spacing1 0 border-bottom: 1px solid #adb5bd
width: 100% padding: $spacing1 0
width: 100%
.search__close .search__close
@include icon-block(close, after) @include icon-block(close, after)
position: fixed position: fixed
...@@ -29,7 +30,7 @@ ...@@ -29,7 +30,7 @@
margin-left: $spacing0 margin-left: $spacing0
width: px2rem(15) width: px2rem(15)
@include media-breakpoint-down(md) @include media-breakpoint-down(md)
right: 0 right: $spacing1
top: half($spacing0) top: half($spacing0)
#search #search
background: $color-background background: $color-background
...@@ -155,4 +156,9 @@ ...@@ -155,4 +156,9 @@
min-width: calc(#{$spacing3} * 3) min-width: calc(#{$spacing3} * 3)
&::after &::after
position: absolute position: absolute
right: $spacing0 right: $spacing0
\ No newline at end of file @include media-breakpoint-down(md)
left: 0
width: 100vw
&.in-page-with-toc
bottom: px2rem(44)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment