Closed oof2win2 closed 2 years ago
Understandable, fixed. Only issue I have is that ESLint complains of window
to not being defined.
I fixed this previously by simply adding display:none to the 700ish px breakpoint, the sticky header should show on landscape tablets so looking at manifest won't work
Fair enough, that makes sense from my point of view. @Xetera ?
User-agent did not work with SSR, Gatsby doesn't like it (which is why tests failed) since it's not available server-side. Sceen size from useWindowSize
is though, so used that instead.
Looks like this on mobile, completely removing the sticky header there. Moved to CSS rather than JS too, as per request.
Resolves #421 with the use of gyroscopes which most mobile devices have nowadays. Since computers usually don't have them, those won't be impacted.
Another method would be to use ua-parser-js, which is only 6kB in size, but IMO this method should be tried out first. Works on my SM-A505F and both my laptops.