From 3b05576df932b30b491106ffe522bf82d6f62a8f Mon Sep 17 00:00:00 2001 From: Liang Gong Date: Tue, 9 Apr 2024 16:47:01 -0700 Subject: [PATCH] chore(site): disable doc site animation on mobile devices Summary: disable the doc site home page's animation when it's running on mobile web browsers (screen is too small for such a complex animation) Reviewed By: tulga1970 Differential Revision: D55033551 fbshipit-source-id: 7a1c0941cf6eb43800b1ad70c754372a311fd3b1 --- website/src/css/custom.css | 2 +- website/src/pages/index.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/website/src/css/custom.css b/website/src/css/custom.css index b2acf555..02a7b143 100644 --- a/website/src/css/custom.css +++ b/website/src/css/custom.css @@ -149,7 +149,7 @@ code { #learn-more { color: #323330; - backdrop-filter: blur(10px); + backdrop-filter: blur(4px); } #header-container { diff --git a/website/src/pages/index.tsx b/website/src/pages/index.tsx index c7c3221b..33f6cb13 100644 --- a/website/src/pages/index.tsx +++ b/website/src/pages/index.tsx @@ -140,7 +140,7 @@ export default function Home(): React.ReactElement { const {width} = useWindowSize(); useEffect(() => { - if (!vantaEffect) { + if (!vantaEffect && width > 800) { setVantaEffect( NET({ el: headerRef.current,