From fb473d3d183a7e979df52ec99503347e25277c2f Mon Sep 17 00:00:00 2001 From: cat-milk <43044190+cat-milk@users.noreply.github.com> Date: Tue, 27 Sep 2022 19:18:48 -0500 Subject: [PATCH] added mobile nav and disabled broken lightbox --- webviewer/src/components/AimeImageGrid.tsx | 2 +- webviewer/src/components/Layout.tsx | 122 ++++++-- webviewer/src/styles/global.css | 346 +-------------------- webviewer/src/types.ts | 2 +- 4 files changed, 114 insertions(+), 358 deletions(-) diff --git a/webviewer/src/components/AimeImageGrid.tsx b/webviewer/src/components/AimeImageGrid.tsx index 7f8b0876..56561e02 100644 --- a/webviewer/src/components/AimeImageGrid.tsx +++ b/webviewer/src/components/AimeImageGrid.tsx @@ -19,7 +19,7 @@ const AnimeImageGrid: React.FC = () => { key={node.name} onClick={() => { setPhotoIndex(index); - setIsOpen(true); + //setIsOpen(true); }} /> ))} diff --git a/webviewer/src/components/Layout.tsx b/webviewer/src/components/Layout.tsx index 7dff96c7..346445ae 100644 --- a/webviewer/src/components/Layout.tsx +++ b/webviewer/src/components/Layout.tsx @@ -6,7 +6,6 @@ import { AllImages } from '../types'; // styles const pageStyles = { color: '#232129', - padding: 96, fontFamily: '-apple-system, Roboto, sans-serif, serif', }; @@ -32,38 +31,107 @@ const Layout: React.FC = ({ children }) => { }, [allImages, selectedDir]); const handleDirSelect = useCallback((relativePath: string) => { + setIsMobileNavOpen(false); setSelectedDir(relativePath); }, []); + const [isMobileNavOpen, setIsMobileNavOpen] = useState(false); + return ( -
-