You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by gu...@apache.org on 2017/11/18 03:02:29 UTC

kafka-site git commit: MINOR: Added secondary nav to streams sub-page

Repository: kafka-site
Updated Branches:
  refs/heads/asf-site 8acb6f286 -> 606a0afdf


MINOR: Added secondary nav to streams sub-page

Added secondary nav to streams sub-page:
quickstart.html
tutorial.html
developer-guide.html
core-concepts.html

guozhangwang please review Thanks!!

Author: Manjula K <ma...@kafka-summit.org>

Reviewers: Guozhang Wang <wa...@gmail.com>

Closes #109 from manjuapu/streams-sec-nav


Project: http://git-wip-us.apache.org/repos/asf/kafka-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka-site/commit/606a0afd
Tree: http://git-wip-us.apache.org/repos/asf/kafka-site/tree/606a0afd
Diff: http://git-wip-us.apache.org/repos/asf/kafka-site/diff/606a0afd

Branch: refs/heads/asf-site
Commit: 606a0afdfb232516454ad230994cfb0f4aef9dc4
Parents: 8acb6f2
Author: Manjula K <ma...@kafka-summit.org>
Authored: Fri Nov 17 19:02:26 2017 -0800
Committer: Guozhang Wang <wa...@gmail.com>
Committed: Fri Nov 17 19:02:26 2017 -0800

----------------------------------------------------------------------
 10/streams/core-concepts.html   | 37 ++++++++++++++++++++++++++++------
 10/streams/developer-guide.html | 37 ++++++++++++++++++++++++++++------
 10/streams/index.html           |  2 +-
 10/streams/quickstart.html      | 39 +++++++++++++++++++++++++++++-------
 10/streams/tutorial.html        | 36 +++++++++++++++++++++++++++------
 5 files changed, 125 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka-site/blob/606a0afd/10/streams/core-concepts.html
----------------------------------------------------------------------
diff --git a/10/streams/core-concepts.html b/10/streams/core-concepts.html
index baf8d9b..eea9ed8 100644
--- a/10/streams/core-concepts.html
+++ b/10/streams/core-concepts.html
@@ -19,7 +19,17 @@
 
 <script id="content-template" type="text/x-handlebars-template">
     <h1>Core Concepts</h1>
-
+    <div class="sub-nav-sticky">
+        <div class="sticky-top">
+            <div style="height:35px">
+                <a href="/{{version}}/documentation/streams/">Introduction</a>
+                <a href="/{{version}}/documentation/streams/developer-guide">Developer Guide</a>
+                <a class="active-menu-item"  href="/{{version}}/documentation/streams/core-concepts">Concepts</a>
+                <a href="/{{version}}/documentation/streams/quickstart">Run Demo App</a>
+                <a href="/{{version}}/documentation/streams/tutorial">Tutorial: Write App</a>
+            </div>
+        </div>
+    </div>
     <p>
         Kafka Streams is a client library for processing and analyzing data stored in Kafka.
         It builds upon important stream processing concepts such as properly distinguishing between event time and processing time, windowing support, and simple yet efficient management and real-time querying of application state.
@@ -178,10 +188,25 @@
 <!--#include virtual="../../includes/_footer.htm" -->
 <script>
 $(function() {
-  // Show selected style on nav item
-  $('.b-nav__streams').addClass('selected');
-
-  // Display docs subnav items
-  $('.b-nav__docs').parent().toggleClass('nav__item__with__subs--expanded');
+          // Show selected style on nav item
+          $('.b-nav__streams').addClass('selected');
+
+   
+          //sticky secondary nav
+          var $navbar = $(".sub-nav-sticky"),
+               y_pos = $navbar.offset().top,
+               height = $navbar.height();
+       
+           $(window).scroll(function() {
+               var scrollTop = $(window).scrollTop();
+           
+               if (scrollTop > y_pos - height) {
+                   $navbar.addClass("navbar-fixed")
+               } else if (scrollTop <= y_pos) {
+                   $navbar.removeClass("navbar-fixed")
+               }
+           });
+           // Display docs subnav items
+           $('.b-nav__docs').parent().toggleClass('nav__item__with__subs--expanded');
 });
 </script>

