diff --git a/docs/website/docusaurus.config.js b/docs/website/docusaurus.config.js index 5e38eb1a599..b2f01098998 100644 --- a/docs/website/docusaurus.config.js +++ b/docs/website/docusaurus.config.js @@ -60,34 +60,34 @@ const config = { themeConfig: { // @type {import('@docusaurus/preset-classic').ThemeConfig} metadata: [{ name: 'title', content: 'Sealos by 环界云' }], - ...(!isChinese && { - announcementBar: { - id: 'sealos_tip', - content: ` -
-
如果您是国内用户,请直接访问 👉
-
- 国内官网 -
- - - - - - - - - - - - -
- `, - isCloseable: true, - } - }), + // ...(!isChinese && { + // announcementBar: { + // id: 'sealos_tip', + // content: ` + //
+ //
如果您是国内用户,请直接访问 👉
+ //
+ // 国内官网 + //
+ // + // + // + // + // + // + // + // + // + // + // + // + //
+ // `, + // isCloseable: true, + // } + // }), algolia: { // Algolia 提供的应用 ID appId: "SLTSB7B9Y0", diff --git a/docs/website/src/components/SaleBanner/index.scss b/docs/website/src/components/SaleBanner/index.scss index 33782391737..bfa5c53dfb2 100644 --- a/docs/website/src/components/SaleBanner/index.scss +++ b/docs/website/src/components/SaleBanner/index.scss @@ -71,7 +71,7 @@ flex-direction: column; align-items: center; justify-content: center; - padding: 0 117px; + padding: 0 110px; color: #fff; font-style: normal; diff --git a/docs/website/src/components/SaleBanner/index.tsx b/docs/website/src/components/SaleBanner/index.tsx index 8850522507a..cc5c8437a32 100644 --- a/docs/website/src/components/SaleBanner/index.tsx +++ b/docs/website/src/components/SaleBanner/index.tsx @@ -3,17 +3,21 @@ import DrawIcon from '@site/static/icons/draw.svg'; import LogoIcon from '@site/static/icons/sealos.svg'; import React, { useEffect, useState } from 'react'; import './index.scss'; +import useWindow from '@site/src/hooks/useWindow'; export default function SaleBanner() { const [isBannerVisible, setIsBannerVisible] = useState(false); - const [doMain, setDoMain] = useState('cloud.sealos.io'); + const { cloudUrl } = useWindow(); const closeBanner = () => { setIsBannerVisible(false); }; const goDetailFeishu = () => { - window.open(`https://forum.laf.run/d/1207`, '_blank'); + window.open( + `https://fael3z0zfze.feishu.cn/wiki/SzKowEuQji5coRkm5o8cm8oJn3L?from=from_copylink`, + '_blank' + ); }; useEffect(() => { @@ -32,7 +36,7 @@ export default function SaleBanner() { return ( <>
- 🎉 Sealos 开春福利大放送!充值优惠限时开启,多充多送还有精美周边! + 🎉Sealos 6.18 福利大放送!充值优惠限时开启,多充多送还有精美周边!
活动详情 @@ -46,16 +50,13 @@ export default function SaleBanner() { Sealos
-
🎉 Sealos 开春福利大放送!
+
🎉Sealos 6.18 福利大放送!
充值优惠限时开启
多充多送还有精美周边!
{ - window.open( - `https://${doMain}/?openapp=system-costcenter?openRecharge=true`, - '_blank' - ); + window.open(`${cloudUrl}/?openapp=system-costcenter?openRecharge=true`, '_blank'); closeBanner(); }} > diff --git a/docs/website/src/hooks/useWindow.ts b/docs/website/src/hooks/useWindow.ts index 60619ea08b7..ba09a6260bf 100644 --- a/docs/website/src/hooks/useWindow.ts +++ b/docs/website/src/hooks/useWindow.ts @@ -1,7 +1,7 @@ import { useEffect, useState } from 'react'; import useIsBrowser from '@docusaurus/useIsBrowser'; -export default function () { +export default function useWindow() { const isBrowser = useIsBrowser(); const [screenWidth, setScreenWidth] = useState(isBrowser ? document.body.clientWidth : 1440); const [currentLanguage, setCurrentLanguage] = useState( diff --git a/docs/website/src/pages/components/Header/index.phone.scss b/docs/website/src/pages/components/Header/index.phone.scss index 43b520f92ed..1f50a15f9fe 100644 --- a/docs/website/src/pages/components/Header/index.phone.scss +++ b/docs/website/src/pages/components/Header/index.phone.scss @@ -7,6 +7,7 @@ justify-content: center; align-items: center; padding: 0; + padding-top: 48px; nav { padding: 28px 16px; diff --git a/docs/website/src/pages/components/Header/index.scss b/docs/website/src/pages/components/Header/index.scss index 7048e256e84..b2690b357a3 100644 --- a/docs/website/src/pages/components/Header/index.scss +++ b/docs/website/src/pages/components/Header/index.scss @@ -6,6 +6,7 @@ justify-content: center; align-items: center; flex-direction: column; + padding-top: 48px; .header-img { width: 100%; diff --git a/docs/website/src/pages/index.tsx b/docs/website/src/pages/index.tsx index fd96ee7a5bf..3b0869b4960 100644 --- a/docs/website/src/pages/index.tsx +++ b/docs/website/src/pages/index.tsx @@ -12,6 +12,7 @@ import Introduce from './components/Introduce'; import HomeUserBy from './components/UserBy'; import './index.scss'; import Head from '@docusaurus/Head'; +import SaleBanner from '../components/SaleBanner'; const Home = () => { const { screenWidth, currentLanguage } = useWindow(); @@ -71,6 +72,7 @@ const Home = () => {
+