Skip to content

armgit / dbx

Public Imported from GitHub
0

25 MB lightweight cross-platform database client for 100+ databases, including MySQL, PostgreSQL, SQLite, Redis, MongoDB, DuckDB, SQL Server, and Dameng. Built-in AI, MCP Server, CLI, desktop and Docker. | 轻量级跨平台数据库管理工具,支持 MySQL、PostgreSQL、SQLite、Redis、MongoDB、达梦等 100+ 数据库,提供桌面端、Docker、CLI、内置 AI 助手和 MCP。

feat(docs): extract shared nav, enhance landing background, add community page

t8y24a4ac570a214
diff --git a/docs/app/[lang]/changelog/page.tsx b/docs/app/[lang]/changelog/page.tsx
new file mode 100644
index 0000000000..022f9217f5
--- /dev/null
+++ b/docs/app/[lang]/changelog/page.tsx
@@ -0,0 +1,40 @@
+import { fetchChangelog } from '@/lib/changelog';
+import { LandingNav } from '@/components/landing/LandingNav';
+import { ChangelogList } from '@/components/landing/ChangelogList';
+
+const i18n = {
+ en: {
+ title: 'Changelog',
+ desc: 'Track every release — features, improvements, and fixes.',
+ },
+ cn: {
+ title: '更新日志',
+ desc: '追踪每次发布 — 新功能、改进和修复。',
+ },
+};
+
+export default async function ChangelogPage({ params }: { params: Promise<{ lang: string }> }) {
+ const { lang } = await params;
+ const l = lang === 'cn' ? 'cn' : 'en';
+ const t = i18n[l];
+ const data = await fetchChangelog(l);
+
+ return (
+ <div className="min-h-screen bg-[#0b1120] text-landing-ink">
+ <LandingNav lang={l} active="changelog" />
+
+ <div className="max-w-[860px] mx-auto px-6 pt-32 pb-4">
+ <h1 className="text-4xl font-[820] tracking-tight">{t.title}</h1>
+ <p className="mt-3 text-landing-muted text-lg">{t.desc}</p>
+ </div>
+
+ <div className="max-w-[860px] mx-auto px-6 pb-24">
+ {data.releases.length === 0 ? (
+ <p className="text-landing-muted py-12">No releases found.</p>
+ ) : (
+ <ChangelogList releases={data.releases} lang={l} />
+ )}
+ </div>
+ </div>
+ );
+}
diff --git a/docs/app/[lang]/community/page.tsx b/docs/app/[lang]/community/page.tsx
new file mode 100644
index 0000000000..0644815779
--- /dev/null
+++ b/docs/app/[lang]/community/page.tsx
@@ -0,0 +1,117 @@
+import { LandingNav } from '@/components/landing/LandingNav';
+
+const channels = [
+ {
+ id: 'qq',
+ color: '#EB1923',
+ href: 'https://qm.qq.com/cgi-bin/qm/qr?k=&group_code=1087880322',
+ icon: <img src="/icons/community/qq.png" alt="QQ" width={24} height={24} />,
+ },
+ {
+ id: 'wechat',
+ color: '#07C160',
+ href: 'https://docs.qq.com/doc/DVVhMY0h1ekJqc0tz',
+ icon: (
+ <svg width={24} height={24} viewBox="0 0 24 24" fill="currentColor">
+ <path d="M9.5 4C5.36 4 2 6.69 2 10c0 1.89 1.08 3.56 2.78 4.66l-.7 2.1 2.46-1.23c.87.27 1.8.42 2.78.42.24 0 .48-.01.71-.03A5.93 5.93 0 0110 14c0-3.31 3.13-6 7-6 .34 0 .67.03 1 .07C17.27 5.56 13.72 4 9.5 4zm-3 4.5a1 1 0 110-2 1 1 0 010 2zm5 0a1 1 0 110-2 1 1 0 010 2zM22 14c0-2.76-2.69-5-6-5s-6 2.24-6 5 2.69 5 6 5c.73 0 1.43-.11 2.09-.3l1.72.86-.49-1.46C20.94 17.07 22 15.64 22 14zm-7.5-.5a.75.75 0 110-1.5.75.75 0 010 1.5zm4 0a.75.75 0 110-1.5.75.75 0 010 1.5z" />
+ </svg>
+ ),
+ },
+ {
+ id: 'discord',
+ color: '#5865F2',
+ href: 'https://discord.gg/W7NyVDRt6a',
+ icon: (
+ <svg width={24} height={24} viewBox="0 0 24 24" fill="currentColor">
+ <path d="M20.317 4.37a19.791 19.791 0 00-4.885-1.515.074.074 0 00-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 00-5.487 0 12.64 12.64 0 00-.617-1.25.077.077 0 00-.079-.037A19.736 19.736 0 003.677 4.37a.07.07 0 00-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 00.031.057 19.9 19.9 0 005.993 3.03.078.078 0 00.084-.028c.462-.63.874-1.295 1.226-1.994a.076.076 0 00-.041-.106 13.107 13.107 0 01-1.872-.892.077.077 0 01-.008-.128 10.2 10.2 0 00.372-.292.074.074 0 01.077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 01.078.01c.12.098.246.198.373.292a.077.077 0 01-.006.127 12.299 12.299 0 01-1.873.892.077.077 0 00-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 00.084.028 19.839 19.839 0 006.002-3.03.077.077 0 00.032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 00-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.095 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z" />
+ </svg>
+ ),
+ },
+ {
+ id: 'github',
+ color: '#f0f0f0',
+ href: 'https://github.com/t8y2/dbx/discussions',
+ icon: (
+ <svg width={24} height={24} viewBox="0 0 24 24" fill="currentColor">
+ <path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" />
+ </svg>
+ ),
+ },
+];
+
+const i18n = {
+ en: {
+ title: 'Community',
+ desc: 'Join the DBX community — ask questions, share feedback, and connect with other users.',
+ discord: { name: 'Discord', desc: 'Real-time chat, Q&A, and feature discussions.' },
+ qq: { name: 'QQ Group', desc: 'Group number: 1087880322' },
+ wechat: { name: 'WeChat Group', desc: 'Join via Tencent Docs invite link.' },
+ github: { name: 'GitHub Discussions', desc: 'Bug reports, feature requests, and long-form discussions.' },
+ },
+ cn: {
+ title: '交流群',
+ desc: '加入 DBX 社区 — 提问、反馈、与其他用户交流。',
+ discord: { name: 'Discord', desc: '实时聊天、问答和功能讨论。' },
+ qq: { name: 'QQ 群', desc: '群号:1087880322' },
+ wechat: { name: '微信群', desc: '通过腾讯文档链接加入。' },
+ github: { name: 'GitHub Discussions', desc: 'Bug 反馈、功能建议和深度讨论。' },
+ },
+};
+
+export default async function CommunityPage({ params }: { params: Promise<{ lang: string }> }) {
+ const { lang } = await params;
+ const l = lang === 'cn' ? 'cn' : 'en';
+ const t = i18n[l];
+
+ return (
+ <div className="min-h-screen bg-[#0b1120] text-landing-ink">
+ <LandingNav lang={l} active="community" />
+
+ <div className="max-w-[860px] mx-auto px-6 pt-32 pb-4">
+ <h1 className="text-4xl font-[820] tracking-tight">{t.title}</h1>
+ <p className="mt-3 text-landing-muted text-lg">{t.desc}</p>
+ </div>
+
+ <div className="max-w-[860px] mx-auto px-6 pb-24">
+ <div className="grid gap-4 mt-8">
+ {channels.map((ch) => {
+ const meta = t[ch.id as keyof typeof t] as { name: string; desc: string };
+ return (
+ <a
+ key={ch.id}
+ href={ch.href}
+ target="_blank"
+ rel="noopener noreferrer"
+ className="group flex items-center gap-5 rounded-xl border border-landing-line bg-landing-panel px-6 py-5 transition-colors hover:border-[rgba(155,176,205,0.32)]"
+ >
+ <span
+ className="grid place-items-center w-11 h-11 rounded-lg shrink-0"
+ style={{ backgroundColor: `${ch.color}18`, color: ch.color }}
+ >
+ {ch.icon}
+ </span>
+ <span className="grid gap-0.5 min-w-0">
+ <strong className="text-[15px] font-[700] leading-snug">{meta.name}</strong>
+ <span className="text-landing-muted text-[13px] leading-relaxed">{meta.desc}</span>
+ </span>
+ <svg
+ className="ml-auto shrink-0 text-landing-muted opacity-0 -translate-x-1 transition-all group-hover:opacity-100 group-hover:translate-x-0"
+ width={16}
+ height={16}
+ viewBox="0 0 24 24"
+ fill="none"
+ stroke="currentColor"
+ strokeWidth={2}
+ strokeLinecap="round"
+ strokeLinejoin="round"
+ >
+ <path d="M5 12h14M12 5l7 7-7 7" />
+ </svg>
+ </a>
+ );
+ })}
+ </div>
+ </div>
+ </div>
+ );
+}
diff --git a/docs/app/[lang]/page.tsx b/docs/app/[lang]/page.tsx
index 8e0c27b6b2..872db00223 100644
--- a/docs/app/[lang]/page.tsx
+++ b/docs/app/[lang]/page.tsx
@@ -346,11 +346,7 @@ const testimonials = {
const i18nText = {
en: {
- navDocs: 'Docs',
- navChangelog: 'Changelog',
- navCommunity: 'Community',
- lang: '中文',
- heroTitle: 'A focused database client for daily work',
+ heroTitle: '15 MB to manage 35+ databases!',
heroSubtitle:
'DBX brings connections, SQL editing, data grids, schema tools, AI assistance, and self-hosted access into one lightweight product.',
download: 'Download DBX',
@@ -372,11 +368,7 @@ const i18nText = {
docker: 'Docker setup',
},
cn: {
- navDocs: '文档',
- navChangelog: '更新日志',
- navCommunity: '社区',
- lang: 'English',
- heroTitle: '专注日常工作的数据库客户端',
+ heroTitle: '15MB,管理35+种数据库!',
heroSubtitle: 'DBX 将连接管理、SQL 编辑、数据表格、结构工具、AI 助手和自托管访问放进一个轻量产品里。',
download: '下载 DBX',
downloadName: '下载 DBX',
@@ -416,38 +408,17 @@ export default async function LandingPage({
return (
<main className="landing">
{/* Nav */}
- <LandingNav>
- <div className="flex items-center justify-between max-w-[1180px] h-16 mx-auto px-7 max-[760px]:min-h-[58px] max-[760px]:h-auto max-[760px]:px-[18px] max-[760px]:py-2.5">
- <Link href={`/${l}`} className="flex items-center gap-2.5 text-landing-ink text-lg font-extrabold">
- <img src="/logo.png" alt="DBX" width={28} height={28} className="rounded-[7px]" />
- <span>DBX</span>
- </Link>
- <div className="flex items-center gap-1">
- <Link href={`/${l}/docs/what-is-dbx`} target="_blank" className="landing-nav-link rounded-[7px] px-[11px] py-2 text-landing-muted text-[13px] font-medium max-[760px]:hidden">
- {t.navDocs}
- </Link>
- <Link href={`/${l}/docs/changelog`} target="_blank" className="landing-nav-link rounded-[7px] px-[11px] py-2 text-landing-muted text-[13px] font-medium max-[760px]:hidden">
- {t.navChangelog}
- </Link>
- <Link href="https://github.com/t8y2/dbx" target="_blank" className="landing-nav-link rounded-[7px] px-[11px] py-2 text-landing-muted text-[13px] font-medium max-[760px]:hidden">
- GitHub
- </Link>
- <Link href={l === 'cn' ? '/en' : '/cn'} className="landing-nav-link rounded-[7px] px-[11px] py-2 text-landing-muted text-[13px] font-medium ml-1.5 border border-landing-line">
- {t.lang}
- </Link>
- </div>
- </div>
- </LandingNav>
+ <LandingNav lang={l} active="home" />
{/* Hero */}
<section className="landing-hero">
<Spotlight />
<div className="relative z-[1] max-w-[1180px] mx-auto px-7 max-[1040px]:max-w-[920px] max-[760px]:px-[18px]">
<div className="landing-hero-copy relative z-[6] grid justify-items-center max-w-[900px] mx-auto text-center max-[1040px]:max-w-[760px]">
- <h1 className="m-0 text-[clamp(36px,4.2vw,56px)] font-[820] leading-[1.06] text-landing-ink whitespace-nowrap max-[760px]:text-[clamp(26px,7vw,38px)]">
+ <h1 className="min-w-0 m-0 text-[clamp(36px,4.2vw,56px)] font-[820] leading-[1.06] text-landing-ink whitespace-nowrap max-[760px]:text-[clamp(26px,7vw,38px)]">
{t.heroTitle}
</h1>
- <p className="landing-hero-subtitle mt-5 mx-auto text-[17px] font-[460] leading-[1.8] whitespace-nowrap max-[760px]:text-[15px] max-[760px]:leading-[1.68] max-[760px]:whitespace-normal max-[760px]:max-w-[320px]">
+ <p className="landing-hero-subtitle min-w-0 mt-5 mx-auto text-[17px] font-[460] leading-[1.8] whitespace-nowrap max-[760px]:text-[15px] max-[760px]:leading-[1.68] max-[760px]:whitespace-normal max-[760px]:max-w-[320px]">
{t.heroSubtitle}
</p>
<div className="w-full max-w-[520px] mt-10">
@@ -567,7 +538,7 @@ export default async function LandingPage({
</li>
))}
</ul>
- <Link href={`/${l}/docs/changelog`} className="landing-inline-link flex shrink-0 items-center gap-[7px] text-sm font-[650] max-[760px]:mt-4" target="_blank">
+ <Link href={`/${l}/changelog`} className="landing-inline-link flex shrink-0 items-center gap-[7px] text-sm font-[650] max-[760px]:mt-4">
{latest.link}
<ArrowRight size={15} />
</Link>
diff --git a/docs/app/global.css b/docs/app/global.css
index 7853b9e3b9..7fff2a3c3c 100644
--- a/docs/app/global.css
+++ b/docs/app/global.css
@@ -297,8 +297,20 @@ a {
--landing-max: 1180px;
min-height: 100vh;
color: var(--color-landing-ink);
- background: #10151d;
+ background: #0b1120;
overflow: hidden;
+ position: relative;
+}
+
+.landing::after {
+ content: '';
+ position: fixed;
+ inset: 0;
+ z-index: 0;
+ pointer-events: none;
+ opacity: 0.03;
+ background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
+ mix-blend-mode: overlay;
}
.landing a {
@@ -370,7 +382,7 @@ a {
.landing-nav.is-scrolled {
border-bottom-color: var(--color-landing-line);
- background: color-mix(in srgb, #0c1120 62%, transparent);
+ background: color-mix(in srgb, #0c1120 44%, transparent);
}
.landing-nav.is-scrolled::before {
@@ -405,10 +417,10 @@ a {
position: absolute;
inset: 0;
background:
- radial-gradient(ellipse at 50% 34%, rgba(44, 88, 174, 0.42), transparent 46%),
+ radial-gradient(ellipse at 50% 34%, rgba(44, 88, 174, 0.48), transparent 52%),
radial-gradient(ellipse at 18% 16%, rgba(82, 213, 255, 0.13), transparent 34%),
radial-gradient(ellipse at 76% 22%, rgba(68, 209, 157, 0.1), transparent 30%),
- linear-gradient(180deg, #10151d 0%, #0c1528 48%, #10151d 82%, #10151d 100%);
+ linear-gradient(180deg, #0b1120 0%, #0c1528 48%, #0b1120 82%, #0b1120 100%);
z-index: -3;
}
diff --git a/docs/components/landing/LandingNav.tsx b/docs/components/landing/LandingNav.tsx
index 9c70927af3..5f0432ad47 100644
--- a/docs/components/landing/LandingNav.tsx
+++ b/docs/components/landing/LandingNav.tsx
@@ -1,9 +1,28 @@
'use client';
+import Link from 'next/link';
import { useEffect, useRef } from 'react';
-export function LandingNav({ children }: { children: React.ReactNode }) {
+const i18n = {
+ en: { home: 'Home', docs: 'Docs', changelog: 'Changelog', community: 'Community', lang: '中文' },
+ cn: { home: '首页', docs: '文档', changelog: '更新日志', community: '交流群', lang: 'English' },
+};
+
+export function LandingNav({
+ lang,
+ active,
+}: {
+ lang: 'en' | 'cn';
+ active?: 'home' | 'changelog' | 'community';
+}) {
const ref = useRef<HTMLElement>(null);
+ const t = i18n[lang];
+ const otherLang = lang === 'cn' ? 'en' : 'cn';
+ const langHrefMap: Record<string, string> = {
+ changelog: `/${otherLang}/changelog`,
+ community: `/${otherLang}/community`,
+ };
+ const langHref = langHrefMap[active ?? ''] ?? `/${otherLang}`;
useEffect(() => {
const node = ref.current;
@@ -20,7 +39,51 @@ export function LandingNav({ children }: { children: React.ReactNode }) {
return (
<nav ref={ref} className="landing-nav">
- {children}
+ <div className="flex items-center justify-between max-w-[1180px] h-16 mx-auto px-7 max-[760px]:min-h-[58px] max-[760px]:h-auto max-[760px]:px-[18px] max-[760px]:py-2.5">
+ <Link href={`/${lang}`} className="flex items-center gap-2.5 text-landing-ink text-2xl font-[820]">
+ <img src="/logo.png" alt="DBX" width={28} height={28} />
+ <span>DBX</span>
+ </Link>
+ <div className="flex items-center gap-1">
+ <Link
+ href={`/${lang}`}
+ className={`landing-nav-link rounded-[7px] px-[11px] py-2 text-[13px] font-medium max-[760px]:hidden ${active === 'home' ? 'text-landing-ink' : 'text-landing-muted'}`}
+ >
+ {t.home}
+ </Link>
+ <Link
+ href={`/${lang}/docs/what-is-dbx`}
+ className="landing-nav-link rounded-[7px] px-[11px] py-2 text-[13px] font-medium max-[760px]:hidden text-landing-muted"
+ >
+ {t.docs}
+ </Link>
+ <Link
+ href={`/${lang}/changelog`}
+ className={`landing-nav-link rounded-[7px] px-[11px] py-2 text-[13px] font-medium max-[760px]:hidden ${active === 'changelog' ? 'text-landing-ink' : 'text-landing-muted'}`}
+ >
+ {t.changelog}
+ </Link>
+ <Link
+ href={`/${lang}/community`}
+ className={`landing-nav-link rounded-[7px] px-[11px] py-2 text-[13px] font-medium max-[760px]:hidden ${active === 'community' ? 'text-landing-ink' : 'text-landing-muted'}`}
+ >
+ {t.community}
+ </Link>
+ <Link
+ href="https://github.com/t8y2/dbx"
+ target="_blank"
+ className="landing-nav-link rounded-[7px] px-[11px] py-2 text-landing-muted text-[13px] font-medium max-[760px]:hidden"
+ >
+ GitHub
+ </Link>
+ <Link
+ href={langHref}
+ className="landing-nav-link rounded-[7px] px-[11px] py-2 text-landing-muted text-[13px] font-medium ml-1.5 border border-landing-line"
+ >
+ {t.lang}
+ </Link>
+ </div>
+ </div>
</nav>
);
}
diff --git a/docs/public/icons/community/qq.png b/docs/public/icons/community/qq.png
new file mode 100644
index 0000000000..f87b2ac9ee
Binary files /dev/null and b/docs/public/icons/community/qq.png differ