You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by ki...@apache.org on 2021/05/12 09:53:23 UTC

[dolphinscheduler-website] branch master updated: add meetup message on the header (#362)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 5d46860  add meetup message on the header (#362)
5d46860 is described below

commit 5d46860e6923b261ce7fd8b7752fa865a09c336e
Author: GaoTianDuo <ga...@cmss.chinamobile.com>
AuthorDate: Wed May 12 17:53:17 2021 +0800

    add meetup message on the header (#362)
---
 site_config/site.js              |  6 ++++++
 src/components/header/index.jsx  | 13 +++++++++++++
 src/components/header/index.scss | 31 +++++++++++++++++++++++++++++++
 src/pages/home/index.jsx         | 29 -----------------------------
 4 files changed, 50 insertions(+), 29 deletions(-)

diff --git a/site_config/site.js b/site_config/site.js
index b9323ed..4755221 100644
--- a/site_config/site.js
+++ b/site_config/site.js
@@ -8,6 +8,9 @@ export default {
   defaultSearch: 'google', // 默认搜索引擎,baidu或者google
   defaultLanguage: 'en-us',
   'en-us': {
+    meetup: {
+      text: '2021-05-15 14:00(PDT) Apache DolphinScheduler & Apache ShardingSphere Global Online co-Meetup is coming!',
+    },
     pageMenu: [
       {
         key: 'home', // 用作顶部菜单的选中
@@ -210,6 +213,9 @@ export default {
     copyright: 'Copyright © 2019-2021 The Apache Software Foundation. Apache DolphinScheduler, DolphinScheduler, and its feather logo are trademarks of The Apache Software Foundation.',
   },
   'zh-cn': {
+    meetup: {
+      text: '2021-05-16 上午 5:00  Apache DolphinScheduler & Apache ShardingSphere 将联合举行全球线上沙龙!',
+    },
     pageMenu: [
       {
         key: 'home',
diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx
index 9d09818..31d9363 100644
--- a/src/components/header/index.jsx
+++ b/src/components/header/index.jsx
@@ -140,6 +140,7 @@ class Header extends React.Component {
   render() {
     const { type, logo, onLanguageChange } = this.props;
     const { menuBodyVisible, language, search, searchVisible } = this.state;
+    const dataSource = siteConfig[language];
     return (
       <header
         className={
@@ -149,6 +150,18 @@ class Header extends React.Component {
           })
         }
       >
+        <div
+          className={
+            classnames({
+              'meetup-container': true,
+              [`meetup-container-${type}`]: true,
+            })
+          }
+        >
+          <a href="https://www.meetup.com/dolphinscheduler/events/277413098/">
+            <p>{dataSource.meetup.text}</p>
+          </a>
+        </div>
         <div className="header-body">
           <a href={getLink(`/${language}/index.html`)}>
             <img className="logo" alt={siteConfig.name} title={siteConfig.name} src={getLink(logo)} />
diff --git a/src/components/header/index.scss b/src/components/header/index.scss
index 8597162..db1a746 100644
--- a/src/components/header/index.scss
+++ b/src/components/header/index.scss
@@ -26,6 +26,37 @@
     background-color: #fff;
     box-shadow: 0 2px 10px 0 rgba(0,0,0,0.08);
   }
+  .meetup-container{
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 100%;
+    height: 30px;
+    font-family: Avenir-Medium;
+    font-size: 16px;
+    font-weight: bold;
+    text-align: center;
+    &-primary {
+      background-color: #000F20;
+      p{
+        color: #fff;
+      }
+    }
+    &-dark {
+      background-color: #fff;
+      p{
+        // margin-top: 5px;
+        color: #000F20;
+      }
+    }
+    &-normal {
+      background-color: #000F20;
+      p{
+        // margin-top: 5px;
+        color: #fff;
+      }
+    }
+  }
   .header-body {
     max-width: $contentWidth;
     margin: 0 auto;
diff --git a/src/pages/home/index.jsx b/src/pages/home/index.jsx
index 2c01b61..6691286 100644
--- a/src/pages/home/index.jsx
+++ b/src/pages/home/index.jsx
@@ -51,35 +51,6 @@ class Home extends Language {
         });
       });
   }
-  
-  addClick = (length) => {
-    if (this.state.index < length - 1) {
-      this.setState({
-        ...this.state,
-        index: this.state.index + 1,
-      });
-    } else {
-      this.setState({
-        ...this.state,
-        index: 0,
-      });
-    }
-  }
-
-  minusClick =(length) => {
-    if (this.state.index > 0) {
-      this.setState({
-        ...this.state,
-        index: this.state.index - 1,
-      });
-    } else {
-      this.setState({
-        ...this.state,
-        index: length - 1,
-      });
-    }
-  }
-
 
   addClick = (length) => {
     if (this.state.index < length - 1) {