diff --git a/website/cn/public/fonts/iconfont.js b/website/cn/public/fonts/iconfont.js index 48e682e..623f3e6 100644 --- a/website/cn/public/fonts/iconfont.js +++ b/website/cn/public/fonts/iconfont.js @@ -1 +1 @@ -window._iconfont_svg_string_4031246='',function(h){var a=(a=document.getElementsByTagName("script"))[a.length-1],c=a.getAttribute("data-injectcss"),a=a.getAttribute("data-disable-injectsvg");if(!a){var t,o,l,i,m,n=function(a,c){c.parentNode.insertBefore(a,c)};if(c&&!h.__iconfont__svg__cssinject__){h.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}t=function(){var a,c=document.createElement("div");c.innerHTML=h._iconfont_svg_string_4031246,(c=c.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",c=c,(a=document.body).firstChild?n(c,a.firstChild):a.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(t,0):(o=function(){document.removeEventListener("DOMContentLoaded",o,!1),t()},document.addEventListener("DOMContentLoaded",o,!1)):document.attachEvent&&(l=t,i=h.document,m=!1,v(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,e())})}function e(){m||(m=!0,l())}function v(){try{i.documentElement.doScroll("left")}catch(a){return void setTimeout(v,50)}e()}}(window); \ No newline at end of file +window._iconfont_svg_string_4031246='',function(h){var a=(a=document.getElementsByTagName("script"))[a.length-1],c=a.getAttribute("data-injectcss"),a=a.getAttribute("data-disable-injectsvg");if(!a){var l,t,o,i,m,n=function(a,c){c.parentNode.insertBefore(a,c)};if(c&&!h.__iconfont__svg__cssinject__){h.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}l=function(){var a,c=document.createElement("div");c.innerHTML=h._iconfont_svg_string_4031246,(c=c.getElementsByTagName("svg")[0])&&(c.setAttribute("aria-hidden","true"),c.style.position="absolute",c.style.width=0,c.style.height=0,c.style.overflow="hidden",c=c,(a=document.body).firstChild?n(c,a.firstChild):a.appendChild(c))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(l,0):(t=function(){document.removeEventListener("DOMContentLoaded",t,!1),l()},document.addEventListener("DOMContentLoaded",t,!1)):document.attachEvent&&(o=l,i=h.document,m=!1,e(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,v())})}function v(){m||(m=!0,o())}function e(){try{i.documentElement.doScroll("left")}catch(a){return void setTimeout(e,50)}v()}}(window); \ No newline at end of file diff --git a/website/cn/src/components/Footer.tsx b/website/cn/src/components/Footer.tsx index 81bb379..52c18f1 100644 --- a/website/cn/src/components/Footer.tsx +++ b/website/cn/src/components/Footer.tsx @@ -8,7 +8,7 @@ const LINKS = [ items: [ { label: "技术文档", - to: "/docs", + to: "https://docs.waf-ce.chaitin.cn/zh/home", }, { label: "教学视频", @@ -16,11 +16,11 @@ const LINKS = [ }, { label: "学习资料", - to: "/docs", + to: "https://docs.waf-ce.chaitin.cn/zh/home", }, { label: "更新日志", - to: "/docs/about/changelog", + to: "https://docs.waf-ce.chaitin.cn/zh/%E7%89%88%E6%9C%AC%E6%9B%B4%E6%96%B0%E8%AE%B0%E5%BD%95", }, ], }, diff --git a/website/cn/src/components/NavBar.tsx b/website/cn/src/components/NavBar.tsx index 12c1bf7..b370808 100644 --- a/website/cn/src/components/NavBar.tsx +++ b/website/cn/src/components/NavBar.tsx @@ -14,8 +14,6 @@ import { ListItemText, Stack, IconButton, - MenuItem, - Select, } from "@mui/material"; import Image from "next/image"; import dynamic from "next/dynamic"; @@ -27,9 +25,9 @@ import usePopupState, { } from "@/components/Popover/usePopupState"; const navs = [ - { to: "/docs", label: "帮助文档", target: "_blank" }, - { to: "/community", label: "开发计划", target: "_self" }, - { to: "/version", label: "付费版本", target: "_self" }, + { to: "https://docs.waf-ce.chaitin.cn/zh/home", label: "帮助文档", target: "_blank", new: true }, + { to: "/community", label: "开发计划", target: "_self", new: false }, + { to: "/version", label: "付费版本", target: "_self", new: false }, ]; const menus = [ @@ -38,11 +36,13 @@ const menus = [ to: "https://github.com/chaitin/SafeLine", label: "GitHub", target: "_blank", + new: false, }, { to: "https://demo.waf-ce.chaitin.cn:9443/dashboard", label: "演示 Demo", target: "_blank", + new: false, }, ]; @@ -56,17 +56,7 @@ const HoverPopover = dynamic( export default function NavBar() { const [isSticky, setIsSticky] = useState(false); const [open, setOpen] = useState(false); - const [langOpen, setLangOpen] = useState(false); - const handleOpen = () => { - setLangOpen(true); - }; - const handleClose = () => { - setLangOpen(false); - }; - const handleChange = () => { - window.open("https://waf.chaitin.com/"); - }; const popoverState = usePopupState({ popupId: "wechat-qrcode-popover", }); @@ -87,79 +77,7 @@ export default function NavBar() { window.removeEventListener("scroll", handleScroll); }; }, []); - const langRender = () => ( - - ); + return ( <> - + - {langRender()} {navs.map((nav, index) => ( {nav.label} + {nav.new && } ))} @@ -224,6 +142,21 @@ export default function NavBar() { Discord + + + X + Demo @@ -362,27 +292,27 @@ export const SafelineTitle: React.FC = () => { flexDirection="row" display="flex" spacing={2} - sx={{ marginTop: "0px", flexWrap: "nowrap" }} + sx={{ marginTop: "0px", minWidth: "192px" }} > SafeLine Logo 立即安装 diff --git a/website/cn/src/components/home/Abilities.tsx b/website/cn/src/components/home/Abilities.tsx index b2b7e74..e6b2be1 100644 --- a/website/cn/src/components/home/Abilities.tsx +++ b/website/cn/src/components/home/Abilities.tsx @@ -6,22 +6,22 @@ import Icon from "@/components/Icon"; const ABILITY_LIST = [ { title: "人机验证", - href: "/docs/about/challenge", + href: "https://docs.waf-ce.chaitin.cn/zh/%E4%B8%8A%E6%89%8B%E6%8C%87%E5%8D%97/%E5%BF%AB%E9%80%9F%E9%85%8D%E7%BD%AE", img: "/images/ability/ability_verification.png", }, { title: "百川网站监控联动", - href: "/docs/practice/monitor", + href: "https://docs.waf-ce.chaitin.cn/%E6%9C%80%E4%BD%B3%E5%AE%9E%E8%B7%B5/%E7%99%BE%E5%B7%9D%E7%BD%91%E7%AB%99%E7%9B%91%E6%B5%8B", img: "/images/ability/ability_rivers.png", }, { title: "APISIX 插件集成", - href: "/docs/practice/apisix", + href: "https://docs.waf-ce.chaitin.cn/zh/%E6%9C%80%E4%BD%B3%E5%AE%9E%E8%B7%B5/%E8%81%94%E5%8A%A8APISIX", img: "/images/ability/ability_apisix.svg", }, { title: "长亭社区恶意 IP 情报", - href: "/docs/practice/IpIntelligence", + href: "https://docs.waf-ce.chaitin.cn/", img: "/images/ability/ability_maliciousip.svg", }, { diff --git a/website/cn/src/components/home/Features.tsx b/website/cn/src/components/home/Features.tsx index bd5a89d..033d582 100644 --- a/website/cn/src/components/home/Features.tsx +++ b/website/cn/src/components/home/Features.tsx @@ -42,7 +42,7 @@ const FEATURE_LIST = [ mb: { xs: 2, sm: 0 }, fontSize: { xs: "24px", sm: "14px" }, }} - href="/docs/about/syntaxanalysis" + href="https://docs.waf-ce.chaitin.cn/" > 了解详情 diff --git a/website/cn/src/pages/index.tsx b/website/cn/src/pages/index.tsx index c5207d9..31af3d6 100644 --- a/website/cn/src/pages/index.tsx +++ b/website/cn/src/pages/index.tsx @@ -217,7 +217,7 @@ export default function Home({ total, starCount }: { total: number, starCount: n fontSize: { xs: "32px", sm: "20px" }, boxShadow: "0px 15px 25px 0px rgba(15,198,194,0.3)", }} - href="/docs/guide/install" + href="https://docs.waf-ce.chaitin.cn/zh/%E4%B8%8A%E6%89%8B%E6%8C%87%E5%8D%97/%E5%AE%89%E8%A3%85%E9%9B%B7%E6%B1%A0" > 立即安装