From 478e3d79d37fde57a19cba7ac5359417442270a1 Mon Sep 17 00:00:00 2001 From: JimmFly Date: Sat, 6 Aug 2022 18:10:31 +0800 Subject: [PATCH 01/55] Beautify the header style --- apps/venus/src/app/index.tsx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/apps/venus/src/app/index.tsx b/apps/venus/src/app/index.tsx index dea6dc0b7b..42c008138f 100644 --- a/apps/venus/src/app/index.tsx +++ b/apps/venus/src/app/index.tsx @@ -204,6 +204,10 @@ const GitHub = (props: { center?: boolean; flat?: boolean }) => { {...{ sx: { margin: 'auto 1em', + fontSize: '24px', + '@media (max-width: 768px)': { + fontSize: '16px', + }, ...(props.flat ? { padding: matches ? '0' : '0 0.5em', @@ -256,6 +260,10 @@ export function App() { sx={{ padding: matches ? '0' : '0 0.5em', ':hover': { backgroundColor: 'unset' }, + fontSize: '24px', + '@media (max-width: 768px)': { + fontSize: '16px', + }, }} > AFFiNE @@ -276,6 +284,10 @@ export function App() { sx={{ padding: matches ? '0' : '0 0.5em', ':hover': { backgroundColor: 'unset' }, + fontSize: '24px', + '@media (max-width: 768px)': { + fontSize: '16px', + }, }} size="lg" > From c5e8b0a251362c199408689c3af77e79ef032293 Mon Sep 17 00:00:00 2001 From: JimmFly Date: Mon, 8 Aug 2022 12:16:05 +0800 Subject: [PATCH 02/55] chore: update styles --- apps/venus/src/app/index.tsx | 38 ++++++++++++++++++++++-------------- 1 file changed, 23 insertions(+), 15 deletions(-) diff --git a/apps/venus/src/app/index.tsx b/apps/venus/src/app/index.tsx index 42c008138f..ba344c4d1c 100644 --- a/apps/venus/src/app/index.tsx +++ b/apps/venus/src/app/index.tsx @@ -52,7 +52,7 @@ const Alternatives = styled(Box)<{ width: string }>(({ width }) => ({ height: '128px', transform: 'translateY(-8px)', overflowY: 'hidden', - '@media (max-width: 768px)': { + '@media (max-width: 1020px)': { width, height: '48px', transform: 'translateY(0)', @@ -64,7 +64,7 @@ const Alternatives = styled(Box)<{ width: string }>(({ width }) => ({ left: '0%', top: '0%', lineHeight: '96px', - '@media (max-width: 768px)': { + '@media (max-width: 1020px)': { lineHeight: '32px', }, }, @@ -109,7 +109,7 @@ const Product = () => { ); const maxWidth = useMemo(() => _alternativesSize[idx], [idx]); const [active, setActive] = useState(false); - const matches = useMediaQuery('(max-width: 768px)'); + const matches = useMediaQuery('(max-width: 1020px)'); useEffect(() => { const handle = setInterval(() => { @@ -128,7 +128,14 @@ const Product = () => { return ( { color: '#06449d', textAlign: 'right', overflow: 'hidden', - '@media (max-width: 768px)': { + '@media (max-width: 1020px)': { fontSize: '32px', }, }} @@ -162,7 +169,7 @@ const Product = () => { marginTop: '96px', textAlign: 'right', overflow: 'hidden', - '@media (max-width: 768px)': { + '@media (max-width: 1020px)': { marginTop: '48px', }, }} @@ -173,7 +180,7 @@ const Product = () => { sx={{ color: '#06449d', overflow: 'hidden', - '@media (max-width: 768px)': { + '@media (max-width: 1020px)': { fontSize: '32px', }, }} @@ -191,7 +198,7 @@ const AffineImage = styled('img')({ }); const GitHub = (props: { center?: boolean; flat?: boolean }) => { - const matches = useMediaQuery('(max-width: 768px)'); + const matches = useMediaQuery('(max-width: 1020px)'); return (