You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by ma...@apache.org on 2021/09/09 22:27:34 UTC

[ignite-website] branch IGNITE-15372 updated: restored github bar on homepage, and added custom behavior to hide it when scrolling down

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

mauriciostekl pushed a commit to branch IGNITE-15372
in repository https://gitbox.apache.org/repos/asf/ignite-website.git


The following commit(s) were added to refs/heads/IGNITE-15372 by this push:
     new 9615b61  restored github bar on homepage, and added custom behavior to hide it when scrolling down
9615b61 is described below

commit 9615b6152f5bf2b22ddf455b263c852e81d2d322
Author: Mauricio Stekl <ma...@stekl.org>
AuthorDate: Thu Sep 9 19:21:02 2021 -0300

    restored github bar on homepage, and added custom behavior to hide it when scrolling down
---
 css/ignite-redesign.css |  2 +-
 gulpfile.js             |  4 +++-
 includes/styles.html    |  2 +-
 index.html              | 38 +++++++++++++++++++++++++++++++++---
 js/headroom.min.js      | 52 +++++++++++++++++++++++++++++++++++++++++++++++++
 scss/homepage.scss      | 12 +++++++++++-
 6 files changed, 103 insertions(+), 7 deletions(-)

diff --git a/css/ignite-redesign.css b/css/ignite-redesign.css
index d62ebee..617a204 100644
--- a/css/ignite-redesign.css
+++ b/css/ignite-redesign.css
@@ -1 +1 @@
-@charset "UTF-8";code[class*=language-],pre[class*=language-]{color:#ccc;background:0 0;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=langu [...]
\ No newline at end of file
+@charset "UTF-8";code[class*=language-],pre[class*=language-]{color:#ccc;background:0 0;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=langu [...]
\ No newline at end of file
diff --git a/gulpfile.js b/gulpfile.js
index 3639e06..bd50f44 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -121,6 +121,7 @@ function extractCritical(cb) {
 
     });
 }
+exports.extractCritical = extractCritical;
 
 const inject = require('gulp-inject-string');
 const rename = require('gulp-rename');
@@ -138,4 +139,5 @@ exports.inlineCritical = inlineCritical;
 
 exports.critical = series(extractCritical, inlineCritical);
 
