Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 19 additions & 31 deletions docs-site/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,20 +76,25 @@ const config: Config = {
label: 'Docs',
},
{
href: 'https://github.com/Awuqing/BackupX/releases',
label: 'Downloads',
to: '/docs/deployment/docker',
label: 'Deployment',
position: 'left',
},
{
to: '/community',
label: 'Community',
to: '/docs/operations/monitoring',
label: 'Operations',
position: 'left',
},
{
to: '/sponsors',
label: 'Sponsors',
to: '/docs/reference/api',
label: 'API',
position: 'left',
},
{
to: '/community',
label: 'Community',
position: 'right',
},
{
type: 'localeDropdown',
position: 'right',
Expand All @@ -105,44 +110,27 @@ const config: Config = {
style: 'dark',
links: [
{
title: 'Docs',
title: 'Documentation',
items: [
{label: 'Introduction', to: '/docs/intro'},
{label: 'Quick Start', to: '/docs/getting-started/quick-start'},
{label: 'Upgrade & Recovery', to: '/docs/operations/upgrade-recovery'},
{label: 'Configuration', to: '/docs/deployment/configuration'},
],
},
{
title: 'Features',
title: 'Operations',
items: [
{label: 'SAP HANA', to: '/docs/features/sap-hana'},
{label: 'Multi-Node Cluster', to: '/docs/features/multi-node'},
{label: 'API Reference', to: '/docs/reference/api'},
{label: 'Monitoring', to: '/docs/operations/monitoring'},
{label: 'Security', to: '/docs/operations/security'},
{label: 'Troubleshooting', to: '/docs/operations/troubleshooting'},
],
},
{
title: 'More',
title: 'Project',
items: [
{label: 'GitHub', href: 'https://github.com/Awuqing/BackupX'},
{label: 'Releases', href: 'https://github.com/Awuqing/BackupX/releases'},
{label: 'Docker Hub', href: 'https://hub.docker.com/r/awuqing/backupx'},
{label: 'Issues', href: 'https://github.com/Awuqing/BackupX/issues'},
],
},
{
title: 'Community',
items: [
{label: 'Contributors', href: 'https://github.com/Awuqing/BackupX/graphs/contributors'},
{label: 'Pull Requests', href: 'https://github.com/Awuqing/BackupX/pulls'},
{label: 'Sponsor', to: '/sponsors'},
],
},
{
title: 'Sponsors',
items: [
{label: 'Sponsor BackupX', href: 'https://github.com/sponsors/Awuqing'},
{label: 'Partnership', href: 'https://github.com/Awuqing/BackupX/issues/new/choose'},
{label: 'Sponsor tiers', to: '/sponsors'},
{label: 'Community', to: '/community'},
],
},
],
Expand Down
227 changes: 91 additions & 136 deletions docs-site/i18n/zh-CN/code.json

Large diffs are not rendered by default.

27 changes: 9 additions & 18 deletions docs-site/i18n/zh-CN/docusaurus-theme-classic/footer.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
{
"link.title.Docs": {"message": "文档"},
"link.title.Features": {"message": "功能"},
"link.title.More": {"message": "更多"},
"link.title.Community": {"message": "社区"},
"link.title.Sponsors": {"message": "赞助商"},
"link.title.Documentation": {"message": "文档"},
"link.title.Operations": {"message": "运维"},
"link.title.Project": {"message": "项目"},
"link.item.label.Introduction": {"message": "简介"},
"link.item.label.Quick Start": {"message": "快速开始"},
"link.item.label.Upgrade & Recovery": {"message": "升级与恢复"},
"link.item.label.SAP HANA": {"message": "SAP HANA"},
"link.item.label.Multi-Node Cluster": {"message": "多节点集群"},
"link.item.label.API Reference": {"message": "API 参考"},
"link.item.label.Configuration": {"message": "配置"},
"link.item.label.Monitoring": {"message": "监控"},
"link.item.label.Security": {"message": "安全"},
"link.item.label.Troubleshooting": {"message": "故障排查"},
"link.item.label.GitHub": {"message": "GitHub"},
"link.item.label.Releases": {"message": "Releases"},
"link.item.label.Docker Hub": {"message": "Docker Hub"},
"link.item.label.Issues": {"message": "Issues"},
"link.item.label.Contributors": {"message": "贡献者"},
"link.item.label.Pull Requests": {"message": "Pull Requests"},
"link.item.label.Sponsor": {"message": "赞助"},
"link.item.label.Sponsor BackupX": {"message": "赞助 BackupX"},
"link.item.label.Partnership": {"message": "合作伙伴"},
"link.item.label.Sponsor tiers": {"message": "赞助层级"}
"link.item.label.Releases": {"message": "发布版本"},
"link.item.label.Community": {"message": "社区"}
}
26 changes: 6 additions & 20 deletions docs-site/i18n/zh-CN/docusaurus-theme-classic/navbar.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,8 @@
{
"item.label.Docs": {
"message": "文档",
"description": "Navbar item: Docs"
},
"item.label.Downloads": {
"message": "下载",
"description": "Navbar item: Downloads"
},
"item.label.Community": {
"message": "社区",
"description": "Navbar item: Community"
},
"item.label.Sponsors": {
"message": "赞助商",
"description": "Navbar item: Sponsors"
},
"item.label.GitHub": {
"message": "GitHub",
"description": "Navbar item: GitHub"
}
"item.label.Docs": {"message": "文档"},
"item.label.Deployment": {"message": "部署"},
"item.label.Operations": {"message": "运维"},
"item.label.API": {"message": "API"},
"item.label.Community": {"message": "社区"},
"item.label.GitHub": {"message": "GitHub"}
}
172 changes: 172 additions & 0 deletions docs-site/src/components/DocIcon/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,172 @@
import type {ReactNode} from 'react';

export type DocIconName =
| 'arrowRight'
| 'bookOpen'
| 'box'
| 'check'
| 'clock'
| 'cloud'
| 'database'
| 'download'
| 'external'
| 'github'
| 'heart'
| 'monitor'
| 'network'
| 'restore'
| 'server'
| 'shield'
| 'storage'
| 'terminal'
| 'users'
| 'wrench';

type DocIconProps = {
name: DocIconName;
size?: number;
className?: string;
};

const ICON_PATHS: Record<Exclude<DocIconName, 'github'>, ReactNode> = {
arrowRight: (
<>
<path d="M5 12h14" />
<path d="m13 6 6 6-6 6" />
</>
),
bookOpen: (
<>
<path d="M3 5.5A3.5 3.5 0 0 1 6.5 2H11v17H6.5A3.5 3.5 0 0 0 3 22Z" />
<path d="M21 5.5A3.5 3.5 0 0 0 17.5 2H13v17h4.5A3.5 3.5 0 0 1 21 22Z" />
</>
),
box: (
<>
<path d="m12 3 8 4.5v9L12 21l-8-4.5v-9Z" />
<path d="m4.4 7.7 7.6 4.4 7.6-4.4" />
<path d="M12 12.1V21" />
</>
),
check: <path d="m5 12 4 4L19 6" />,
clock: (
<>
<circle cx="12" cy="12" r="9" />
<path d="M12 7v5l3 2" />
</>
),
cloud: <path d="M17.5 19H7a5 5 0 0 1-.6-9.96A6.5 6.5 0 0 1 18.7 8.2 5.5 5.5 0 0 1 17.5 19Z" />,
database: (
<>
<ellipse cx="12" cy="5" rx="8" ry="3" />
<path d="M4 5v6c0 1.7 3.6 3 8 3s8-1.3 8-3V5" />
<path d="M4 11v6c0 1.7 3.6 3 8 3s8-1.3 8-3v-6" />
</>
),
download: (
<>
<path d="M12 3v12" />
<path d="m7 10 5 5 5-5" />
<path d="M4 20h16" />
</>
),
external: (
<>
<path d="M14 4h6v6" />
<path d="m20 4-9 9" />
<path d="M19 13v6a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V6a1 1 0 0 1 1-1h6" />
</>
),
heart: <path d="M20.8 4.6a5.5 5.5 0 0 0-7.8 0L12 5.7l-1.1-1.1a5.5 5.5 0 0 0-7.8 7.8l1.1 1.1L12 21l7.8-7.5 1.1-1.1a5.5 5.5 0 0 0-.1-7.8Z" />,
monitor: (
<>
<rect x="3" y="4" width="18" height="13" rx="1" />
<path d="M8 21h8" />
<path d="M12 17v4" />
</>
),
network: (
<>
<rect x="9" y="3" width="6" height="5" rx="1" />
<rect x="3" y="16" width="6" height="5" rx="1" />
<rect x="15" y="16" width="6" height="5" rx="1" />
<path d="M12 8v4M6 16v-4h12v4" />
</>
),
restore: (
<>
<path d="M4 7v5h5" />
<path d="M5.6 17a8 8 0 1 0 .4-10L4 9" />
<path d="M12 8v4l3 2" />
</>
),
server: (
<>
<rect x="3" y="4" width="18" height="6" rx="1" />
<rect x="3" y="14" width="18" height="6" rx="1" />
<path d="M7 7h.01M7 17h.01M11 7h7M11 17h7" />
</>
),
shield: (
<>
<path d="M12 3 20 6v6c0 5-3.3 8.2-8 9-4.7-.8-8-4-8-9V6Z" />
<path d="m8.5 12 2.2 2.2 4.8-5" />
</>
),
storage: (
<>
<path d="M4 6h16v12H4z" />
<path d="M8 10h8M8 14h5" />
</>
),
terminal: (
<>
<rect x="3" y="4" width="18" height="16" rx="1" />
<path d="m7 9 3 3-3 3M13 15h4" />
</>
),
users: (
<>
<circle cx="9" cy="8" r="3" />
<path d="M3 20a6 6 0 0 1 12 0" />
<path d="M16 5.2a3 3 0 0 1 0 5.6M17 14a5 5 0 0 1 4 4.9" />
</>
),
wrench: (
<>
<path d="M14.7 6.3a4 4 0 0 0-5-5L12 3.6 8.4 7.2 6.1 4.9a4 4 0 0 0 5 5L19 17.8a1.6 1.6 0 0 1-2.2 2.2l-7.9-7.9" />
</>
),
};

export default function DocIcon({name, size = 20, className}: DocIconProps): ReactNode {
if (name === 'github') {
return (
<svg
aria-hidden="true"
className={className}
width={size}
height={size}
viewBox="0 0 24 24"
fill="currentColor">
<path d="M12 2C6.48 2 2 6.59 2 12.25c0 4.53 2.87 8.37 6.84 9.73.5.1.68-.22.68-.49v-1.92c-2.78.62-3.37-1.21-3.37-1.21-.45-1.18-1.11-1.49-1.11-1.49-.91-.64.07-.63.07-.63 1 .08 1.53 1.06 1.53 1.06.89 1.57 2.34 1.11 2.91.85.09-.67.35-1.11.63-1.37-2.22-.26-4.56-1.14-4.56-5.07 0-1.12.39-2.03 1.03-2.75-.1-.26-.45-1.3.1-2.71 0 0 .84-.28 2.75 1.05A9.3 9.3 0 0 1 12 6.95a9.3 9.3 0 0 1 2.5.35c1.91-1.33 2.75-1.05 2.75-1.05.55 1.41.2 2.45.1 2.71.64.72 1.03 1.63 1.03 2.75 0 3.94-2.34 4.8-4.57 5.06.36.32.68.94.68 1.9v2.82c0 .27.18.59.69.49A10.27 10.27 0 0 0 22 12.25C22 6.59 17.52 2 12 2Z" />
</svg>
);
}

return (
<svg
aria-hidden="true"
className={className}
width={size}
height={size}
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
strokeWidth="1.6"
strokeLinecap="round"
strokeLinejoin="round">
{ICON_PATHS[name]}
</svg>
);
}
Loading
Loading