Skip to content

Commit 1314cab

Browse files
committed
fix
1 parent 9ff9758 commit 1314cab

File tree

2 files changed

+22
-21
lines changed

2 files changed

+22
-21
lines changed

assets/sass/search.scss

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#search {
1+
.o-search {
22
width: 100%;
33
height: 6rem;
44
display: flex;
@@ -8,13 +8,29 @@
88
display: none;
99
}
1010

11+
&--contentpage {
12+
position: sticky;
13+
display: none;
14+
top: 10vh;
15+
opacity: 0;
16+
visibility: hidden;
17+
transition: opacity 0.5s ease;
18+
}
19+
20+
&--show {
21+
display: block;
22+
opacity: 1;
23+
visibility: visible;
24+
z-index: 6;
25+
}
26+
1127
.pagefind-ui__search-input,
1228
.pagefind-ui__message,
1329
.pagefind-ui__search-clear {
1430
font-family: "Roboto", Arial, Helvetica, sans-serif;
1531
}
1632

17-
.pagefind-ui__search-input {
33+
input.pagefind-ui__search-input {
1834
z-index: 6;
1935
outline: 0.2rem solid transparent;
2036
border: var(--border);
@@ -28,7 +44,7 @@
2844
}
2945
}
3046

31-
.pagefind-ui__search-clear {
47+
button.pagefind-ui__search-clear {
3248
z-index: 6;
3349
height: auto;
3450
padding: 1rem;
@@ -85,7 +101,7 @@
85101
color: var(--color-body);
86102
}
87103

88-
.pagefind-ui__button {
104+
button.pagefind-ui__button {
89105
border: 0.2rem solid var(--link-default);
90106
border-radius: var(--border-radius-m);
91107
background: transparent;
@@ -97,19 +113,3 @@
97113
}
98114
}
99115
}
100-
101-
.o-search--contentpage {
102-
position: sticky;
103-
display: none;
104-
top: 10vh;
105-
opacity: 0;
106-
visibility: hidden;
107-
transition: opacity 0.5s ease;
108-
}
109-
110-
.o-search--show {
111-
display: block;
112-
opacity: 1;
113-
visibility: visible;
114-
z-index: 6;
115-
}

layouts/_default/baseof.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
<div
2121
id="search"
2222
class="o-search o-search--contentpage"
23-
data-placeholder="{{ T "search-placeholder" }}"
23+
data-placeholder="{{ T "search.placeholder" }}"
24+
data-label="{{ T "search.label" }}"
2425
></div>
2526
{{ end }}
2627
{{ block "main" . }}{{ end }}

0 commit comments

Comments
 (0)