From 88bfec45cd8791361e38fda3cff0907ca96bcb83 Mon Sep 17 00:00:00 2001 From: lanlan Date: Tue, 12 Dec 2023 17:20:50 +0800 Subject: [PATCH] feat(websit): mobile page style optimization --- documents/src/css/custom.css | 7 ++- website/src/components/NavBar.tsx | 75 ++++++++++++++--------- website/src/components/home/Abilities.tsx | 2 +- website/src/components/home/Features.tsx | 5 +- website/src/components/home/Version.tsx | 2 +- website/src/pages/index.tsx | 40 +++++++++--- 6 files changed, 84 insertions(+), 47 deletions(-) diff --git a/documents/src/css/custom.css b/documents/src/css/custom.css index cb253f5..9fff342 100644 --- a/documents/src/css/custom.css +++ b/documents/src/css/custom.css @@ -16,6 +16,7 @@ a:hover { :root { --ifm-color-primary: #0fc6c2; --ifm-breadcrumb-color-active: #0fc6c2; + --ifm-menu-color: #000; --ifm-menu-color-active: #0fc6c2; --ifm-link-hover-color: #0fc6c2; --ifm-footer-link-hover-color: #0fc6c2; @@ -34,12 +35,12 @@ aside.theme-doc-sidebar-container { width: 240px !important; } -.navbar__toggle.clean-btn svg { +/* .navbar__toggle.clean-btn svg { color: white; -} +} */ @media (max-width: 996px) { :root { - --ifm-menu-color: white; + --ifm-menu-color: #000; } } diff --git a/website/src/components/NavBar.tsx b/website/src/components/NavBar.tsx index a410180..ca733af 100644 --- a/website/src/components/NavBar.tsx +++ b/website/src/components/NavBar.tsx @@ -1,8 +1,9 @@ import React, { useEffect, useState } from 'react'; -import { AppBar, Drawer, Grid, Toolbar, Typography, Button, Box, Container, Link, List, ListItem, ListItemText, Stack } from '@mui/material'; +import { AppBar, Drawer, Grid, Toolbar, Typography, Button, Box, Container, Link, List, ListItem, ListItemText, Stack, IconButton } from '@mui/material'; import Image from 'next/image'; import dynamic from 'next/dynamic'; import Icon from "@/components/Icon"; +import CloseIcon from '@mui/icons-material/Close'; import usePopupState, { bindPopover, bindHover } from '@/components/Popover/usePopupState' const navs = [ @@ -56,32 +57,7 @@ export default function NavBar() { - - - - SafeLine Logo - - - 雷池 SafeLine - - - + {navs.map((nav, index) => ( @@ -172,16 +148,24 @@ export default function NavBar() { setOpen(false)} > + + + + + setOpen(false)}> + + + {menus.map((menu) => ( @@ -191,7 +175,7 @@ export default function NavBar() { ))} - + wechat ); } + +export const SafelineTitle: React.FC = () => { + return ( + + + + SafeLine Logo + + + 雷池 SafeLine + + + + ); +}; diff --git a/website/src/components/home/Abilities.tsx b/website/src/components/home/Abilities.tsx index 1857524..fdb21df 100644 --- a/website/src/components/home/Abilities.tsx +++ b/website/src/components/home/Abilities.tsx @@ -69,7 +69,7 @@ const Abilities = () => { - + 多维能力拓展 diff --git a/website/src/components/home/Features.tsx b/website/src/components/home/Features.tsx index 30d3704..bd5a89d 100644 --- a/website/src/components/home/Features.tsx +++ b/website/src/components/home/Features.tsx @@ -158,10 +158,7 @@ const FEATURE_LIST = [ - + {