From c47c7d2c4ad1589ed30be6392d4d5170698b0123 Mon Sep 17 00:00:00 2001 From: QiShaoXuan Date: Fri, 21 Oct 2022 15:19:39 +0800 Subject: [PATCH] feat: modify styles --- packages/app/package.json | 3 ++- packages/app/src/components/Header/index.tsx | 12 ++++++------ packages/app/src/components/Header/styles.ts | 4 ++++ packages/app/src/pages/_app.tsx | 2 ++ packages/app/src/pages/_document.tsx | 7 +------ packages/app/src/styles/theme.ts | 2 +- pnpm-lock.yaml | 6 ++++++ 7 files changed, 22 insertions(+), 14 deletions(-) diff --git a/packages/app/package.json b/packages/app/package.json index 7a2d9cc435..713e3489cc 100644 --- a/packages/app/package.json +++ b/packages/app/package.json @@ -17,9 +17,10 @@ "@emotion/react": "^11.10.4", "@emotion/server": "^11.10.0", "@emotion/styled": "^11.10.4", + "@fontsource/roboto-mono": "^4.5.8", "@mui/base": "^5.0.0-alpha.87", - "@mui/material": "^5.8.6", "@mui/icons-material": "^5.10.9", + "@mui/material": "^5.8.6", "@toeverything/pathfinder-logger": "workspace:@pathfinder/logger@*", "css-spring": "^4.1.0", "lit": "^2.3.1", diff --git a/packages/app/src/components/Header/index.tsx b/packages/app/src/components/Header/index.tsx index 405cd9006a..037362061d 100644 --- a/packages/app/src/components/Header/index.tsx +++ b/packages/app/src/components/Header/index.tsx @@ -66,12 +66,12 @@ export const Header = () => { return ( <> - - { - contactModalHandler(true); - }} - /> + { + contactModalHandler(true); + }} + > + { diff --git a/packages/app/src/components/Header/styles.ts b/packages/app/src/components/Header/styles.ts index 9c529803e8..b69e0d4dae 100644 --- a/packages/app/src/components/Header/styles.ts +++ b/packages/app/src/components/Header/styles.ts @@ -36,7 +36,11 @@ export const StyledTitleWrapper = styled('div')({ export const StyledLogo = styled('div')(({ theme }) => ({ color: theme.colors.primaryColor, + width: '60px', + height: '60px', cursor: 'pointer', + marginLeft: '-22px', + ...displayFlex('center', 'center'), })); export const StyledHeaderRightSide = styled('div')({ diff --git a/packages/app/src/pages/_app.tsx b/packages/app/src/pages/_app.tsx index 747669cad0..5bb02b2ccc 100644 --- a/packages/app/src/pages/_app.tsx +++ b/packages/app/src/pages/_app.tsx @@ -7,6 +7,8 @@ import { EditorProvider } from '@/components/editor-provider'; import { ModalProvider } from '@/components/global-modal-provider'; import { Logger } from '@toeverything/pathfinder-logger'; +import '@fontsource/roboto-mono'; + const ThemeProvider = dynamic(() => import('@/styles/themeProvider'), { ssr: false, }); diff --git a/packages/app/src/pages/_document.tsx b/packages/app/src/pages/_document.tsx index d84f7f8604..7bc23a3892 100644 --- a/packages/app/src/pages/_document.tsx +++ b/packages/app/src/pages/_document.tsx @@ -42,12 +42,7 @@ export default class AppDocument extends Document { render() { return ( - - - +
diff --git a/packages/app/src/styles/theme.ts b/packages/app/src/styles/theme.ts index acf8685e34..d10c8e1471 100644 --- a/packages/app/src/styles/theme.ts +++ b/packages/app/src/styles/theme.ts @@ -29,7 +29,7 @@ export const lightTheme: AffineTheme = { sm: '16px', base: '18px', family: `Avenir Next, ${basicFontFamily}`, - family2: `Roboto, ${basicFontFamily}`, + family2: `Roboto Mono, ${basicFontFamily}`, }, zIndex: { modal: 1000, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 849ca5f4d4..8fbeb5d0c1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,6 +25,7 @@ importers: '@emotion/react': ^11.10.4 '@emotion/server': ^11.10.0 '@emotion/styled': ^11.10.4 + '@fontsource/roboto-mono': ^4.5.8 '@mui/base': ^5.0.0-alpha.87 '@mui/icons-material': ^5.10.9 '@mui/material': ^5.8.6 @@ -54,6 +55,7 @@ importers: '@emotion/react': 11.10.4_w5j4k42lgipnm43s3brx6h3c34 '@emotion/server': 11.10.0_@emotion+css@11.10.0 '@emotion/styled': 11.10.4_yiaqs725o7pcd7rteavrnhgj4y + '@fontsource/roboto-mono': 4.5.8 '@mui/base': 5.0.0-alpha.101_7ey2zzynotv32rpkwno45fsx4e '@mui/icons-material': 5.10.9_5fncb4nagb4cvvcnwamw2rozfa '@mui/material': 5.10.9_af5ln35zuaotaffazii6n6bke4 @@ -377,6 +379,10 @@ packages: - supports-color dev: true + /@fontsource/roboto-mono/4.5.8: + resolution: {integrity: sha512-AW44UkbQD0w1CT5mzDbsvhGZ6/bb0YmZzoELj6Sx8vcVEzcbYGUdt2Dtl5zqlOuYMWQFY1mniwWyVv+Bm/lVxw==} + dev: false + /@humanwhocodes/config-array/0.10.4: resolution: {integrity: sha512-mXAIHxZT3Vcpg83opl1wGlVZ9xydbfZO3r5YfRSH6Gpp2J/PfdBP0wbDa2sO6/qRbcalpoevVyW6A/fI6LfeMw==} engines: {node: '>=10.10.0'}