From 3098be97e6ff4d3199a65d9923faffb8895d2bf5 Mon Sep 17 00:00:00 2001
From: Sawa <34698182+sawaYch@users.noreply.github.com>
Date: Tue, 9 Apr 2024 15:03:18 +0800
Subject: [PATCH] fix(ui): responsive
---
src/components/background.tsx | 2 +-
src/components/layout.tsx | 41 +++++++++++++++--------------------
src/pages/artworks.tsx | 2 --
src/pages/blogs.tsx | 38 +++++++++++++++++++-------------
4 files changed, 41 insertions(+), 42 deletions(-)
diff --git a/src/components/background.tsx b/src/components/background.tsx
index 62ec30d4..4a21ca50 100644
--- a/src/components/background.tsx
+++ b/src/components/background.tsx
@@ -48,7 +48,7 @@ const PingBgText = ({ bgText }: PingBgTextProps) => (
const CenterContainer = ({ children }: PropsWithChildren) => (
{children}
diff --git a/src/components/layout.tsx b/src/components/layout.tsx
index 33a405a9..dac411ae 100644
--- a/src/components/layout.tsx
+++ b/src/components/layout.tsx
@@ -12,7 +12,6 @@ import { ActionIcon } from '@mantine/core';
import cn from 'classnames';
import { FaChevronUp } from '@react-icons/all-files/fa/FaChevronUp';
import { motion, useCycle, useScroll } from 'framer-motion';
-import BackgroundContainer from './background-container';
import Powerline from './powerline';
import Footer from './footer';
import ApplicationPane from './application-pane';
@@ -146,10 +145,9 @@ const ContentWrapper = forwardRef<
id="main"
ref={ref}
className={cn(
- 'z-40 flex flex-col items-center w-dvw flex-auto overflow-x-hidden min-h-dvh pb-[44px]',
+ '!z-[60] flex flex-col items-center w-dvw flex-auto overflow-x-hidden min-h-dvh relative',
{
'!touch-none !overflow-y-hidden': isOpen,
- '!pb-[100px]': isTablet,
}
)}
>
@@ -193,28 +191,23 @@ const Layout: FC> = ({ children, location }) => {
useFixScrollRestoration(location, scrollToTop);
return (
- <>
+
-
-
- {children}
-
-
-
-
-
-
- >
+
+
{children}
+
+
+
+
+
+
);
};
diff --git a/src/pages/artworks.tsx b/src/pages/artworks.tsx
index 480ad5de..808c5094 100644
--- a/src/pages/artworks.tsx
+++ b/src/pages/artworks.tsx
@@ -173,7 +173,6 @@ const ArtworksPage = ({
))}
-
{artwork && (
)}
-
) => {
return (
<>
-
+
}
@@ -160,7 +163,10 @@ PageProps) => {
-
+
TAG
@@ -187,17 +193,19 @@ PageProps
) => {
-
-
- {filteredBlogData?.length === 0 || filteredBlogData == null ? (
-
-
-
- No post is found !
-
-
- ) : (
+
+ {filteredBlogData?.length === 0 || filteredBlogData == null ? (
+
+
+ No post is found !
+
+ ) : (
+
) => {
},
}}
initial="hidden"
- className="flex flex-col w-full gap-2 px-10 mt-2 mb-2 h-[calc(100vh-18rem)] ipad:w-1/2" // NOTE: tweak: not using card grid
+ className="flex flex-col flex-1 w-screen gap-2 mt-2 mb-20 ipad:w-2/3" // NOTE: tweak: not using card grid
>
{({ width, height }) => (
@@ -229,8 +237,8 @@ PageProps) => {
)}
- )}
-
+
+ )}
>
);
};