diff --git a/docusaurus.config.js b/docusaurus.config.js index 86eaf22206c49..995d8677e0bdb 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -350,7 +350,7 @@ const config = { position: 'right', dropdownItemsAfter: [ { - label: 'Archived Docs', + label: 'Archived', to: `/archive-docs`, }, ], diff --git a/i18n/zh-CN/code.json b/i18n/zh-CN/code.json index ef219741afff3..1a36ec3952bf1 100644 --- a/i18n/zh-CN/code.json +++ b/i18n/zh-CN/code.json @@ -50,5 +50,17 @@ "archive.preview.date": { "message": "归档日期:{date}", "description": "Archive date" + }, + "archive-tips-1": { + "message":"本页将归档 Apache Doris 暂停维护版本的所有文档,并提供 PDF 格式供用户下载。", + "description": "Archive tips" + }, + "archive-tips-2": { + "message":"请注意,归档文档将不再进行任何更新,建议用户使用最新版本。", + "description": "Archive tips" + }, + "archive-download-text":{ + "message":"下载 PDF", + "description":"archive download text" } } \ No newline at end of file diff --git a/src/pages/archive-docs/index.scss b/src/pages/archive-docs/index.scss index 81af83463fb88..d6aadb2a7ee12 100644 --- a/src/pages/archive-docs/index.scss +++ b/src/pages/archive-docs/index.scss @@ -1,7 +1,7 @@ .archive-container { padding: 0 1rem; width: 100%; - margin: 0 auto 5.5rem auto; + margin-bottom: 5.5rem; .archive-admonition { padding: 2rem; margin-top: 1.25rem; @@ -20,6 +20,7 @@ font-weight: 700; line-height: 45px; margin-top: 2.875rem; + margin-bottom: 1.5rem; } h2 { padding-top: 1.25rem; @@ -35,15 +36,48 @@ color: rgb(85, 95, 115); } + .preview-item-content { + display: flex; + justify-content: space-between; + border-bottom: 1px solid #d6dfe6; + } + + .preview-link { + display: flex; + align-items: center; + } + + .preview-link > svg { + margin-left: 8px; + } + + .preview-link:hover { + cursor: pointer; + } + .download-link:hover { text-decoration: underline; color: #444fd9; } + + .archive-tips-content { + margin-bottom: 1.5rem; + } + + .preview-item-version { + font-size: 1.125rem; + font-weight: 600; + } + .preview-link { + font-size: 1.125rem; + font-weight: 600; + } } @media (min-width: 1280px) { .archive-container { - max-width: 1280px; + margin: 0 0 5.5rem 5rem; + width: 834px; .archive-admonition { max-width: 75%; } diff --git a/src/pages/archive-docs/index.tsx b/src/pages/archive-docs/index.tsx index 8badee98bec7f..2b8d440e615c6 100644 --- a/src/pages/archive-docs/index.tsx +++ b/src/pages/archive-docs/index.tsx @@ -1,7 +1,9 @@ import React, { useState, useEffect } from 'react'; import Layout from '@site/src/theme/Layout'; import Link from '@docusaurus/Link'; +import { Divider } from 'antd'; import Translate, { translate } from '@docusaurus/Translate'; +import PdfIcon from '@site/static/images/toc-icon/pdf.svg'; import './index.scss'; const PREVIEW_LINK_ZH = 'https://cdn.selectdb.com/static/doris_1_2_2_18e810982b.pdf'; @@ -11,6 +13,17 @@ const DATE_LINK = '2025-01-17'; export default function Archive() { const [isZH, setIsZH] = useState(false); + const handleMouseEnter = (id: string) => { + const dom = document.getElementById(id); + dom!.style.color = '#444FD9'; + dom!.firstChild!.style.fill = '#444FD9'; + }; + + const handleMouseLeave = (id: string) => { + const dom = document.getElementById(id); + dom!.style.color = '#7F7F83'; + dom!.firstChild!.style.fill = '#7F7F83'; + }; useEffect(() => { if (typeof window !== 'undefined') { @@ -24,15 +37,15 @@ export default function Archive() { message: 'Apache Doris - Archive Document Center', })} description={translate({ - id:'archive.layout.description', - message:'Collection of Apache doris archive documents' + id: 'archive.layout.description', + message: 'Collection of Apache doris archive documents', })} >

Archived Docs

-
+ {/*

The older releases are provided for archival purposes only, and are no longer receives @@ -58,8 +71,8 @@ export default function Archive() { {'For up-to-date documentation,please see the {stableLink} or {latestLink}'}

-
-

+

*/} + {/*

Version:1.2

+ */} +

+ + This page archives all documents of Apache Doris's discontinued maintenance versions and + provides PDF format for users to download. + +
+
+ + Please note that archived documents no longer receive updates; therefore, Doris encourages you + to use the latest version. + +

+
+
Apache Doris v1.2
+ +
handleMouseEnter('toc-icon-pdf')} + onMouseLeave={() => handleMouseLeave('toc-icon-pdf')} + > + + Download PDF +
+ +
);