forked from HugoBlox/hugo-blox-builder
/
_search.scss
138 lines (116 loc) 路 2.54 KB
/
_search.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
/*************************************************
* Search
**************************************************/
.search-results {
transform: scale(0);
-webkit-transform: scale(0);
background-color: $sta-background;
bottom: 0;
left: 0;
right: 0;
top: 0;
overflow: scroll;
position: fixed;
visibility: hidden;
z-index: -99;
}
.dark .search-results {
background-color: $sta-dark-background;
}
.searching {
overflow: hidden;
}
.searching .search-results {
transform: scale(1);
-webkit-transform: scale(1);
visibility: visible;
z-index: 1031; /* Highest index, higher than navbar. */
}
.searching #search-box #search-query {
width: 100%;
}
.search-results > .container {
padding-top: 70px; /* Navbar height. */
}
@media screen and (max-width: 1200px) {
.search-results > .container {
padding-top: 50px; /* Navbar height. */
}
}
.search-header {
position: -webkit-sticky;
position: sticky;
top: 0;
background-color: $sta-background;
padding-top: 2rem;
padding-bottom: 1rem;
}
.dark .search-header {
background-color: $sta-dark-background;
}
.search-header h1 {
margin: 0;
line-height: 1;
}
.col-search-close {
text-align: right;
}
.search-header i {
font-size: 2rem;
line-height: 1;
}
#search-box {
position: relative; /* Required for search icon positioning. */
margin-bottom: 0.5rem;
}
#search-box::before {
font-family: 'Font Awesome 5 Free';
font-display: swap;
font-weight: 900;
content: "\f002";
font-size: 1rem;
opacity: 0.25;
line-height: 1rem;
position: absolute;
left: 0.7rem;
top: 0.6rem;
overflow-x: hidden;
}
#search-box #search-query {
border: 1px solid #dedede;
border-radius: 1rem;
padding: 1rem 1rem 1rem 2rem; /* Wider left padding for search icon to fit in. */
width: 250px;
line-height: 1rem;
height: 1rem;
font-size: 0.8rem;
}
.search-hit em {
font-style: normal;
background-color: #FFE0B2;
color: #E65100;
border-bottom: 1px solid #E65100;
}
.search-hit-type {
margin-bottom: 0 !important; /* Override .article-metadata margin. */
text-transform: capitalize;
}
.search-hit-description {
font-size: 0.7rem;
}
/* Load more results button - hide when there are no more results. */
#search-hits button[disabled] {
display: none;
}
.form-control:focus {
border-color: $sta-primary;
box-shadow: 0 0 0 .2rem $sta-primary-light;
}
/* DARK themed components. */
/* Algolia search input */
.dark .ais-search-box--input {
background-color: $sta-dark-background;;
}
.dark #search-query {
background-color: $sta-dark-background;;
}