http://git-wip-us.apache.org/repos/asf/kafka-site/blob/606a0afd/10/streams/developer-guide.html
----------------------------------------------------------------------
diff --git a/10/streams/developer-guide.html b/10/streams/developer-guide.html
index eba20a9..10677ff 100644
--- a/10/streams/developer-guide.html
+++ b/10/streams/developer-guide.html
@@ -19,7 +19,17 @@
 
 <script id="content-template" type="text/x-handlebars-template">
     <h1>Developer Guide for Kafka Streams API</h1>
-    
+    <div class="sub-nav-sticky">
+        <div class="sticky-top">
+            <div style="height:35px">
+                <a href="/{{version}}/documentation/streams/">Introduction</a>
+                <a class="active-menu-item" href="/{{version}}/documentation/streams/developer-guide">Developer Guide</a>
+                <a href="/{{version}}/documentation/streams/core-concepts">Concepts</a>
+                <a href="/{{version}}/documentation/streams/quickstart">Run Demo App</a>
+                <a href="/{{version}}/documentation/streams/tutorial">Tutorial: Write App</a>
+            </div>
+        </div>
+    </div>
     <p>
         This developer guide describes how to write, configure, and execute a Kafka Streams application. There is a <a href="/{{version}}/documentation/#quickstart_kafkastreams">quickstart</a> example that provides how to run a stream processing program coded in the Kafka Streams library.
     </p>
@@ -2992,10 +3002,25 @@ Note that in the <code>WordCountProcessor</code> implementation, users need to r
 <!--#include virtual="../../includes/_footer.htm" -->
 <script>
 $(function() {
-  // Show selected style on nav item
-  $('.b-nav__streams').addClass('selected');
-
-  // Display docs subnav items
-  $('.b-nav__docs').parent().toggleClass('nav__item__with__subs--expanded');
+          // Show selected style on nav item
+          $('.b-nav__streams').addClass('selected');
+
+   
+          //sticky secondary nav
+          var $navbar = $(".sub-nav-sticky"),
+               y_pos = $navbar.offset().top,
+               height = $navbar.height();
+       
+           $(window).scroll(function() {
+               var scrollTop = $(window).scrollTop();
+           
+               if (scrollTop > y_pos - height) {
+                   $navbar.addClass("navbar-fixed")
+               } else if (scrollTop <= y_pos) {
+                   $navbar.removeClass("navbar-fixed")
+               }
+           });
+           // Display docs subnav items
+           $('.b-nav__docs').parent().toggleClass('nav__item__with__subs--expanded');
 });
 </script>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/kafka-site/blob/606a0afd/10/streams/index.html
----------------------------------------------------------------------
diff --git a/10/streams/index.html b/10/streams/index.html
index bf86adc..2bc35ee 100644
--- a/10/streams/index.html
+++ b/10/streams/index.html
@@ -35,7 +35,7 @@
             <div class="yt__video__inner__block">
                 <iframe  class="yt_series video_1 active" style="display:block" src="https://www.youtube.com/embed/Z3JKCLG3VP4?rel=0&showinfo=0&end=602" frameborder="0" allowfullscreen></iframe>
                 <iframe  class="yt_series video_2" src="https://www.youtube.com/embed/LxxeXI1mPKo?rel=0&showinfo=0&end=622" frameborder="0" allowfullscreen></iframe>
-                <iframe  class="yt_series video_3" src="https://www.youtube.com/embed/7JYEEx7SBuE?rel=0&showinfo=0end=557" frameborder="0" allowfullscreen></iframe>
+                <iframe  class="yt_series video_3" src="https://www.youtube.com/embed/7JYEEx7SBuE?rel=0&showinfo=0&end=557" frameborder="0" allowfullscreen></iframe>
                 <iframe  class="yt_series video_4" src="https://www.youtube.com/embed/3kJgYIkAeHs?rel=0&showinfo=0&end=564" frameborder="0" allowfullscreen></iframe>
             </div>
         </div>

http://git-wip-us.apache.org/repos/asf/kafka-site/blob/606a0afd/10/streams/quickstart.html
----------------------------------------------------------------------
diff --git a/10/streams/quickstart.html b/10/streams/quickstart.html
index c4b52ea..1f73994 100644
--- a/10/streams/quickstart.html
+++ b/10/streams/quickstart.html
@@ -18,8 +18,18 @@
 
 <script id="content-template" type="text/x-handlebars-template">
 
