File tree Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Expand file tree Collapse file tree 1 file changed +15
-13
lines changed Original file line number Diff line number Diff line change 7
7
8
8
let bottomVisibility = true ;
9
9
10
- onMount (() => {
11
- const checkVisibility = () => {
12
- const wave = document .querySelector (' .wave' );
13
- bottomVisibility = ! (wave && wave .getBoundingClientRect ().bottom < window .innerHeight - 1 );
14
- };
15
-
16
- window .addEventListener (' scroll' , checkVisibility, { passive: true });
17
- window .addEventListener (' resize' , checkVisibility);
10
+ const checkVisibility = () => {
11
+ const wave = document .querySelector (' .wave' );
12
+ bottomVisibility = ! (wave && wave .getBoundingClientRect ().bottom < window .innerHeight - 1 );
13
+ };
18
14
15
+ onMount (() => {
19
16
checkVisibility (); // Initial check
20
- return () => {
21
- window .removeEventListener (' scroll' , checkVisibility);
22
- window .removeEventListener (' resize' , checkVisibility);
23
- };
24
17
});
25
18
</script >
26
19
135
128
]}
136
129
/>
137
130
138
- <main >
131
+ <svelte:window on:scroll ={checkVisibility } on:resize ={checkVisibility } />
132
+
133
+ <main class:visibility ={! bottomVisibility }>
139
134
<div class =" content" >
140
135
<Home socialsVisibility ={bottomVisibility } />
141
136
<div class =" hero-img-container" >
161
156
flex-direction : column ;
162
157
align-items : center ;
163
158
159
+ @media (max-height : 600px ), (max-width : 450px ) and (max-height : 780px ) {
160
+ min-height : initial ;
161
+ }
162
+
164
163
@media (max-width : 335px ) {
165
164
padding : 2rem 0 !important ;
166
165
}
167
166
167
+ & .visibility {
168
+ min-height : initial ;
169
+ }
168
170
}
169
171
170
172
.hero-img-container {
You can’t perform that action at this time.
0 commit comments