From 97b1158d7972bc3c91ce7b27c76076b91676e637 Mon Sep 17 00:00:00 2001 From: Megumiiiiii Date: Wed, 13 Dec 2023 18:48:21 +0700 Subject: [PATCH 1/2] Add background to Launchpage and simplify background code --- frontend/src/components/NavBar/index.tsx | 2 +- frontend/src/pages/Home/index.tsx | 5 +--- frontend/src/pages/Launch/index.tsx | 1 + frontend/src/pages/Launch/style.css.ts | 37 +++++++++++++++++++++++- 4 files changed, 39 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/NavBar/index.tsx b/frontend/src/components/NavBar/index.tsx index ed2cf71d..98474371 100644 --- a/frontend/src/components/NavBar/index.tsx +++ b/frontend/src/components/NavBar/index.tsx @@ -13,7 +13,7 @@ export const links = [ path: '/launch', }, { - name: 'Manager', + name: 'Manage', path: '/manage', }, ] diff --git a/frontend/src/pages/Home/index.tsx b/frontend/src/pages/Home/index.tsx index 6477d6fc..baf9c09c 100644 --- a/frontend/src/pages/Home/index.tsx +++ b/frontend/src/pages/Home/index.tsx @@ -10,10 +10,7 @@ import * as styles from './style.css' export default function HomePage() { return ( - - - - + Unruggable Memecoin diff --git a/frontend/src/pages/Launch/index.tsx b/frontend/src/pages/Launch/index.tsx index 9f06e73c..2c5f402a 100644 --- a/frontend/src/pages/Launch/index.tsx +++ b/frontend/src/pages/Launch/index.tsx @@ -63,6 +63,7 @@ export default function LaunchPage() { return ( + diff --git a/frontend/src/pages/Launch/style.css.ts b/frontend/src/pages/Launch/style.css.ts index ab1a1db6..51ea8209 100644 --- a/frontend/src/pages/Launch/style.css.ts +++ b/frontend/src/pages/Launch/style.css.ts @@ -1,5 +1,40 @@ import { style } from '@vanilla-extract/css' -import { sprinkles } from 'src/theme/css/sprinkles.css' +import { sprinkles, vars } from 'src/theme/css/sprinkles.css' +import { transparentize } from 'polished' + +export const backgroundContainer = style([ + { + zIndex: '-99', + position: 'absolute', + top: '0', + right: '0', + bottom: '0', + left: '0', + height: '100vh', + maxHeight: '1000px', + }, +]) + +export const background = style([ + { + backgroundImage: ` + linear-gradient(to bottom, ${transparentize(0.3, '#000000')}, ${vars.color.bg1}), + url("src/assets/background.png") + `, + backgroundSize: 'cover', + backgroundPosition: 'center', + backgroundRepeat: 'no-repeat', + }, + sprinkles({ + position: 'absolute', + top: '0', + right: '0', + bottom: '0', + left: '0', + width: 'full', + height: 'full', + }), +]) export const wrapper = style([ { From fd0455368a4056a7dec4359ce1bea8b4d0675ac2 Mon Sep 17 00:00:00 2001 From: Megumiiiiii Date: Wed, 13 Dec 2023 19:47:15 +0700 Subject: [PATCH 2/2] Delete background on launchpage, edit styles background to clsx --- frontend/package.json | 2 +- frontend/src/pages/Home/index.tsx | 3 +- frontend/src/pages/Launch/index.tsx | 3 +- frontend/src/pages/Launch/style.css.ts | 39 ++------------------------ frontend/yarn.lock | 8 +++--- 5 files changed, 10 insertions(+), 45 deletions(-) diff --git a/frontend/package.json b/frontend/package.json index 96c2620d..59f599be 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -17,7 +17,7 @@ "@vanilla-extract/css": "^1.11.0", "@vanilla-extract/recipes": "^0.4.0", "@vanilla-extract/sprinkles": "^1.6.0", - "clsx": "^1.2.1", + "clsx": "^2.0.0", "lucide-react": "^0.294.0", "ms.macro": "^2.0.0", "polished": "^4.2.2", diff --git a/frontend/src/pages/Home/index.tsx b/frontend/src/pages/Home/index.tsx index baf9c09c..29e7e709 100644 --- a/frontend/src/pages/Home/index.tsx +++ b/frontend/src/pages/Home/index.tsx @@ -4,13 +4,14 @@ import { PrimaryButton, SecondaryButton } from 'src/components/Button' import Box from 'src/theme/components/Box' import { Column, Row } from 'src/theme/components/Flex' import * as Text from 'src/theme/components/Text' +import clsx from 'clsx' import * as styles from './style.css' export default function HomePage() { return ( - + Unruggable Memecoin diff --git a/frontend/src/pages/Launch/index.tsx b/frontend/src/pages/Launch/index.tsx index 2c5f402a..0b8736c1 100644 --- a/frontend/src/pages/Launch/index.tsx +++ b/frontend/src/pages/Launch/index.tsx @@ -63,7 +63,6 @@ export default function LaunchPage() { return ( - @@ -153,4 +152,4 @@ export default function LaunchPage() { ) -} +} \ No newline at end of file diff --git a/frontend/src/pages/Launch/style.css.ts b/frontend/src/pages/Launch/style.css.ts index 51ea8209..325269f8 100644 --- a/frontend/src/pages/Launch/style.css.ts +++ b/frontend/src/pages/Launch/style.css.ts @@ -1,40 +1,5 @@ import { style } from '@vanilla-extract/css' -import { sprinkles, vars } from 'src/theme/css/sprinkles.css' -import { transparentize } from 'polished' - -export const backgroundContainer = style([ - { - zIndex: '-99', - position: 'absolute', - top: '0', - right: '0', - bottom: '0', - left: '0', - height: '100vh', - maxHeight: '1000px', - }, -]) - -export const background = style([ - { - backgroundImage: ` - linear-gradient(to bottom, ${transparentize(0.3, '#000000')}, ${vars.color.bg1}), - url("src/assets/background.png") - `, - backgroundSize: 'cover', - backgroundPosition: 'center', - backgroundRepeat: 'no-repeat', - }, - sprinkles({ - position: 'absolute', - top: '0', - right: '0', - bottom: '0', - left: '0', - width: 'full', - height: 'full', - }), -]) +import { sprinkles } from 'src/theme/css/sprinkles.css' export const wrapper = style([ { @@ -79,4 +44,4 @@ export const errorContainer = sprinkles({ paddingX: '8', paddingTop: '4', color: 'error', -}) +}) \ No newline at end of file diff --git a/frontend/yarn.lock b/frontend/yarn.lock index 4a420fc4..efe744c2 100644 --- a/frontend/yarn.lock +++ b/frontend/yarn.lock @@ -3744,10 +3744,10 @@ clone-deep@^4.0.1: kind-of "^6.0.2" shallow-clone "^3.0.0" -clsx@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/clsx/-/clsx-1.2.1.tgz#0ddc4a20a549b59c93a4116bb26f5294ca17dc12" - integrity sha512-EcR6r5a8bj6pu3ycsa/E/cKVGuTgZJZdsyUYHOksG/UHIiKfjxzRxYJpyVBwYaQeOvghal9fcc4PidlgzugAQg== +clsx@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/clsx/-/clsx-2.0.0.tgz#12658f3fd98fafe62075595a5c30e43d18f3d00b" + integrity sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q== co@^4.6.0: version "4.6.0"