From 54477d60584fbf6a1ba9c1cd08067e5f1a772583 Mon Sep 17 00:00:00 2001 From: Tong Li Date: Sat, 23 Nov 2024 14:42:48 +1100 Subject: [PATCH 1/9] header, footer and background refactor for light theme --- .eslintignore | 1 + package-lock.json | 6 +- public/footer-rectangle.svg | 3 + src/app/assets/babylon-logo.svg | 11 +++ src/app/assets/logo.svg | 4 + src/app/components/Connect/ConnectSmall.tsx | 4 +- src/app/components/Footer/Footer.tsx | 81 +++++++++++---------- src/app/components/Header/Header.tsx | 32 ++++---- src/app/components/Logo/Logo.tsx | 22 +----- src/app/globals.css | 20 ----- src/app/layout.tsx | 1 + tailwind.config.ts | 11 ++- 12 files changed, 98 insertions(+), 98 deletions(-) create mode 100644 public/footer-rectangle.svg create mode 100644 src/app/assets/babylon-logo.svg create mode 100644 src/app/assets/logo.svg diff --git a/.eslintignore b/.eslintignore index a71674ac..2d122839 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,3 +2,4 @@ /playwright-report/ /blob-report/ /playwright/.cache/ +/out/ diff --git a/package-lock.json b/package-lock.json index f863a14d..19100836 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18059,9 +18059,9 @@ "license": "MIT" }, "node_modules/tailwind-merge": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.5.2.tgz", - "integrity": "sha512-kjEBm+pvD+6eAwzJL2Bi+02/9LFLal1Gs61+QB7HvTfQQ0aXwC5LGT8PEt1gS0CWKktKe6ysPTAy3cBC5MeiIg==", + "version": "2.5.4", + "resolved": "https://registry.npmjs.org/tailwind-merge/-/tailwind-merge-2.5.4.tgz", + "integrity": "sha512-0q8cfZHMu9nuYP/b5Shb7Y7Sh1B7Nnl5GqNr1U+n2p6+mybvRtayrQ+0042Z5byvTA8ihjlP8Odo8/VnHbZu4Q==", "license": "MIT", "funding": { "type": "github", diff --git a/public/footer-rectangle.svg b/public/footer-rectangle.svg new file mode 100644 index 00000000..6dfc990d --- /dev/null +++ b/public/footer-rectangle.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/src/app/assets/babylon-logo.svg b/src/app/assets/babylon-logo.svg new file mode 100644 index 00000000..1c5eec25 --- /dev/null +++ b/src/app/assets/babylon-logo.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/app/assets/logo.svg b/src/app/assets/logo.svg new file mode 100644 index 00000000..8d239202 --- /dev/null +++ b/src/app/assets/logo.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/app/components/Connect/ConnectSmall.tsx b/src/app/components/Connect/ConnectSmall.tsx index ea7f46d6..128cb054 100644 --- a/src/app/components/Connect/ConnectSmall.tsx +++ b/src/app/components/Connect/ConnectSmall.tsx @@ -41,7 +41,7 @@ export const ConnectSmall: React.FC = ({ const ref = useRef(null); useOnClickOutside(ref, handleClickOutside); - const { coinName, networkName } = getNetworkConfig(); + const { coinName } = getNetworkConfig(); const { isApiNormal, isGeoBlocked, apiMessage } = useHealthCheck(); // Renders the Tooltip describing the reason @@ -146,7 +146,7 @@ export const ConnectSmall: React.FC = ({ disabled={Boolean(address) || !isApiNormal} > - Connect to {networkName} network + Connect Wallets {!isApiNormal && renderApiNotAvailableTooltip()} diff --git a/src/app/components/Footer/Footer.tsx b/src/app/components/Footer/Footer.tsx index c48a4ad9..47ce836a 100644 --- a/src/app/components/Footer/Footer.tsx +++ b/src/app/components/Footer/Footer.tsx @@ -1,3 +1,4 @@ +import Image from "next/image"; import { BsDiscord, BsGithub, @@ -10,6 +11,8 @@ import { GoHome } from "react-icons/go"; import { IoMdBook } from "react-icons/io"; import { MdAlternateEmail, MdForum } from "react-icons/md"; +import babylonIcon from "@/app/assets/babylon-logo.svg"; + const iconLinks = [ { name: "Website", @@ -65,44 +68,48 @@ const iconLinks = [ export const Footer: React.FC = () => { return ( -
-
-
-
- -
- {iconLinks.map(({ name, url, Icon }) => ( -
- + +
+ + Terms of Use + {" "} + -{" "} + + Privacy Policy + {" "} + - 2024 Babylon Labs. All rights reserved. +
+
+
+ babylon
); diff --git a/src/app/components/Header/Header.tsx b/src/app/components/Header/Header.tsx index 53de3362..2c6d57a5 100644 --- a/src/app/components/Header/Header.tsx +++ b/src/app/components/Header/Header.tsx @@ -4,7 +4,6 @@ import { useAppState } from "@/app/state"; import { shouldDisplayTestingMsg } from "@/config"; import { ConnectSmall } from "../Connect/ConnectSmall"; -import { ConnectedSmall } from "../Connect/ConnectedSmall"; import { Logo } from "../Logo/Logo"; import { TestingInfo } from "../TestingInfo/TestingInfo"; import { ThemeToggle } from "../ThemeToggle/ThemeToggle"; @@ -16,26 +15,27 @@ export const Header = () => { return (