-  <h1>Run Streams Demo Application</h1>
-
+<h1>Run Streams Demo Application</h1>
+<div class="sub-nav-sticky">
+        <div class="sticky-top">
+            <div style="height:35px">
+                <a href="/{{version}}/documentation/streams/">Introduction</a>
+                <a href="/{{version}}/documentation/streams/developer-guide">Developer Guide</a>
+                <a href="/{{version}}/documentation/streams/core-concepts">Concepts</a>
+                <a class="active-menu-item"  href="/{{version}}/documentation/streams/quickstart">Run Demo App</a>
+                <a href="/{{version}}/documentation/streams/tutorial">Tutorial: Write App</a>
+            </div>
+        </div>
+</div>  
 <p>
   This tutorial assumes you are starting fresh and have no existing Kafka or ZooKeeper data. However, if you have already started Kafka and
   ZooKeeper, feel free to skip the first two steps.
@@ -352,10 +362,25 @@ Looking beyond the scope of this concrete example, what Kafka Streams is doing h
 <!--#include virtual="../../includes/_footer.htm" -->
 <script>
 $(function() {
-  // Show selected style on nav item
-  $('.b-nav__streams').addClass('selected');
-
-  // Display docs subnav items
-  $('.b-nav__docs').parent().toggleClass('nav__item__with__subs--expanded');
+           // Show selected style on nav item
+          $('.b-nav__streams').addClass('selected');
+
+   
+          //sticky secondary nav
+          var $navbar = $(".sub-nav-sticky"),
+               y_pos = $navbar.offset().top,
+               height = $navbar.height();
+       
+           $(window).scroll(function() {
+               var scrollTop = $(window).scrollTop();
+           
+               if (scrollTop > y_pos - height) {
+                   $navbar.addClass("navbar-fixed")
+               } else if (scrollTop <= y_pos) {
+                   $navbar.removeClass("navbar-fixed")
+               }
+           });
+           // Display docs subnav items
+          $('.b-nav__docs').parent().toggleClass('nav__item__with__subs--expanded');
 });
 </script>

http://git-wip-us.apache.org/repos/asf/kafka-site/blob/606a0afd/10/streams/tutorial.html
----------------------------------------------------------------------
diff --git a/10/streams/tutorial.html b/10/streams/tutorial.html
index ec41a93..52f0d03 100644
--- a/10/streams/tutorial.html
+++ b/10/streams/tutorial.html
@@ -18,7 +18,17 @@
 
 <script id="content-template" type="text/x-handlebars-template">
     <h1>Tutorial: Write a Streams Application</h1>
-
+    <div class="sub-nav-sticky">
+        <div class="sticky-top">
+            <div style="height:35px">
+                <a href="/{{version}}/documentation/streams/">Introduction</a>
+                <a href="/{{version}}/documentation/streams/developer-guide">Developer Guide</a>
+                <a href="/{{version}}/documentation/streams/core-concepts">Concepts</a>
+                <a href="/{{version}}/documentation/streams/quickstart">Run Demo App</a>
+                <a class="active-menu-item" href="/{{version}}/documentation/streams/tutorial">Tutorial: Write App</a>
+            </div>
+        </div>
+    </div>
     <p>
         In this guide we will start from scratch on setting up your own project to write a stream processing application using Kafka Streams.
         It is highly recommended to read the <a href="/{{version}}/documentation/streams/quickstart">quickstart</a> first on how to run a Streams application written in Kafka Streams if you have not done so.
@@ -629,10 +639,24 @@
 <!--#include virtual="../../includes/_footer.htm" -->
 <script>
 $(function() {
-  // Show selected style on nav item
-  $('.b-nav__streams').addClass('selected');
-
-  // Display docs subnav items
-  $('.b-nav__docs').parent().toggleClass('nav__item__with__subs--expanded');
+          // Show selected style on nav item
+          $('.b-nav__streams').addClass('selected');
+  
+          //sticky secondary nav
+          var $navbar = $(".sub-nav-sticky"),
+               y_pos = $navbar.offset().top,
+               height = $navbar.height();
+       
+           $(window).scroll(function() {
+               var scrollTop = $(window).scrollTop();
+           
+               if (scrollTop > y_pos - height) {
+                   $navbar.addClass("navbar-fixed")
+               } else if (scrollTop <= y_pos) {
+                   $navbar.removeClass("navbar-fixed")
+               }
+           });
+           // Display docs subnav items
+           $('.b-nav__docs').parent().toggleClass('nav__item__with__subs--expanded');
 });
 </script>