-exports.build = series(compileCss, extractCritical, inlineCritical);
\ No newline at end of file
+// exports.build = series(compileCss, extractCritical, inlineCritical);
+exports.build = compileCss; //, extractCritical, inlineCritical);
\ No newline at end of file
diff --git a/includes/styles.html b/includes/styles.html
index c4edc8a..48970f0 100644
--- a/includes/styles.html
+++ b/includes/styles.html
@@ -1 +1 @@
-<!-- remember to copy this content to downloads.html --><style>@charset "UTF-8";:root{--blue:#007bff;--indigo:#6610f2;--purple:#6f42c1;--pink:#e83e8c;--red:#dc3545;--orange:#fd7e14;--yellow:#ffc107;--green:#28a745;--teal:#20c997;--cyan:#17a2b8;--white:#fff;--gray:#6c757d;--gray-dark:#343a40;--primary:#055799;--secondary:#b02032;--success:#28a745;--info:#17a2b8;--warning:#ffc107;--danger:#dc3545;--light:#f8f9fa;--dark:#343a40;--gray:#e9e9e9;--shadow-gray:#d5d5d5;--ignite-red:#f20025;--bre [...]
\ No newline at end of file
+<!-- remember to copy this content to downloads.html --><style>@charset "UTF-8";pre[class*=language-]{color:#ccc;background:0 0;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}pre[class [...]
\ No newline at end of file
diff --git a/index.html b/index.html
index 6ac3cfa..e275c3e 100644
--- a/index.html
+++ b/index.html
@@ -52,7 +52,7 @@ under the License.
           <!-- remember to copy this content to downloads.html -->
 </head>
 
-<body>
+<body data-headroom>
 <svg style="display: none;" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
     <symbol id="index-icons--ACID" viewBox="0 0 300 300" xmlns="http://www.w3.org/2000/svg">
         <defs></defs>
@@ -120,7 +120,37 @@ under the License.
         </div>
     </div>
 
-   
+    <section id="github-stats-bar" class="section-bar" >
+        <div class="container">
+            <div class="row">
+                <div class="col-3 col-sm-6 col-lg-7 col-md-8 github-stats">
+                    <a class="github-link" target="_blank" rel="noopener" href=" https://github.com/apache/ignite"
+                       aria-label="GitHub link"
+                       title="View on GitHub"><i class="fab fa-github" aria-hidden="true"></i></a>
+                    <!-- Github Stargazers -->
+                    <a class="github-button" href="https://github.com/apache/ignite" data-icon="octicon-star"
+                       data-size="large" data-show-count="true" aria-label="Star apache/ignite on GitHub">Star</a>
+
+                    <!-- Github Fork -->
+                    <a class="github-button" target="_blank" rel="noopener" href="https://github.com/apache/ignite/fork"
+                       data-icon="octicon-repo-forked" data-size="large" data-show-count="true"
+                       aria-label="Fork apache/ignite on GitHub">Fork</a>
+
+                    <!-- Github Watch -->
+                    <a class="github-button" target="_blank" rel="noopener"
+                       href="https://github.com/apache/ignite/subscription"
+                       data-icon="octicon-eye" data-size="large" data-show-count="true"
+                       aria-label="Watch apache/ignite on GitHub">Watch</a>
+
+                </div>
+                <div class="col-9 col-sm-6 col-md-4 col-lg-5 twitter-follow">
+                    <a href="https://twitter.com/ApacheIgnite" class="twitter-follow-button" target="_blank"
+                       rel="noopener" data-show-count="true">Follow
+                        @ApacheIgnite</a>
+                </div>
+            </div>
+        </div>
+    </section>
 
     <section id="community-awards" class="section-block ">
         <div class="container">
@@ -713,7 +743,7 @@ under the License.
                     <source srcset="/images/promos/ignite-summit-cloud-edition-CfP--vertical.png"  media="(max-width: 767px)">
                     
                                         
-                    <img src="/images/promos/ignite-summit-cloud-edition-CfP.png" alt="Ignite Summit: Cloud Edition promo" width="1140" height="300" />
+                    <img class="lazyload" data-src="/images/promos/ignite-summit-cloud-edition-CfP.png" alt="Ignite Summit: Cloud Edition promo" width="1140" height="300" />
                     
                 </picture>
                 
@@ -827,6 +857,8 @@ under the License.
 
 <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
 
+<script async src="/js/headroom.min.js"></script>
+
 <script type="text/javascript">
     // this make the features tabs interactive by mouse over instead of click
     // jQuery('#home-features-vtab .nav-link').hover(function (e) {
diff --git a/js/headroom.min.js b/js/headroom.min.js
new file mode 100644
index 0000000..34d0e03
--- /dev/null
+++ b/js/headroom.min.js
@@ -0,0 +1,52 @@
+/*!
+ * headroom.js v0.12.0 - Give your page some headroom. Hide your header until you need it
+ * Copyright (c) 2020 Nick Williams - http://wicky.nillia.ms/headroom.js
+ * License: MIT
+ */
+
+!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t=t||self).Headroom=n()}(this,function(){"use strict";function t(){return"undefined"!=typeof window}function d(t){return function(t){return t&&t.document&&function(t){return 9===t.nodeType}(t.document)}(t)?function(t){var n=t.document,o=n.body,s=n.documentElement;return{scrollHeight:function(){return Math.max(o.scrollHeight,s.scrollHeight,o.offsetHeight, [...]
+
+// jquery plugin
+(function($) {
+
+    if(!$) {
+      return;
+    }
+  
+    ////////////
+    // Plugin //
+    ////////////
+  
+    $.fn.headroom = function(option) {
+      return this.each(function() {
+        var $this   = $(this),
+          data      = $this.data('headroom'),
+          options   = typeof option === 'object' && option;
+  
+        options = $.extend(true, {}, Headroom.options, options);
+  
+        if (!data) {
+          data = new Headroom(this, options);
+          data.init();
+          $this.data('headroom', data);
+        }
+        if (typeof option === 'string') {
+          data[option]();
+  
+          if(option === 'destroy'){
+            $this.removeData('headroom');
+          }
+        }
+      });
+    };
+  
+    //////////////
+    // Data API //
+    //////////////
+  
+    $('[data-headroom]').each(function() {
+      var $this = $(this);
+      $this.headroom($this.data());
+    });
+  
+  }(window.Zepto || window.jQuery));
\ No newline at end of file
diff --git a/scss/homepage.scss b/scss/homepage.scss
index ccc1aa3..70a47dd 100644
--- a/scss/homepage.scss
+++ b/scss/homepage.scss
@@ -87,7 +87,12 @@
 #github-stats-bar {
     padding:  0.5rem 0 0.2rem;
     background-color: theme-color('gray');
-    
+    position: fixed;
+    bottom: 0;
+    width: 100%;
+    z-index: 100;
+    transition: transform .5s ease-in-out;
+
     a {
         font-size: 18px;
         margin-right: 2rem;
@@ -103,6 +108,11 @@
         }
     }
 }
+body.headroom--unpinned {
+    #github-stats-bar {
+        transform: translate(0, 46px);
+    }
+}
 
 .github-stats {
     .github-link {