From 23b2c61d477e95e41b988ab1fb9b1babc1222f10 Mon Sep 17 00:00:00 2001 From: Phil Date: Mon, 4 Mar 2024 11:44:19 -0700 Subject: [PATCH] Neon styling --- src/components/liquidityPositions/status.tsx | 5 +--- src/components/util/loadingSpinner.tsx | 19 ++++++++++++++ src/pages/_app.tsx | 2 +- src/pages/lp/[lp_nft_id].tsx | 14 +++-------- .../protos/services/app/shielded-pool.ts | 1 + styles/Home.module.css | 6 +++-- styles/global.css | 25 ++++++++++++++++++- 7 files changed, 54 insertions(+), 18 deletions(-) create mode 100644 src/components/util/loadingSpinner.tsx diff --git a/src/components/liquidityPositions/status.tsx b/src/components/liquidityPositions/status.tsx index f813d77e..e2a53016 100644 --- a/src/components/liquidityPositions/status.tsx +++ b/src/components/liquidityPositions/status.tsx @@ -126,11 +126,8 @@ const LPStatus = ({ nftId, position }: LPStatusProps) => { return ( {nftId} diff --git a/src/components/util/loadingSpinner.tsx b/src/components/util/loadingSpinner.tsx new file mode 100644 index 00000000..8bd9fb50 --- /dev/null +++ b/src/components/util/loadingSpinner.tsx @@ -0,0 +1,19 @@ +import { Center, VStack, Spinner, Text } from "@chakra-ui/react"; + +export const LoadingSpinner = () => { + return ( +
+ + + Loading{" "} + +
+ ); +} \ No newline at end of file diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index dce42674..9af01ccc 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -9,7 +9,7 @@ function MyApp({ Component, pageProps }: AppProps) { global: { // Apply some styles globally across all elements body: { - bg: "var(--charcoal)", + bg: "var(--charcoal-secondary)", color: "var(--light-grey)", fontFamily: "sans-serif", fontWeight: "400", diff --git a/src/pages/lp/[lp_nft_id].tsx b/src/pages/lp/[lp_nft_id].tsx index 36c6f896..7de0c634 100644 --- a/src/pages/lp/[lp_nft_id].tsx +++ b/src/pages/lp/[lp_nft_id].tsx @@ -11,8 +11,8 @@ import { } from "@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/component/dex/v1/dex_pb"; import Layout from "../../components/layout"; import LPStatus from "../../components/liquidityPositions/status"; -import { VStack } from "@chakra-ui/layout"; -import { Text } from "@chakra-ui/react"; +import { VStack, Text, Spinner, Center } from "@chakra-ui/react"; +import { LoadingSpinner } from "../../components/util/loadingSpinner"; export default function LP() { const router = useRouter(); @@ -56,7 +56,7 @@ export default function LP() {
{isLoading ? ( -

Loading...

+ ) : liquidityPosition ? ( <> @@ -66,19 +66,13 @@ export default function LP() { width={"100%"} alignContent={"left"} fontSize={"1.5em"} + paddingBottom=".5em" > Position Status - {/* -
-
-
-

NFT ID: {lp_nft_id}

-

{JSON.stringify(liquidityPosition)}

- */} ) : (

No liquidity position found.

diff --git a/src/utils/protos/services/app/shielded-pool.ts b/src/utils/protos/services/app/shielded-pool.ts index e160cbba..1734f4c2 100644 --- a/src/utils/protos/services/app/shielded-pool.ts +++ b/src/utils/protos/services/app/shielded-pool.ts @@ -16,6 +16,7 @@ export class ShieldedPoolQuerier implements ShieldedPoolQuerierInterface { async assetMetadata(assetId: AssetId): Promise { const res = await this.client.assetMetadataById({ assetId }); + console.info(res) return res.denomMetadata; } } diff --git a/styles/Home.module.css b/styles/Home.module.css index e95555ae..ccf3c00d 100644 --- a/styles/Home.module.css +++ b/styles/Home.module.css @@ -93,9 +93,11 @@ .header { width: 100%; - background-color: var(--purple-accent-700); /* Grey with 50% opacity */ + background: linear-gradient(to bottom, var(--purple-accent-700), transparent); /* position: fixed; /* Optional: makes the header stay at the top on scroll */ top: 0; - z-index: 10; + z-index: 10; padding: 1em; } + + diff --git a/styles/global.css b/styles/global.css index a7c5f4a9..e5b5d9ca 100644 --- a/styles/global.css +++ b/styles/global.css @@ -38,7 +38,12 @@ --light-brown: #363434; --light-grey: #e3e3e3; --brown: rgba(29, 29, 29, 0.7); - --background-gradient: linear-gradient(90deg, rgba(139, 228, 217, .42) 0%, rgba(200, 184, 128, .42) 50%, rgba(255, 144, 47, .36) 100%); + --background-gradient: linear-gradient( + 90deg, + rgba(139, 228, 217, 0.42) 0%, + rgba(200, 184, 128, 0.42) 50%, + rgba(255, 144, 47, 0.36) 100% + ); --complimentary-background: #6e6eb8; --teal-accent: #5b6584; --purple-accent: #6e6eb8; @@ -66,3 +71,21 @@ img { max-width: 100%; height: auto; } + +.neon-box { + outline: 0.15em solid var(--complimentary-background); + border-radius: 0.5em; + width: fit-content; + background: var(--charcoal); + box-shadow: 0 0 5px var(--complimentary-background), + /* Smaller glow */ 0 0 10px var(--complimentary-background), + /* Smaller glow */ 0 0 15px var(--complimentary-background), + /* Subtle bright glow */ 0 0 20px var(--complimentary-background), + /* Subtle bright glow */ 0 0 25px var(--complimentary-background), + /* Subtle bright glow */ 0 0 30px var(--complimentary-background); /* Subtle bright glow */ +} + +.neon-spinner { + filter: drop-shadow(0 0 8px white) + drop-shadow(0 0 12px white); +}