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 4a5f356  [Feature]: Add download page. (#71)
4a5f356 is described below

commit 4a5f356fe8037d474dca6fc95aa561ff9164afc8
Author: songjianet <[email protected]>
AuthorDate: Tue Mar 8 18:53:10 2022 +0800

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

diff --git a/docusaurus.config.js b/docusaurus.config.js
index 6e17296..c591baa 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -85,9 +85,10 @@ const config = {
                     ]
                 },
                 {
-                    to: 'https://github.com/InterestingLab/seatunnel/releases',
+                    to: '/download',
                     position: 'right',
-                    label: 'Download'
+                    label: 'Download',
+                    activeBaseRegex: `/download`,
                 },
                 {
                     label: 'Community',
diff --git a/src/pages/download/data.js b/src/pages/download/data.js
new file mode 100644
index 0000000..fe1ed98
--- /dev/null
+++ b/src/pages/download/data.js
@@ -0,0 +1,11 @@
+const data = [
+       // {
+       //      "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";
+       // }
+]
+
+export default data
diff --git a/src/pages/download/index.jsx b/src/pages/download/index.jsx
new file mode 100644
index 0000000..6571831
--- /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.js'
+
+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