You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2022/10/24 01:59:44 UTC

[skywalking-website] branch master updated: Remove contributions graph and add events & blogs block (#523)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new e12c1f4d01 Remove contributions graph and add events & blogs block (#523)
e12c1f4d01 is described below

commit e12c1f4d01ce53f45cbcc8837e172583766e70be
Author: Juntao Zhang <71...@qq.com>
AuthorDate: Mon Oct 24 09:59:39 2022 +0800

    Remove contributions graph and add events & blogs block (#523)
---
 assets/scss/_custom_home.scss                      | 54 ++++++----------------
 assets/scss/_custom_team.scss                      | 51 --------------------
 content/_index.html                                | 47 +++----------------
 content/team/_index.md                             |  9 +---
 scripts/team.js                                    |  2 +-
 themes/docsy/layouts/partials/scripts-home.html    |  3 --
 themes/docsy/layouts/shortcodes/blocks/events.html | 24 +++++++---
 themes/docsy/static/js/initMergedGraph.js          | 19 ++++----
 8 files changed, 53 insertions(+), 156 deletions(-)

diff --git a/assets/scss/_custom_home.scss b/assets/scss/_custom_home.scss
index ea55e698f7..61c07f5f51 100644
--- a/assets/scss/_custom_home.scss
+++ b/assets/scss/_custom_home.scss
@@ -100,7 +100,7 @@
       -webkit-text-fill-color: transparent;
       -webkit-background-clip: text;
       -webkit-background-size: 200% 100%;
-      -webkit-animation:  colorAnimation 4s infinite linear;
+      -webkit-animation: colorAnimation 4s infinite linear;
       font-size: 18px;
     }
 
@@ -347,42 +347,18 @@
     }
   }
 
