update:docs announcementBar (#4906)

This commit is contained in:
jingyang
2024-07-19 16:06:42 +08:00
committed by GitHub
parent e292b8417f
commit 2baac3760c
2 changed files with 26 additions and 35 deletions
+25 -34
View File
@@ -60,34 +60,32 @@ const config = {
themeConfig: { // @type {import('@docusaurus/preset-classic').ThemeConfig}
metadata: [{ name: 'title', content: 'Sealos by 环界云' }],
...(!isChinese && {
announcementBar: {
id: 'sealos_tip',
content: `
<div class="sealos-banner-box">
<div >如果您是国内用户,请直接访问 👉 </div>
<div class="sealos-banner-btn" onclick="window.open('https://sealos.run', '_blank');">
国内官网
</div>
<svg
onclick="handleBannerClose()"
width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1145_366)">
<path d="M12 22C6.477 22 2 17.523 2 12C2 6.477 6.477 2 12 2C17.523 2 22 6.477 22 12C22 17.523 17.523 22 12 22Z" fill="white" fill-opacity="0.16"/>
<path d="M12 21.75C6.61507 21.75 2.25 17.3849 2.25 12C2.25 6.61507 6.61507 2.25 12 2.25C17.3849 2.25 21.75 6.61507 21.75 12C21.75 17.3849 17.3849 21.75 12 21.75Z" stroke="white" stroke-opacity="0.1" stroke-width="0.5"/>
<path d="M9.17184 7.75696L11.9998 10.586L14.8278 7.75696L16.2428 9.17196L13.4138 12L16.2428 14.828L14.8278 16.243L11.9998 13.414L9.17184 16.243L7.75684 14.828L10.5858 12L7.75684 9.17196L9.17184 7.75696Z" fill="white"/>
</g>
<defs>
<clipPath id="clip0_1145_366">
<rect width="24" height="24" fill="white"/>
</clipPath>
</defs>
</svg>
announcementBar: {
id: 'sealos_tip',
content: `
<div class="sealos-banner-box">
<div>${isChinese ? 'If you are an international user, please visit 👉' : '如果您是国内用户,请直接访问 👉 '}</div>
<div class="sealos-banner-btn" onclick="window.open('${isChinese ? 'https://sealos.io' : 'https://sealos.run'}', '_blank');">
${isChinese ? 'International Site' : '国内官网'}
</div>
<svg
onclick="handleBannerClose()"
width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0_1145_366)">
<path d="M12 22C6.477 22 2 17.523 2 12C2 6.477 6.477 2 12 2C17.523 2 22 6.477 22 12C22 17.523 17.523 22 12 22Z" fill="white" fill-opacity="0.16"/>
<path d="M12 21.75C6.61507 21.75 2.25 17.3849 2.25 12C2.25 6.61507 6.61507 2.25 12 2.25C17.3849 2.25 21.75 6.61507 21.75 12C21.75 17.3849 17.3849 21.75 12 21.75Z" stroke="white" stroke-opacity="0.1" stroke-width="0.5"/>
<path d="M9.17184 7.75696L11.9998 10.586L14.8278 7.75696L16.2428 9.17196L13.4138 12L16.2428 14.828L14.8278 16.243L11.9998 13.414L9.17184 16.243L7.75684 14.828L10.5858 12L7.75684 9.17196L9.17184 7.75696Z" fill="white"/>
</g>
<defs>
<clipPath id="clip0_1145_366">
<rect width="24" height="24" fill="white"/>
</clipPath>
</defs>
</svg>
</div>
`,
isCloseable: true,
}
}),
isCloseable: true,
},
algolia: {
// Algolia 提供的应用 ID
appId: "SLTSB7B9Y0",
@@ -241,14 +239,7 @@ const config = {
tagName: 'meta',
attributes: {
name: 'baidu-site-verification',
content: 'codeva-gAHDaifnOq',
},
},
{
tagName: 'meta',
attributes: {
name: 'baidu-site-verification',
content: 'codeva-E1X5UKtV9p',
content: 'codeva-IaVFkVUuDD',
},
},
{
+1 -1
View File
@@ -29,7 +29,7 @@ const Home = () => {
document.head.appendChild(script1);
const scriptBaidu = document.createElement('script');
scriptBaidu.src = 'https://hm.baidu.com/hm.js?508769a0373e6443cbdf6fa135104b4b';
scriptBaidu.src = 'https://hm.baidu.com/hm.js?d8e8ecf669c47dc2512d3f1417e761f9';
scriptBaidu.async = true;
document.head.appendChild(scriptBaidu);
} else {