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

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


The following commit(s) were added to refs/heads/main by this push:
     new 527a56b  modify: download page. (#290)
527a56b is described below

commit 527a56b7b32da54ef2f16bae7228972ac57defe8
Author: YuI <[email protected]>
AuthorDate: Thu Sep 23 11:44:49 2021 +0800

    modify: download page. (#290)
    
    * add: wechat and qq's QR Code
    
    * fix: the markdownline error
    
    * fix: the markdownline error
    
    * modift: Download button change into Github
    
    * modift: Download markdown file name.
    
    * add: new download page.
    
    * modify: contributors add dashboard and website's developer.
    
    * modify: download page.
    
    Co-authored-by: 艺铭 <[email protected]>
---
 docusaurus.config.js                      | 23 ++++++++++-
 src/pages/download/VersionCard.tsx        | 63 +++++++++++++++++++++++++++++++
 src/pages/download/index.tsx              |  4 +-
 src/pages/download/versionCard.module.css | 20 ++++++++++
 src/theme/IconLanguage/index.tsx          |  2 +-
 5 files changed, 107 insertions(+), 5 deletions(-)

diff --git a/docusaurus.config.js b/docusaurus.config.js
index 6a815fa..e91c6c3 100755
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -33,8 +33,27 @@ module.exports = {
         description: "High-performance, multi-protocol, extensible, responsive 
API Gateway",
         githubRepo: "apache/incubator-shenyu",
         version: "2.4.0",
-        releaseDate: "2021-08-08",
-        url: "https://dlcdn.apache.org/incubator/shenyu/2.4.0/";
+        releaseDate: "Aug 8, 2021",
+        content: [
+          {
+            name: "Source Codes",
+            zip: 
"https://www.apache.org/dyn/closer.lua/incubator/shenyu/2.4.0/apache-shenyu-incubating-2.4.0-src.zip";,
+            asc: 
"https://downloads.apache.org/incubator/shenyu/2.4.0/apache-shenyu-incubating-2.4.0-src.zip.asc";,
+            sha512: 
"https://downloads.apache.org/incubator/shenyu/2.4.0/apache-shenyu-incubating-2.4.0-src.zip.sha512";
+          },
+          {
+            name: "ShenYu-Admin Binary Distribution",
+            tar: 
"https://www.apache.org/dyn/closer.lua/incubator/shenyu/2.4.0/apache-shenyu-incubating-2.4.0-admin-bin.tar.gz";,
+            asc: 
"https://downloads.apache.org/incubator/shenyu/2.4.0/apache-shenyu-incubating-2.4.0-admin-bin.tar.gz.asc";,
+            sha512: 
"https://downloads.apache.org/incubator/shenyu/2.4.0/apache-shenyu-incubating-2.4.0-admin-bin.tar.gz.sha512";
+          },
+          {
+            name: "ShenYu-Dashboard Binary Distribution",
+            tar: 
"https://www.apache.org/dyn/closer.lua/incubator/shenyu/2.4.0/apache-shenyu-incubating-2.4.0-bootstrap-bin.tar.gz";,
+            asc: 
"https://downloads.apache.org/incubator/shenyu/2.4.0/apache-shenyu-incubating-2.4.0-bootstrap-bin.tar.gz.asc";,
+            sha512: 
"https://downloads.apache.org/incubator/shenyu/2.4.0/apache-shenyu-incubating-2.4.0-bootstrap-bin.tar.gz.sha512";
+          }
+        ]
       }
     ],
   },
diff --git a/src/pages/download/VersionCard.tsx 
b/src/pages/download/VersionCard.tsx
new file mode 100644
index 0000000..9fff012
--- /dev/null
+++ b/src/pages/download/VersionCard.tsx
@@ -0,0 +1,63 @@
+import React from 'react';
+import styles from './versionCard.module.css';
+
+interface VersionCardProps {
+    name?: string;
+    description?: string;
+    githubRepo?: string;
+    version?: string;
+    releaseDate?: string;
+    content?: Array<ContentAttribute>;
+}
+
+interface ContentAttribute {
+    name: string;
+    zip?: string;
+    tar?: string;
+    asc: string;
+    sha512: string;
+}
+
+const VersionCard: React.FC<VersionCardProps> = ({ ...props }) => {
+
+    return (
+        <div className={styles.main}>
+            <div>
+                <span
+                    className={styles.name}>{props.name} - Version: 
{props.version} ( Release Date: {props.releaseDate} )
+                </span>
+            </div>
+            <ul className={styles.downloadDetail}>
+                {
+                    props.content.map((value) => {
+                        return (
+                            <li key={value.name}>
+                             <span>
+                                {value.name} :
+                            </span>
+                            {value.zip &&
+                                <a href={value.zip}>
+                                    ZIP
+                                </a>
+                            }
+                            {value.tar &&
+                                <a href={value.tar}>
+                                    TAR
+                                </a>
+                            }
+                            <a href={value.asc}>
+                                ASC
+                            </a>
+                            <a href={value.sha512}>
+                                SHA512
+                            </a>
+                            </li>
+                        );
+                    })
+                }
+            </ul>
+        </div>
+    );
+};
+
+export default VersionCard;
diff --git a/src/pages/download/index.tsx b/src/pages/download/index.tsx
index 3a96abd..26a7501 100644
--- a/src/pages/download/index.tsx
+++ b/src/pages/download/index.tsx
@@ -4,7 +4,7 @@ import CodeBlock from '@theme/CodeBlock';
 import Translate, { translate } from '@docusaurus/Translate';
 import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
 import styles from './index.module.css';
-import DownloadCard from './DownloadCard';
+import VersionCard from './VersionCard';
 
 const Download: React.FC = () => {
 
@@ -15,7 +15,7 @@ const Download: React.FC = () => {
     }
 
     const projects = siteConfig.customFields.downloads.map((project) => {
-        return <DownloadCard key={project.name} {...project} />;
+        return <VersionCard key={project.name} {...project} />;
     });
 
     return (
diff --git a/src/pages/download/versionCard.module.css 
b/src/pages/download/versionCard.module.css
new file mode 100644
index 0000000..e768c75
--- /dev/null
+++ b/src/pages/download/versionCard.module.css
@@ -0,0 +1,20 @@
+.main {
+    width: 100%;
+}
+
+.name {
+    font-size: 20px;
+}
+
+.downloadDetail {
+    margin-top: 8px;
+    font-size: 16px;
+}
+
+.downloadDetail li {
+    margin-bottom: 4px;
+}
+
+.downloadDetail li a {
+    margin-left: 8px;
+}
diff --git a/src/theme/IconLanguage/index.tsx b/src/theme/IconLanguage/index.tsx
index 82cbd6c..1c38a39 100644
--- a/src/theme/IconLanguage/index.tsx
+++ b/src/theme/IconLanguage/index.tsx
@@ -9,7 +9,7 @@ const IconLanguage = ({
   debugger
   return (
     <svg t="1631348384596"
-      class="icon" viewBox="0 0 1024 1024"
+      className="icon" viewBox="0 0 1024 1024"
       version="1.1"
       {...props}
       p-id="557" width="20" height="20">

Reply via email to