diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..e69de29b diff --git a/docusaurus.config.js b/docusaurus.config.js index 84f60c10..1a76e350 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -129,7 +129,7 @@ const config = { items: [ { label: 'Downloads', - href: 'https://github.com/IvorySQL/IvorySQL/releases', + to: '/download-page', }, { label: 'Installation', diff --git a/i18n/zh-CN/docusaurus-plugin-content-pages/download-page.mdx b/i18n/zh-CN/docusaurus-plugin-content-pages/download-page.mdx new file mode 100644 index 00000000..c7d81a08 --- /dev/null +++ b/i18n/zh-CN/docusaurus-plugin-content-pages/download-page.mdx @@ -0,0 +1,206 @@ +--- +id: download-page +title: 下载 +--- + +import React, { useState } from 'react'; + +export const DownloadPage = () => { + const [copiedKey, setCopiedKey] = useState(null); + + const copyToClipboard = (text, key) => { + navigator.clipboard.writeText(text).then(() => { + setCopiedKey(key); + setTimeout(() => setCopiedKey(null), 2000); + }); + }; + + const card = { background: '#fff', borderRadius: '12px', border: '1px solid #e5e9f2', boxShadow: '0 2px 12px rgba(15,35,100,0.07)' }; + + /* ── 数据 ── */ + const driverItems = [ + { + key: 'jdbc', + name: 'JDBC 驱动', + version: '9.0', + platform: '全平台', + size: '—', + checksumAlgo: 'MD5', + sha256: 'e3dd1552586cf392cfd8135a7c1fde9e', + url: '/download/hgdb-jdbc-v9.0.jar', + }, + ]; + + const toolItems = [ + { + key: 'assess-x86', + name: 'Assess 迁移工具', + version: '1.0.0', + platform: 'Linux x86_64', + size: '—', + checksumAlgo: 'MD5', + sha256: '8a75568de634f5f6ace18797d0d217d8', + url: 'https://yum.highgo.com/dists/IvorySQL/download/assess-1.0.0-linux.gtk.x86_64.tar.gz', + }, + ]; + + const sectionMeta = { + database: { title: 'IvorySQL 数据库', subtitle: '服务端软件包与发布资产', accentColor: '#2f74ff', + icon: }, + drivers: { title: 'IvorySQL 驱动', subtitle: '用于应用程序连接的客户端驱动', accentColor: '#7D52F4', + icon: }, + tools: { title: '相关工具', subtitle: '迁移与管理实用工具', accentColor: '#0891b2', + icon: }, + }; + + const SectionHeader = ({ id }) => { + const m = sectionMeta[id]; + return ( +
+
+ {m.icon} +
+
+
{m.title}
+
{m.subtitle}
+
+
+ ); + }; + + const DatabaseCard = () => { + const ac = sectionMeta.database.accentColor; + return ( + +
{ e.currentTarget.style.boxShadow = `0 6px 24px ${ac}26`; e.currentTarget.style.transform = 'translateY(-2px)'; }} + onMouseLeave={e => { e.currentTarget.style.boxShadow = '0 2px 12px rgba(15,35,100,0.07)'; e.currentTarget.style.transform = 'translateY(0)'; }}> +
+ +
+
+
+ IvorySQL 软件包 + 最新稳定版 +
+
+ 从 GitHub 下载最新的服务端安装包、源码压缩包及发布资产。 +
+
+ +
+
+ ); + }; + + const DownloadTable = ({ items, accentColor }) => { + const thStyle = { + padding: '10px 16px', + fontSize: '0.78rem', fontWeight: 700, color: '#64748b', + textTransform: 'uppercase', letterSpacing: '0.05em', + textAlign: 'left', whiteSpace: 'nowrap', + }; + + return ( +
+
+
软件包类型
+
软件包大小
+
完整性校验
+
软件包下载
+
+ + {items.map((item, idx) => ( +
+
+
{item.name}
+
+ {item.platform} + v{item.version} +
+
+ +
+ {item.size} +
+ +
+ {item.sha256 ? ( +
+ {item.checksumAlgo || 'SHA256'} + + {item.sha256.slice(0, 12)}… + + +
+ ) : ( + 待填写 + )} +
+ +
+ { e.currentTarget.style.background = `${accentColor}18`; }} + onMouseLeave={e => { e.currentTarget.style.background = `${accentColor}08`; }}> + + 下载 + +
+
+ ))} +
+ ); + }; + + return ( +
+ + {/* ── Hero banner ── */} +
+
+
+

IvorySQL 下载

+

+ 下载 IvorySQL 数据库、驱动程序及支持工具,快速开启兼容 Oracle 的 PostgreSQL 之旅。 +

+
+
+ + {/* ── Database ── */} +
+ + +
+ + {/* ── Drivers ── */} +
+ + +
+ + {/* ── Tools ── */} +
+ + +
+ + {/* ── Contact banner ── */} +
+ + + 需要帮助或有疑问?请联系{' '} + support@ivorysql.org + +
+
+ ); +}; + + diff --git a/src/pages/download-page.mdx b/src/pages/download-page.mdx new file mode 100644 index 00000000..bbbc48c3 --- /dev/null +++ b/src/pages/download-page.mdx @@ -0,0 +1,241 @@ +--- +id: download-page +title: Downloads +--- + +import React, { useState } from 'react'; + +export const DownloadPage = () => { + const [copiedKey, setCopiedKey] = useState(null); + + const copyToClipboard = (text, key) => { + navigator.clipboard.writeText(text).then(() => { + setCopiedKey(key); + setTimeout(() => setCopiedKey(null), 2000); + }); + }; + + const card = { background: '#fff', borderRadius: '12px', border: '1px solid #e5e9f2', boxShadow: '0 2px 12px rgba(15,35,100,0.07)' }; + + /* ── Data ── */ + const driverItems = [ + { + key: 'jdbc', + name: 'JDBC Driver', + version: '9.0', + platform: 'All Platforms', + size: '—', + checksumAlgo: 'MD5', + sha256: 'e3dd1552586cf392cfd8135a7c1fde9e', + url: '/download/hgdb-jdbc-v9.0.jar', + }, + ]; + + const toolItems = [ + { + key: 'assess-x86', + name: 'Assess Migration Tool', + version: '1.0.0', + platform: 'Linux x86_64', + size: '—', + checksumAlgo: 'MD5', + sha256: '8a75568de634f5f6ace18797d0d217d8', + url: 'https://yum.highgo.com/dists/IvorySQL/download/assess-1.0.0-linux.gtk.x86_64.tar.gz', + }, + ]; + + /* ── Section headers ── */ + const sectionMeta = { + database: { title: 'IvorySQL Database', subtitle: 'Server packages and release assets', accentColor: '#2f74ff', + icon: }, + drivers: { title: 'IvorySQL Drivers', subtitle: 'Client drivers for application connectivity', accentColor: '#7D52F4', + icon: }, + tools: { title: 'Related Tools', subtitle: 'Migration and management utilities', accentColor: '#0891b2', + icon: }, + }; + + const SectionHeader = ({ id }) => { + const m = sectionMeta[id]; + return ( +
+
+ {m.icon} +
+
+
{m.title}
+
{m.subtitle}
+
+
+ ); + }; + + /* ── Database card (unchanged) ── */ + const DatabaseCard = () => { + const ac = sectionMeta.database.accentColor; + return ( + +
{ e.currentTarget.style.boxShadow = `0 6px 24px ${ac}26`; e.currentTarget.style.transform = 'translateY(-2px)'; }} + onMouseLeave={e => { e.currentTarget.style.boxShadow = '0 2px 12px rgba(15,35,100,0.07)'; e.currentTarget.style.transform = 'translateY(0)'; }}> +
+ +
+
+
+ IvorySQL Package + Latest Stable +
+
+ Latest server packages, source tarballs, and release assets on GitHub. +
+
+ +
+
+ ); + }; + + /* ── Download table (Drivers / Tools) ── */ + const DownloadTable = ({ items, accentColor }) => { + const thStyle = { + padding: '10px 16px', + fontSize: '0.78rem', fontWeight: 700, color: '#64748b', + textTransform: 'uppercase', letterSpacing: '0.05em', + textAlign: 'left', whiteSpace: 'nowrap', + }; + + return ( +
+ {/* Header */} +
+
软件包类型
+
软件包大小
+
完整性校验
+
软件包下载
+
+ + {/* Rows */} + {items.map((item, idx) => ( +
+ {/* Package type */} +
+
{item.name}
+
+ + {item.platform} + + v{item.version} +
+
+ + {/* Size */} +
+ {item.size} +
+ + {/* Integrity */} +
+ {item.sha256 ? ( +
+ {item.checksumAlgo || 'SHA256'} + + {item.sha256.slice(0, 12)}… + + +
+ ) : ( + pending + )} +
+ + {/* Download */} +
+ { e.currentTarget.style.background = `${accentColor}18`; }} + onMouseLeave={e => { e.currentTarget.style.background = `${accentColor}08`; }} + > + + + + 下载 + +
+
+ ))} +
+ ); + }; + + return ( +
+ + {/* ── Hero banner ── */} +
+
+
+

IvorySQL Downloads

+

+ Download IvorySQL packages, drivers, and tools to get started with Oracle-compatible PostgreSQL. +

+
+
+ + {/* ── Database ── */} +
+ + +
+ + {/* ── Drivers ── */} +
+ + +
+ + {/* ── Tools ── */} +
+ + +
+ + {/* ── Contact banner ── */} +
+ + + Need help or have questions?{' '} + Contact support@ivorysql.org + +
+
+ ); +}; + + diff --git a/static/download/hgdb-jdbc-v9.0.jar b/static/download/hgdb-jdbc-v9.0.jar new file mode 100644 index 00000000..951b10cb Binary files /dev/null and b/static/download/hgdb-jdbc-v9.0.jar differ