-  .community-wrapper {
-    .community-content {
-      display: flex;
-      justify-content: space-between;
-
-      li {
-        width: 32.5%;
-        padding: 24px;
-        box-shadow: 0px 0px 2px rgba(0, 0, 0, 0.3);
-        border-radius: 6px;
-
-        &:last-child {
-          display: flex;
-          flex-direction: column;
-          justify-content: center;
-          align-items: center;
-          color: #fff;
-          padding: 30px;
-          text-align: center;
-          background: linear-gradient(180deg, #479EEB 0%, #3788D0 100%);
-        }
-      }
+  .events-wrapper {
+    background: radial-gradient(99.06% 49.81% at 50% 61.68%, rgba(62, 162, 255, 0.3) 0%, rgba(0, 117, 255, 0) 50%),
+    radial-gradient(23.2% 22.47% at 38.96% 38.47%, rgba(255, 245, 0, 0.2) 0%, rgba(20, 255, 0, 0) 100%),
+    radial-gradient(20.52% 46.35% at 50% 50%, rgba(120, 190, 255, 0.2) 0%, rgba(135, 212, 255, 0) 100%),
+    radial-gradient(21.08% 29.74% at 63.15% 58.96%, rgba(232, 78, 161, 0.2) 0%, rgba(239, 177, 255, 0) 100%);
+    .date {
+      color: #888;
+      font-size: 13px;
+      padding-bottom: 12px;
     }
-
-    .graph-wrapper {
-      width: 100%;
-      padding-top: 61.43%;
-      position: relative;
-    }
-
-    #mergedGraph {
-      position: absolute;
-      width: 100%;
-      height: 100%;
-      top: 0;
-      left: 0;
+    .txt {
+      color: #2c3e50
     }
   }
 
@@ -429,6 +405,9 @@
     }
   }
 
+  .tuned-wrapper {
+    background: none;
+  }
   .tuned-content {
     display: flex;
     justify-content: space-between;
@@ -533,9 +512,6 @@
 
 @media (min-width: 768px) {
   .td-home {
-    .community-wrapper .community-content li:last-child {
-      padding: 10px;
-    }
 
     .swiper-button-prev, .swiper-button-next {
       background-color: #79a7d030;
diff --git a/assets/scss/_custom_team.scss b/assets/scss/_custom_team.scss
index 551dde735b..c93d72f1aa 100644
--- a/assets/scss/_custom_team.scss
+++ b/assets/scss/_custom_team.scss
@@ -192,34 +192,6 @@
     }
   }
 
-  .graph-wrapper {
-    display: flex;
-
-    .graph-img {
-      width: 50%;
-      position: relative;
-
-      &:last-child {
-        padding: 30px 0;
-      }
-
-      .txt {
-        position: absolute;
-        top: 0;
-        left: 20px;
-        font-size: 12px;
-      }
-    }
-  }
-
-  #mergedGraph {
-    width: 100%;
-    height: 100%;
-    p {
-      text-indent: 20px;
-    }
-  }
-
   @media (max-width: 992px) {
     .table-wrapper {
       flex-wrap: wrap;
@@ -232,29 +204,6 @@
         }
       }
     }
-
-    .graph-wrapper {
-      flex-wrap: wrap;
-
-      .graph-img {
-        width: 100%;
-
-        &:last-child {
-          padding-top: 61.3%;
-        }
-
-        #mergedGraph {
-          position: absolute;
-          left: 0;
-          top: 0;
-
-        }
-
-        .txt {
-          font-size: 9px;
-        }
-      }
-    }
   }
 
   @media (max-width: 1200px) {
diff --git a/content/_index.html b/content/_index.html
index 4dfe946814..f090d4f412 100644
--- a/content/_index.html
+++ b/content/_index.html
@@ -244,37 +244,11 @@ linkTitle = "Apache SkyWalking"
     </ul>
 </div>
 
-<div class="container community-wrapper center mt-5">
-    <h2 class="title">The vibrant community that makes all happen</h2>
-    <ul class="community-content">
-        <li>
-            <h4>Thousands of contributions every year</h4>
-            <p>In the past years, SkyWalking accepts thousands of contributions from hundreds of people globally, and
-                continuous.</p>
-            <div class="graph-wrapper">
-                <div id="mergedGraph"></div>
-            </div>
-        </li>
-        <li>
-            <h4>600 contributors milestone</h4>
-            <p>SkyWalking has over 600 contributors based on GitHub repository statistics. This is a remarkable
-                achievement for the whole diverse community.</p>
-            <img loading="lazy" src="https://contributor-graph-api.apiseven.com/contributors-svg?repo=apache/skywalking&merge=true"
-                 alt="contributors">
-        </li>
-        <li>
-            <div>
-                <h4>Contributions welcome</h4>
-                <p>We have a well-maintained Pull Request contribution workflow on GitHub. New users are always
-                    welcome!</p>
-                <a href="/team">
-                    <button class="sky-btn">
-                        More about our team
-                        <i class="iconfont icon-arrow-right pull-right"></i>
-                    </button>
-                </a>
-            </div>
-        </li>
+<div class="container feature-wrapper events-wrapper mt-5">
+    <h2 class="title">Events &amp; Blogs</h2>
+    <ul class="events-content feature-content">
+        {{< blocks/events >}}
+        {{< /blocks/events >}}
     </ul>
 </div>
 
@@ -300,11 +274,11 @@ linkTitle = "Apache SkyWalking"
     </div>
 </div>
 
-<div class="container tuned-wrapper mt-5 mb-5">
+<div class="container tuned-wrapper feature-wrapper mt-5 mb-5">
     <h2 class="title">
         Stay tuned with SkyWalking
     </h2>
-    <ul class="tuned-content center">
+    <ul class="tuned-content feature-content center">
         <li>
             <h4>Questions/bugs?</h4>
             <p>Features requests, questions or report bugs? Feel free to
@@ -326,13 +300,6 @@ linkTitle = "Apache SkyWalking"
             </p>
             <img loading="lazy" src="images/home/tuned_twitter.svg" data-nolightbox="true" alt="twitter">
         </li>
-        <li>
-
-            {{< events >}}
-            {{< /events >}}
-
-            <img loading="lazy" src="images/home/tuned_release.svg" data-nolightbox="true" alt="release">
-        </li>
     </ul>
 </div>
 
diff --git a/content/team/_index.md b/content/team/_index.md
index 40273fa4cc..389dc4cf02 100644
--- a/content/team/_index.md
+++ b/content/team/_index.md
@@ -111,13 +111,8 @@ The SkyWalking team is comprised of Members and Contributors, and the growth has
 
 {{< contributors >}}
 
-
-## Contributor over time
+## Contributions over time
 
 <div class="graph-wrapper">
-<img class="graph-img contributors-graph" data-nolightbox="true" src="https://contributor-graph-api.apiseven.com/contributors-svg?repo=apache/skywalking&merge=true"/>
-<div class="graph-img">
-<div class="txt">Thousands of contributions every year</div>
-<div id="mergedGraph"></div>
-</div>
+<div id="mergedGraph" style="height: 300px"></div>
 </div>
diff --git a/scripts/team.js b/scripts/team.js
index 55876e8aca..8a74e6a9ce 100644
--- a/scripts/team.js
+++ b/scripts/team.js
@@ -56,7 +56,7 @@ class GenerateTeamYaml {
   async getMergedData({user, repo}) {
     const that = this;
     let count = 0;
-    const NUM = 10;
+    const NUM = 8;
     const FAIL_TIPS = `${user}/${repo}/graphs failed!`;
 
     try {
diff --git a/themes/docsy/layouts/partials/scripts-home.html b/themes/docsy/layouts/partials/scripts-home.html
index 98482be1b2..11d07759b7 100644
--- a/themes/docsy/layouts/partials/scripts-home.html
+++ b/themes/docsy/layouts/partials/scripts-home.html
@@ -1,6 +1,3 @@
-<script src="/js/echarts.min.js"></script>
-<script src="/js/mergedData.js"></script>
-<script src="/js/initMergedGraph.js?t=20220810"></script>
 <script>
     initUISwiper();
 
diff --git a/themes/docsy/layouts/shortcodes/blocks/events.html b/themes/docsy/layouts/shortcodes/blocks/events.html
index 653cc01a3a..6b75d93e37 100644
--- a/themes/docsy/layouts/shortcodes/blocks/events.html
+++ b/themes/docsy/layouts/shortcodes/blocks/events.html
@@ -1,13 +1,23 @@
 {{ .Inner | markdownify}}
 
-{{ range first 4 (where .Site.Pages "Section" "events") }}
-
-    <div class="home-event-li">
-        <h5 class="mt-0 mb-1"><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h5>
-        <span class="time">{{ .Date.Format "Mon, Jan 2, 2006" }}</span>
-        <p>{{ .Plain | safeHTML | truncate 100 }}</p>
-    </div>
+{{ range first 3 (where .Site.Pages "Section" "events") }}
+<li>
+  <a href="{{ .RelPermalink }}">
+    <h5 class="mt-0 mb-1">{{ .LinkTitle }}</h5>
+    <span class="date">{{ .Date.Format "Mon, Jan 2, 2006" }}</span>
+    <p class="txt">{{ .Plain | safeHTML | truncate 100 }}</p>
+  </a>
+</li>
+{{ end }}
 
+{{ range first 3 (where .Site.Pages "Section" "blog") }}
+<li>
+  <a href="{{ .RelPermalink }}">
+    <h5 class="mt-0 mb-1">{{ .LinkTitle }}</h5>
+    <span class="date">{{ .Date.Format "Mon, Jan 2, 2006" }}</span>
+    <p class="txt">{{ .Plain | safeHTML | truncate 100 }}</p>
+  </a>
+</li>
 {{ end }}
 
 
diff --git a/themes/docsy/static/js/initMergedGraph.js b/themes/docsy/static/js/initMergedGraph.js
index 320a727194..6ada6d3332 100644
--- a/themes/docsy/static/js/initMergedGraph.js
+++ b/themes/docsy/static/js/initMergedGraph.js
@@ -1,10 +1,8 @@
 function initMergedGraph() {
   if (window.location.hostname.indexOf('.netlify.app') > -1) {
     var previewTips = "<p>This part doesn't show up in preview mode.</p>";
+    $('.contributors-wrapper').html(previewTips);
     $('#mergedGraph').html(previewTips);
-    if ($('.contributors-wrapper').length) {
-      $('.contributors-wrapper').html(previewTips);
-    }
     return
   }
 
@@ -15,6 +13,15 @@ function initMergedGraph() {
     title: {
       left: 'center',
     },
+    tooltip: {
+      trigger: 'axis',
+      axisPointer: {
+        type: 'cross',
+        label: {
+          backgroundColor: '#6a7985'
+        }
+      }
+    },
     xAxis: {
       type: 'category',
       boundaryGap: false,
@@ -32,7 +39,7 @@ function initMergedGraph() {
         lineStyle: {
           width: 1
         },
-        name: 'Merged Data',
+        name: 'Contributions',
         type: 'line',
         symbol: 'none',
         sampling: 'lttb',
@@ -61,7 +68,3 @@ function initMergedGraph() {
 }
 
 initMergedGraph();
-
-$('.contributors-graph').on('load', function () {
-  window.onresize && window.onresize();
-})