Search for sections (configurable via search.heading_level)

Added more search configurations
Display "no results found"
This commit is contained in:
Silvio Giebl
2019-12-29 19:19:00 +01:00
parent 38689d07b1
commit 7f5b1f14f1
5 changed files with 161 additions and 41 deletions

View File

@@ -131,29 +131,50 @@
&.active {
background-color: $feedback-color;
}
@include mq(md) {
padding-right: $sp-4;
padding-left: $sp-4;
}
}
.search-result-title {
display: block;
padding-top: $sp-2;
padding-right: $sp-4;
padding-bottom: $sp-2;
@include mq(sm) {
display: inline-block;
width: 40%;
padding-right: $sp-2;
word-wrap: break-word;
vertical-align: top;
}
}
.search-result-doc {
display: flex;
align-items: center;
&.search-result-doc-parent {
opacity: 0.5;
@include fs-3;
@include mq(md) {
@include fs-2;
}
}
.search-result-icon {
width: $sp-4;
height: $sp-4;
margin-right: $sp-2;
fill: $link-color;
}
}
.search-result-section {
margin-left: #{$sp-4 + $sp-2};
}
.search-result-rel-url {
display: block;
margin-left: #{$sp-4 + $sp-2};
overflow: hidden;
color: $search-result-preview-color;
text-overflow: ellipsis;
@@ -166,6 +187,7 @@
padding-top: $sp-2;
padding-bottom: $sp-2;
padding-left: $sp-4;
margin-left: $sp-2;
color: $search-result-preview-color;
border-left: $border;
border-left-color: $border-color;
@@ -174,13 +196,22 @@
@include mq(sm) {
display: inline-block;
width: 60%;
padding-left: $sp-2;
margin-left: 0;
vertical-align: top;
}
}
.search-result-highlight {
font-weight: bold;
color: $link-color;
}
.search-no-result {
padding-top: $sp-2;
padding-right: $sp-3;
padding-bottom: $sp-2;
padding-left: $sp-3;
@include fs-3;
}
.search-button {
@@ -205,7 +236,7 @@
z-index: 1;
width: 0;
height: 0;
background-color: rgba(0, 0, 0, 0.2);
background-color: rgba(0, 0, 0, 0.3);
opacity: 0;
transition: opacity ease $transition-duration, width 0s $transition-duration, height 0s $transition-duration;
}