Skip to content

Commit f61c2af

Browse files
committed
fix: keep footer at bottom
1 parent 0d98db1 commit f61c2af

File tree

1 file changed

+68
-64
lines changed

1 file changed

+68
-64
lines changed

src/components/common/Search.astro

+68-64
Original file line numberDiff line numberDiff line change
@@ -77,79 +77,83 @@ if (searchTags.length === 0) {
7777
</script>
7878

7979
<style lang="scss">
80-
#site-search dialog {
81-
display: none;
82-
width: 60%;
83-
height: 60%;
84-
background: none;
85-
border: none;
86-
grid-template-columns: 1fr;
87-
grid-template-rows: 2.5em 4fr;
88-
align-items: center;
89-
justify-content: center;
90-
gap: 1em;
91-
92-
&::backdrop {
93-
background-color: #000000aa;
94-
backdrop-filter: blur(2px);
95-
}
96-
97-
&[open] {
98-
display: grid;
99-
}
100-
input[type="search"] {
101-
font-family: Poppins;
102-
width: 100%;
103-
font-size: 1.5em;
104-
margin: auto;
105-
border-radius: 0.5rem;
106-
padding: 0.25rem 0.5rem;
80+
#site-search {
81+
position: absolute;
82+
83+
dialog {
84+
display: none;
85+
width: 60%;
86+
height: 60%;
87+
background: none;
10788
border: none;
108-
background: #0f2e4b;
109-
color: white;
110-
111-
&:focus + div.suggestions > a:first-child() {
112-
color: white;
89+
grid-template-columns: 1fr;
90+
grid-template-rows: 2.5em 4fr;
91+
align-items: center;
92+
justify-content: center;
93+
gap: 1em;
94+
95+
&::backdrop {
96+
background-color: #000000aa;
97+
backdrop-filter: blur(2px);
11398
}
114-
}
11599

116-
div.suggestions {
117-
align-self: flex-start;
118-
overflow-y: auto;
119-
max-height: 100%;
120-
background-color: #081f34;
121-
border-radius: 0.5em;
122-
123-
& > a {
124-
display: none;
125-
font-size: 1em;
126-
padding: 0.25em 0.5em;
127-
box-sizing: border-box;
100+
&[open] {
101+
display: grid;
102+
}
103+
input[type="search"] {
104+
font-family: Poppins;
105+
width: 100%;
106+
font-size: 1.5em;
107+
margin: auto;
108+
border-radius: 0.5rem;
109+
padding: 0.25rem 0.5rem;
110+
border: none;
111+
background: #0f2e4b;
112+
color: white;
128113

129-
&:focus {
130-
outline: none;
114+
&:focus + div.suggestions > a:first-child() {
131115
color: white;
132-
border-radius: unset;
133-
}
134-
135-
&.match {
136-
display: flex;
137-
justify-content: space-between;
138116
}
139-
span {
140-
text-overflow: ellipsis;
141-
overflow: hidden;
142-
width: 100%;
143-
white-space: nowrap;
117+
}
144118

145-
&.term {
146-
flex: 1 1;
119+
div.suggestions {
120+
align-self: flex-start;
121+
overflow-y: auto;
122+
max-height: 100%;
123+
background-color: #081f34;
124+
border-radius: 0.5em;
125+
126+
& > a {
127+
display: none;
128+
font-size: 1em;
129+
padding: 0.25em 0.5em;
130+
box-sizing: border-box;
131+
132+
&:focus {
133+
outline: none;
134+
color: white;
135+
border-radius: unset;
147136
}
148137

149-
&.page {
150-
flex: 1 2;
151-
text-align: right;
152-
opacity: 0.5;
138+
&.match {
139+
display: flex;
140+
justify-content: space-between;
141+
}
142+
span {
143+
text-overflow: ellipsis;
144+
overflow: hidden;
145+
width: 100%;
146+
white-space: nowrap;
147+
148+
&.term {
149+
flex: 1 1;
150+
}
151+
152+
&.page {
153+
flex: 1 2;
154+
text-align: right;
155+
opacity: 0.5;
156+
}
153157
}
154158
}
155159
}

0 commit comments

Comments
 (0)