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

dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong-website.git


The following commit(s) were added to refs/heads/master by this push:
     new bbe4373  [INLONG-1833] Add team tab to the official website and add a 
team page (#226)
bbe4373 is described below

commit bbe4373edb340e3f4bcf949fb45314a344eb4b13
Author: bluewang <[email protected]>
AuthorDate: Mon Dec 13 15:54:29 2021 +0800

    [INLONG-1833] Add team tab to the official website and add a team page 
(#226)
---
 docusaurus.config.js                            |   5 +
 i18n/zh-CN/docusaurus-theme-classic/navbar.json |   4 +
 package.json                                    |   2 +
 src/pages/team/config.json                      |  22 +++
 src/pages/team/index.js                         | 196 ++++++++++++++++++++++++
 src/pages/team/index.less                       |  38 +++++
 6 files changed, 267 insertions(+)

diff --git a/docusaurus.config.js b/docusaurus.config.js
index 810f86c..140df27 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -119,6 +119,11 @@ const darkCodeTheme = 
require('prism-react-renderer/themes/dracula');
             position: 'right'
           },
           {
+            to: '/team',
+            label: 'TEAM',
+            position: 'right'
+          },
+          {
             label: 'ASF',
             position: 'right',
             items: [
diff --git a/i18n/zh-CN/docusaurus-theme-classic/navbar.json 
b/i18n/zh-CN/docusaurus-theme-classic/navbar.json
index cf7b256..763e060 100644
--- a/i18n/zh-CN/docusaurus-theme-classic/navbar.json
+++ b/i18n/zh-CN/docusaurus-theme-classic/navbar.json
@@ -31,6 +31,10 @@
     "message": "用户",
     "description": "Navbar item with label USERS"
   },
+  "item.label.TEAM": {
+    "message": "团队",
+    "description": "Navbar item with label TEAM"
+  },
   "item.label.ASF": {
     "message": "Apache",
     "description": "Navbar item with label ASF"
diff --git a/package.json b/package.json
index fb17145..1effb25 100644
--- a/package.json
+++ b/package.json
@@ -21,6 +21,8 @@
     "@docusaurus/preset-classic": "2.0.0-beta.6",
     "@mdx-js/react": "^1.6.21",
     "@svgr/webpack": "^5.5.0",
+    "acorn": "^8.6.0",
+    "axios": "^0.21.4",
     "clsx": "^1.1.1",
     "file-loader": "^6.2.0",
     "prism-react-renderer": "^1.2.1",
diff --git a/src/pages/team/config.json b/src/pages/team/config.json
new file mode 100644
index 0000000..e75571f
--- /dev/null
+++ b/src/pages/team/config.json
@@ -0,0 +1,22 @@
+{
+  "zh-CN": {
+    "synopsis": [
+      "InLong 团队由成员和贡献者组成。 成员可以直接访问 InLong 项目的源代码并积极改进代码库。",
+      "贡献者通过向成员提交补丁和建议来改进项目。 该项目的贡献者数量不限。 非常感谢对 InLong 的所有贡献,",
+      "无论是微不足道的清理、重大的新功能还是其他物质奖励。 更多详情请看这里。"
+    ],
+    "members": "成员包括项目管理会成员和委员。这个名单是按字母顺序排列的。",
+    "code_contributors": "代码贡献者:",
+    "doc_contributors": "文档贡献者:"
+  },
+  "en": {
+    "synopsis": [
+      "The InLong team is composed of members and contributors. Members can 
directly access the source code of the InLong project and actively improve the 
code base.",
+      "Contributors improve the project by submitting patches and suggestions 
to members. The number of contributors to the project is unlimited. Thank you 
very much for all",
+      "contributions to InLong, Whether it's trivial cleanup, major new 
features or other material rewards. For more details, please see here."
+    ],
+    "members": "Members include members and committee members of the project 
management committee. This list is arranged in alphabetical order.",
+    "code_contributors": "Code contributors",
+    "doc_contributors": "Document contributors"
+  }
+}
\ No newline at end of file
diff --git a/src/pages/team/index.js b/src/pages/team/index.js
new file mode 100644
index 0000000..0de33ff
--- /dev/null
+++ b/src/pages/team/index.js
@@ -0,0 +1,196 @@
+import React, { useState }  from 'react';
+import useIsBrowser from '@docusaurus/useIsBrowser';
+import useBaseUrl from '@docusaurus/useBaseUrl';
+import config from "../team/config.json";
+import Layout from '@theme/Layout';
+import './index.less';
+import axios from 'axios';
+
+export default function() {
+    const isBrowser = useIsBrowser();
+
+    const [p1Animation, setP1Animation] = useState(false);
+    const [p2Animation, setP2Animation] = useState(false);
+
+    const language = isBrowser && location.pathname.indexOf('/zh-CN/') === 0 ? 
'zh-CN' : 'en';
+    const dataSource = config?.[language];
+
+    let contributors = isBrowser && axios({
+        url: 
'https://api.github.com/repos/apache/incubator-inlong/contributors',
+        method: 'get',
+        params: {
+            per_page: 100
+        }
+    }).then(result => {
+        let data = result.data;
+        var eles = document.getElementById("conID");
+        for(let i of data){
+            var lid = document.createElement("li");
+            lid.className = "mb-2";
+            lid.innerHTML = "<a href='"+i.html_url+"' target='_blank'>" +
+                "<img src='"+i.avatar_url+"'/>" + "<span>"+i.login+"</span>" +
+                "</a>";
+            eles.appendChild(lid);
+        }
+    })
+
+    let doc_contributors = isBrowser &&  axios({
+        url: 
'https://api.github.com/repos/apache/incubator-inlong-website/contributors',
+        method: 'get',
+        params: {
+            per_page: 100
+        }
+    }).then(result => {
+        let data = result.data;
+        var eles = document.getElementById("docID");
+        for(let i of data){
+            var lid = document.createElement("li");
+            lid.className = "mb-2";
+            lid.innerHTML = "<a href='"+i.html_url+"' target='_blank'>" +
+                "<img src='"+i.avatar_url+"'/>" + "<span>"+i.login+"</span>" +
+                "</a>";
+            eles.appendChild(lid);
+        }
+    })
+
+
+    return (
+        <Layout>
+            <div className="team-div"><br/>
+                <h1>InLong Team</h1>
+                <div>
+                    <p>{dataSource.synopsis[0]}</p>
+                    <p>{dataSource.synopsis[1]}</p>
+                    <p>{dataSource.synopsis[2]}</p>
+                </div>
+                <h2>Members</h2>
+                <p>{dataSource.members}</p>
+                <table>
+                    <tbody>
+                        <tr>
+                            <td><b>Apache ID</b></td>
+                            <td><b>GitHub User Name</b></td>
+                            <td><b>Public Name</b></td>
+                        </tr>
+                        <tr>
+                            <td>aloyszhang</td>
+                            <td>aloyszhang</td>
+                            <td>Aloys Zhang</td>
+                        </tr>
+                        <tr>
+                            <td>dockerzhang</td>
+                            <td>dockerzhang</td>
+                            <td>Charles Zhang</td>
+                        </tr>
+                        <tr>
+                            <td>gosonzhang</td>
+                            <td>gosonzhang</td>
+                            <td>Guocheng Zhang</td>
+                        </tr>
+                        <tr>
+                            <td>gxcheng</td>
+                            <td>guangxuCheng</td>
+                            <td>Guangxu Cheng</td>
+                        </tr>
+                        <tr>
+                            <td>jshao</td>
+                            <td>jerryshao</td>
+                            <td>Jerry Shao</td>
+                        </tr>
+                        <tr>
+                            <td>junjie</td>
+                            <td>chenjunjiedada</td>
+                            <td>Junjie Chen</td>
+                        </tr>
+                        <tr>
+                            <td>kaynewu</td>
+                            <td>kaynewu</td>
+                            <td>ZhongBo Wu</td>
+                        </tr>
+                        <tr>
+                            <td>ke4qqq</td>
+                            <td>David</td>
+                            <td>Nalley</td>
+                        </tr>
+                        <tr>
+                            <td>lamberliu</td>
+                            <td>lamberliu</td>
+                            <td>Lamber Liu</td>
+                        </tr>
+                        <tr>
+                            <td>osgooli</td>
+                            <td>lizhiboo</td>
+                            <td>Osgoo Li</td>
+                        </tr>
+                        <tr>
+                            <td>tison</td>
+                            <td>tisonkun</td>
+                            <td>Zili Chen</td>
+                        </tr>
+                        <tr>
+                            <td>xiangli</td>
+                            <td>waterlx</td>
+                            <td>Xiang Li</td>
+                        </tr>
+                        <tr>
+                            <td>yihengw</td>
+                            <td>yiheng</td>
+                            <td>Yiheng Wang</td>
+                        </tr>
+                        <tr>
+                            <td>zakwu</td>
+                            <td>wf123537200</td>
+                            <td>Zak Wu</td>
+                        </tr>
+                    </tbody>
+                </table>
+                <h2>Committer</h2>
+                <table>
+                    <tbody>
+                        <tr>
+                            <td><b>Apache ID</b></td>
+                            <td><b>GitHub User Name</b></td>
+                            <td><b>Public Name</b></td>
+                        </tr>
+                        <tr>
+                            <td>technoboy</td>
+                            <td>technoboy-</td>
+                            <td>Guo Jiwei</td>
+                        </tr>
+                        <tr>
+                            <td>charleli</td>
+                            <td>charlely</td>
+                            <td>Haiji Li</td>
+                        </tr>
+                        <tr>
+                            <td>healchow</td>
+                            <td>healchow</td>
+                            <td>Heal Chow</td>
+                        </tr>
+                        <tr>
+                            <td>yuanbo</td>
+                            <td>yuanboliu</td>
+                            <td>Yuanbo Liu</td>
+                        </tr>
+                        <tr>
+                            <td>alfredlu</td>
+                            <td>TszKitLo40</td>
+                            <td>Zijie Lu</td>
+                        </tr>
+                    </tbody>
+                </table>
+                <h2>Contributors</h2>
+                <p>{dataSource.code_contributors}</p>
+                <div className="contributors-div">
+                    <ul id="conID" className="ul-flex">
+                    </ul>
+                </div>
+                <p>{dataSource.doc_contributors}</p>
+                <div className="contributors-div">
+                    <ul id="docID" className="ul-flex">
+                    </ul>
+                </div>
+            </div>
+        </Layout>
+    );
+}
diff --git a/src/pages/team/index.less b/src/pages/team/index.less
new file mode 100644
index 0000000..317b2cc
--- /dev/null
+++ b/src/pages/team/index.less
@@ -0,0 +1,38 @@
+.team-div {
+  width: 50%;
+  //height: 960px;
+  margin: 0 auto;
+}
+.contributors-div {
+  text-align: left;
+}
+.ul-flex {
+  margin-left: -30px;
+
+  .mb-2 {
+    border: 1px solid lightgray;
+    display: inline-block;
+    list-style-type: none;
+    margin: 0px 8px 8px 0px;
+    padding: 4px 7px;
+    border-radius: 3px;
+    height: 40px;
+
+    a {
+      display: inline-block;
+      margin: 0px 8px 8px 0px;
+    }
+
+    img {
+      width: 1em;
+      height: 1em;
+      border-radius: 50%;
+    }
+
+    span {
+      padding-left: 5px;
+    }
+  }
+
+}
+

Reply via email to