This is an automated email from the ASF dual-hosted git repository.

kirs pushed a commit to branch main
in repository 
https://gitbox.apache.org/repos/asf/incubator-seatunnel-website.git


The following commit(s) were added to refs/heads/main by this push:
     new ca51866  [Feature]: Add download page. (#78)
ca51866 is described below

commit ca5186661e14030642e3aa535aea73ca454c8fe0
Author: songjianet <[email protected]>
AuthorDate: Wed Mar 16 11:39:58 2022 +0800

    [Feature]: Add download page. (#78)
---
 docusaurus.config.js          |  5 ++--
 src/pages/download/data.json  |  9 ++++++++
 src/pages/download/index.jsx  | 53 +++++++++++++++++++++++++++++++++++++++++++
 src/pages/download/index.less | 14 ++++++++++++
 4 files changed, 79 insertions(+), 2 deletions(-)

diff --git a/docusaurus.config.js b/docusaurus.config.js
index a5a97a4..67ee051 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -85,9 +85,10 @@ const config = {
                     ]
                 },
                 {
-                    to: 
'https://github.com/apache/incubator-seatunnel/releases',
+                    to: '/download',
                     position: 'right',
-                    label: 'Download'
+                    label: 'Download',
+                    activeBaseRegex: `/download`,
                 },
                 {
                     label: 'Community',
diff --git a/src/pages/download/data.json b/src/pages/download/data.json
new file mode 100644
index 0000000..0a6ad1a
--- /dev/null
+++ b/src/pages/download/data.json
@@ -0,0 +1,9 @@
+[
+       {
+               "date": "2021-12-28",
+               "version": "v1.5.7",
+               "download": 
"https://github.com/apache/incubator-seatunnel/releases/download/v1.5.7/seatunnel-1.5.7.zip";,
+               "sourceCodeZip": 
"https://github.com/apache/incubator-seatunnel/archive/refs/tags/v1.5.7.zip";,
+               "sourceCodeGz": 
"https://github.com/apache/incubator-seatunnel/archive/refs/tags/v1.5.7.tar.gz";
+       }
+]
diff --git a/src/pages/download/index.jsx b/src/pages/download/index.jsx
new file mode 100644
index 0000000..3f670e3
--- /dev/null
+++ b/src/pages/download/index.jsx
@@ -0,0 +1,53 @@
+import React from 'react';
+import './index.less';
+import Layout from '@theme/Layout';
+import data from './data.json'
+
+export default function () {
+       return (
+               <Layout>
+                       <div className="main">
+                               <div>
+                                       <h1>Download the SeaTunnel(Incubating) 
releases</h1>
+                                       <p>Use the links below to download the 
Apache SeaTunnel(Incubating) from one of our mirrors.</p>
+                                       <p className="tip">Only source code 
releases are official Apache releases: Windows and Linux binary distributions 
are just for end user convenience.</p>
+                                       <h2>SeaTunnel</h2>
+                                       <table className="version-table">
+                                               <thead>
+                                               <tr>
+                                                       <th>Date</th>
+                                                       <th>Version</th>
+                                                       <th>Download</th>
+                                                       <th>Source 
Code(zip)</th>
+                                                       <th>Source 
Code(tar.gz)</th>
+                                               </tr>
+                                               </thead>
+                                               <tbody>
+                                               {
+                                                       data.map(item => {
+                                                               return (
+                                                                       <tr 
key={item.version}>
+                                                                               
<td>{item.date}</td>
+                                                                               
<td>{item.version}</td>
+                                                                               
<td>
+                                                                               
        <a href={item.download}>Incubator-SeaTunnel-{item.version}.zip</a>
+                                                                               
</td>
+                                                                               
<td>
+                                                                               
        <a href={item.sourceCodeZip}>Incubator-SeaTunnel-{item.version}.zip</a>
+                                                                               
</td>
+                                                                               
<td>
+                                                                               
        <a 
href={item.sourceCodeGz}>Incubator-SeaTunnel-{item.version}.tar.gz</a>
+                                                                               
</td>
+                                                                       </tr>
+                                                               )
+                                                       })
+                                               }
+                                               </tbody>
+                                       </table>
+                                       <h2>Historical versions of 
non-Apache</h2>
+                                       <a 
href="https://github.com/apache/incubator-seatunnel/releases";>Historical 
versions</a>
+                               </div>
+                       </div>
+               </Layout>
+       );
+}
diff --git a/src/pages/download/index.less b/src/pages/download/index.less
new file mode 100644
index 0000000..35418d1
--- /dev/null
+++ b/src/pages/download/index.less
@@ -0,0 +1,14 @@
+.main {
+  margin: 30px 0;
+  display: flex;
+  justify-content: center;
+
+  .tip {
+    font-weight: 700;
+    font-size: 16px;
+  }
+
+  .version-table {
+    width: 100%;
+  }
+}

Reply via email to