diff --git a/docs/website/docusaurus.config.js b/docs/website/docusaurus.config.js index d5b0d89049d..581ceaccd11 100644 --- a/docs/website/docusaurus.config.js +++ b/docs/website/docusaurus.config.js @@ -1,6 +1,7 @@ require('dotenv').config() const generateAlgoliKey = () => "ce5b8e1e4d0d35ff587caf75ac404df4" +const isChinese = process.env.SEALOS_LANG === "zh-Hans" /** @type {import('@docusaurus/types').Config} */ const config = { @@ -59,6 +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, + } + }), algolia: { // Algolia 提供的应用 ID appId: "SLTSB7B9Y0", diff --git a/docs/website/src/components/NavBanner/index.scss b/docs/website/src/components/NavBanner/index.scss deleted file mode 100644 index 429e3e47459..00000000000 --- a/docs/website/src/components/NavBanner/index.scss +++ /dev/null @@ -1,195 +0,0 @@ -.sealos-banner-box { - position: fixed; - top: 0; - background: linear-gradient( - 90deg, - rgba(20, 46, 78, 0.3) 0%, - rgba(33, 115, 160, 0.3) 50%, - rgba(20, 46, 78, 0.3) 100% - ); - backdrop-filter: blur(187px); - width: 100%; - height: 48px; - display: flex; - justify-content: center; - align-items: center; - - color: #fff; - font-family: PingFang SC; - font-size: 16px; - font-style: normal; - font-weight: 600; - letter-spacing: 0.16px; - z-index: 99; - flex-shrink: 0; - - svg { - position: absolute; - right: 9rem; - cursor: pointer; - } -} - -.sealos-banner-btn { - cursor: pointer; - display: flex; - justify-content: center; - align-items: center; - border-radius: 8px; - background: rgba(0, 0, 0, 0.2); - padding: 0 14px; - margin-left: 24px; - position: relative; - height: 32px; - font-size: 16px; - svg { - position: absolute; - right: -8px; - bottom: -8px; - } -} - -.sealos-banner-container { - width: 590px; - height: 444px; - border-radius: 16px; - background: #0e1a28; - box-shadow: 0px 8px 29px 0px rgba(187, 196, 206, 0.25); - position: fixed; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - z-index: 99; - .title { - height: 64px; - display: flex; - align-items: center; - justify-content: center; - border-radius: 16px 16px 0px 0px; - background: rgba(122, 207, 255, 0.1); - - .txt { - color: #fff; - font-family: Karmilla; - font-size: 24px; - font-style: normal; - font-weight: 700; - line-height: 140%; - margin-left: 8px; - } - - .sealos-banner-btn-close { - cursor: pointer; - fill: #fff; - width: 32px; - height: 32px; - position: absolute; - right: 20px; - // margin-left: auto; - } - } -} - -.sealos-banner-body { - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - padding: 0 117px; - - color: #fff; - font-style: normal; - font-weight: 600; - line-height: 140%; - letter-spacing: 0.28px; - - .banner-title { - font-size: 28px; - margin-top: 76px; - margin-bottom: 30px; - } - - .banner__subtitle { - font-size: 18px; - } -} - -.btn { - cursor: pointer; - border-radius: 64px; - background: #479ceb; - display: flex; - padding: 12px 16px; - justify-content: center; - align-items: center; - margin-top: 46px; - width: 100%; -} - -.btn-cancel { - cursor: pointer; - margin-top: 20px; - color: rgba(255, 255, 255, 0.9); - font-size: 14px; - font-style: normal; - font-weight: 400; - line-height: 20px; -} - -.sealos-banner-modal { - position: fixed; - left: 0; - top: 0; - width: 100vw; - height: 100vh; - background: rgba(0, 0, 0, 0.48); - z-index: 99; -} - -@media screen and (max-width: 1000px) { - .sealos-banner-box { - font-size: 12px; - font-weight: 500; - - svg { - position: absolute; - right: 1rem; - } - } - - .sealos-banner-btn { - font-size: 12px; - font-weight: 500; - padding: 0 8px; - } - - .sealos-banner-container { - width: 90%; - - .title { - svg { - width: 36px; - height: 36px; - } - - .txt { - font-size: 18px; - } - } - } - - .sealos-banner-body { - padding: 0 12px; - .banner-title { - font-size: 20px; - } - - .banner__subtitle { - font-size: 14px; - } - } - - .btn { - font-size: 14px; - } -} diff --git a/docs/website/src/components/NavBanner/index.tsx b/docs/website/src/components/NavBanner/index.tsx deleted file mode 100644 index 2d3098b66f5..00000000000 --- a/docs/website/src/components/NavBanner/index.tsx +++ /dev/null @@ -1,47 +0,0 @@ -import Translate from '@docusaurus/Translate'; -import React, { useEffect, useState } from 'react'; -import CloseIcon from '@site/static/icons/close.svg'; -import './index.scss'; - -export default function NavBanner({ - isBannerVisible = false, - setIsBannerVisible -}: { - isBannerVisible: boolean; - setIsBannerVisible: React.Dispatch