Return-Path: X-Original-To: apmail-flink-commits-archive@minotaur.apache.org Delivered-To: apmail-flink-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 089FF1791A for ; Wed, 22 Apr 2015 14:16:59 +0000 (UTC) Received: (qmail 79394 invoked by uid 500); 22 Apr 2015 14:16:58 -0000 Delivered-To: apmail-flink-commits-archive@flink.apache.org Received: (qmail 79303 invoked by uid 500); 22 Apr 2015 14:16:58 -0000 Mailing-List: contact commits-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list commits@flink.apache.org Received: (qmail 79179 invoked by uid 99); 22 Apr 2015 14:16:58 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Apr 2015 14:16:58 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 8338EE1085; Wed, 22 Apr 2015 14:16:58 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: uce@apache.org To: commits@flink.apache.org Date: Wed, 22 Apr 2015 14:17:03 -0000 Message-Id: In-Reply-To: References: X-Mailer: ASF-Git Admin Mailer Subject: [06/30] flink git commit: [docs] Change doc layout http://git-wip-us.apache.org/repos/asf/flink/blob/f1ee90cc/docs/page/img/quickstart-example/kmeans008.png ---------------------------------------------------------------------- diff --git a/docs/page/img/quickstart-example/kmeans008.png b/docs/page/img/quickstart-example/kmeans008.png new file mode 100644 index 0000000..b372fd1 Binary files /dev/null and b/docs/page/img/quickstart-example/kmeans008.png differ http://git-wip-us.apache.org/repos/asf/flink/blob/f1ee90cc/docs/page/img/quickstart-example/kmeans015.png ---------------------------------------------------------------------- diff --git a/docs/page/img/quickstart-example/kmeans015.png b/docs/page/img/quickstart-example/kmeans015.png new file mode 100644 index 0000000..8b6fb51 Binary files /dev/null and b/docs/page/img/quickstart-example/kmeans015.png differ http://git-wip-us.apache.org/repos/asf/flink/blob/f1ee90cc/docs/page/img/quickstart-example/result003.png ---------------------------------------------------------------------- diff --git a/docs/page/img/quickstart-example/result003.png b/docs/page/img/quickstart-example/result003.png new file mode 100644 index 0000000..bdcef44 Binary files /dev/null and b/docs/page/img/quickstart-example/result003.png differ http://git-wip-us.apache.org/repos/asf/flink/blob/f1ee90cc/docs/page/img/quickstart-example/result008.png ---------------------------------------------------------------------- diff --git a/docs/page/img/quickstart-example/result008.png b/docs/page/img/quickstart-example/result008.png new file mode 100644 index 0000000..921c73c Binary files /dev/null and b/docs/page/img/quickstart-example/result008.png differ http://git-wip-us.apache.org/repos/asf/flink/blob/f1ee90cc/docs/page/img/quickstart-example/result015.png ---------------------------------------------------------------------- diff --git a/docs/page/img/quickstart-example/result015.png b/docs/page/img/quickstart-example/result015.png new file mode 100644 index 0000000..9dbc6c4 Binary files /dev/null and b/docs/page/img/quickstart-example/result015.png differ http://git-wip-us.apache.org/repos/asf/flink/blob/f1ee90cc/docs/page/img/quickstart-example/run-webclient.png ---------------------------------------------------------------------- diff --git a/docs/page/img/quickstart-example/run-webclient.png b/docs/page/img/quickstart-example/run-webclient.png new file mode 100644 index 0000000..8b3d535 Binary files /dev/null and b/docs/page/img/quickstart-example/run-webclient.png differ http://git-wip-us.apache.org/repos/asf/flink/blob/f1ee90cc/docs/page/img/quickstart_cluster.png ---------------------------------------------------------------------- diff --git a/docs/page/img/quickstart_cluster.png b/docs/page/img/quickstart_cluster.png new file mode 100644 index 0000000..9e24795 Binary files /dev/null and b/docs/page/img/quickstart_cluster.png differ http://git-wip-us.apache.org/repos/asf/flink/blob/f1ee90cc/docs/page/js/codetabs.js ---------------------------------------------------------------------- diff --git a/docs/page/js/codetabs.js b/docs/page/js/codetabs.js new file mode 100644 index 0000000..878aa32 --- /dev/null +++ b/docs/page/js/codetabs.js @@ -0,0 +1,121 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/* Note: This file is originally from the Apache Spark project. */ + +/* Custom JavaScript code in the MarkDown docs */ + +// Enable language-specific code tabs +function codeTabs() { + var counter = 0; + var langImages = { + "scala": "img/scala-sm.png", + "python": "img/python-sm.png", + "java": "img/java-sm.png" + }; + $("div.codetabs").each(function() { + $(this).addClass("tab-content"); + + // Insert the tab bar + var tabBar = $(''); + $(this).before(tabBar); + + // Add each code sample to the tab bar: + var codeSamples = $(this).children("div"); + codeSamples.each(function() { + $(this).addClass("tab-pane"); + var lang = $(this).data("lang"); + var image = $(this).data("image"); + var notabs = $(this).data("notabs"); + var capitalizedLang = lang.substr(0, 1).toUpperCase() + lang.substr(1); + var id = "tab_" + lang + "_" + counter; + $(this).attr("id", id); + if (image != null && langImages[lang]) { + var buttonLabel = "" + capitalizedLang + ""; + } else if (notabs == null) { + var buttonLabel = "" + capitalizedLang + ""; + } else { + var buttonLabel = "" + } + tabBar.append( + '
  • ' + buttonLabel + '
  • ' + ); + }); + + codeSamples.first().addClass("active"); + tabBar.children("li").first().addClass("active"); + counter++; + }); + $("ul.nav-tabs a").click(function (e) { + // Toggling a tab should switch all tabs corresponding to the same language + // while retaining the scroll position + e.preventDefault(); + var scrollOffset = $(this).offset().top - $(document).scrollTop(); + $("." + $(this).attr('class')).tab('show'); + $(document).scrollTop($(this).offset().top - scrollOffset); + }); +} + +function makeCollapsable(elt, accordionClass, accordionBodyId, title) { + $(elt).addClass("accordion-inner"); + $(elt).wrap('
    ') + $(elt).wrap('
    ') + $(elt).wrap('
    ') + $(elt).parent().before( + '
    ' + + '' + + title + + '' + + '
    ' + ); +} + +// Enable "view solution" sections (for exercises) +function viewSolution() { + var counter = 0 + $("div.solution").each(function() { + var id = "solution_" + counter + makeCollapsable(this, "", id, + '' + + '' + "View Solution"); + counter++; + }); +} + +// A script to fix internal hash links because we have an overlapping top bar. +// Based on https://github.com/twitter/bootstrap/issues/193#issuecomment-2281510 +function maybeScrollToHash() { + console.log("HERE"); + if (window.location.hash && $(window.location.hash).length) { + console.log("HERE2", $(window.location.hash), $(window.location.hash).offset().top); + var newTop = $(window.location.hash).offset().top - 57; + $(window).scrollTop(newTop); + } +} + +$(function() { + codeTabs(); + viewSolution(); + + $(window).bind('hashchange', function() { + maybeScrollToHash(); + }); + + // Scroll now too in case we had opened the page on a hash, but wait a bit because some browsers + // will try to do *their* initial scroll after running the onReady handler. + $(window).load(function() { setTimeout(function() { maybeScrollToHash(); }, 25); }); +});