From 3ae34591d9b1b18fcab66706258b38276b55d90b Mon Sep 17 00:00:00 2001 From: Vy Vu <55815025+vudangbaovy@users.noreply.github.com> Date: Wed, 23 Oct 2024 13:39:38 -0400 Subject: [PATCH 01/13] changed layout --- src/components/CustomDescriptionBox.tsx | 23 +++++++----- src/pages/Interference.tsx | 48 +++++++++++++++++-------- src/pages/SingleQgate.tsx | 28 ++++++++++----- src/pages/Tunneling.tsx | 31 +++++++++++----- 4 files changed, 90 insertions(+), 40 deletions(-) diff --git a/src/components/CustomDescriptionBox.tsx b/src/components/CustomDescriptionBox.tsx index 8291fd9..3652aea 100644 --- a/src/components/CustomDescriptionBox.tsx +++ b/src/components/CustomDescriptionBox.tsx @@ -11,30 +11,37 @@ const cardStyle = { }; // ========== CustomDescriptionBox ========== -const CustomDescriptionBox = ({ msg, imageUrl }: { msg: string; imageUrl?: string }) => { +const CustomDescriptionBox = ({ title, msg, imageUrl }: { title?: string; msg: string; imageUrl?: string }) => { return ( + + {title && ( + + {title} + + )} + + {msg} + + {imageUrl && ( )} - - {msg} - ); }; -export default CustomDescriptionBox; +export default CustomDescriptionBox; \ No newline at end of file diff --git a/src/pages/Interference.tsx b/src/pages/Interference.tsx index 8a7a34b..ecb6912 100644 --- a/src/pages/Interference.tsx +++ b/src/pages/Interference.tsx @@ -178,7 +178,7 @@ const Interference = () => { // collapsible // collapsed={collapsed} // onCollapse={(value) => setCollapsed(value)} - style={sidebar_style} + style={{ padding: "1%", position: "fixed", height: "100%", }} width={230} > @@ -293,27 +293,45 @@ const Interference = () => { - + {/*
*/} -
- {/*
*/} + + + + +
+ {/*
*/} ); }; -export default Interference; +export default Interference; \ No newline at end of file diff --git a/src/pages/SingleQgate.tsx b/src/pages/SingleQgate.tsx index e88e069..56b8cf5 100644 --- a/src/pages/SingleQgate.tsx +++ b/src/pages/SingleQgate.tsx @@ -197,7 +197,7 @@ const SpinTraceEvolution = () => { // collapsible // collapsed={collapsed} // onCollapse={(value) => setCollapsed(value)} - style={sidebar_style} + style={{ padding: "1%", position: "fixed", height: "100%", }} width={230} > @@ -339,22 +339,32 @@ const SpinTraceEvolution = () => { - + {/*
*/} -
- {/*
*/} + + + +
+ {/*
*/} ); }; -export default SpinTraceEvolution; +export default SpinTraceEvolution; \ No newline at end of file diff --git a/src/pages/Tunneling.tsx b/src/pages/Tunneling.tsx index 7739bc6..3bcad75 100644 --- a/src/pages/Tunneling.tsx +++ b/src/pages/Tunneling.tsx @@ -18,7 +18,6 @@ import { Layout } from "antd"; import "antd/dist/antd.min.css"; import host from "../setup/host"; - // === Custom Components === import { CustomDescriptionBox, @@ -188,7 +187,7 @@ const Tunneling = () => { // collapsible // collapsed={collapsed} // onCollapse={(value) => setCollapsed(value)} - style={{ padding: "1%" }} + style={{ padding: "1%", position: "fixed", height: "100%", }} width={230} > @@ -311,17 +310,33 @@ const Tunneling = () => { - + -
{/*