You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by db...@apache.org on 2015/09/10 02:40:13 UTC

docs commit: Making scripts deferred and moving them to the top. Fixed some indenting.

Repository: cordova-docs
Updated Branches:
  refs/heads/cordova-website 2a691c517 -> da06b8b5d


Making scripts deferred and moving them to the top. Fixed some indenting.


Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/da06b8b5
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/da06b8b5
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/da06b8b5

Branch: refs/heads/cordova-website
Commit: da06b8b5d13a25ee9a9dee0b81f28ce46ebd70ed
Parents: 2a691c5
Author: Dmitry Blotsky <dm...@gmail.com>
Authored: Wed Sep 9 17:40:06 2015 -0700
Committer: Dmitry Blotsky <dm...@gmail.com>
Committed: Wed Sep 9 17:40:06 2015 -0700

----------------------------------------------------------------------
 gulpfile.js                    | 12 ++++-
 www/_includes/footer.html      | 11 -----
 www/_includes/head.html        |  3 ++
 www/_includes/links.html       |  0
 www/_includes/scripts.html     |  9 ++++
 www/_includes/twitterFeed.html | 30 ++++++------
 www/_layouts/cordova.html      |  1 -
 www/_layouts/docs.html         |  2 +
 www/blog/index.html            | 96 ++++++++++++++++++-------------------
 www/plugins/index.html         |  9 ++--
 www/static/js/main.js          |  6 +--
 www/static/js/plugins-page.js  |  3 ++
 12 files changed, 97 insertions(+), 85 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/da06b8b5/gulpfile.js
----------------------------------------------------------------------
diff --git a/gulpfile.js b/gulpfile.js
index e019bad..aba3800 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -51,7 +51,7 @@ var PLUGINS_FILE_NAME = "plugins.js";
 var PLUGINS_FILE      = path.join(JS_DIR, PLUGINS_FILE_NAME);
 var PLUGINS_SRC_FILE  = path.join(PLUGINS_SRC_DIR, "app.js");
 
-// default variables
+// global variables
 var prod = false;
 
 // passed options
@@ -84,9 +84,17 @@ function remove(path) {
     fse.removeSync(path);
 }
 
+function getJekyllExecutable() {
+    if (process.platform === 'win32') {
+        return 'jekyll.bat';
+    } else {
+        return 'jekyll';
+    }
+}
+
 function jekyllBuild(done) {
     var flags  = prod ? PROD_FLAGS : DEV_FLAGS;
-    var jekyll = (process.platform === 'darwin') ? 'jekyll' : 'jekyll.bat';
+    var jekyll = getJekyllExecutable();
     exec(jekyll, ["build"].concat(flags), done);
 }
 

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/da06b8b5/www/_includes/footer.html
----------------------------------------------------------------------
diff --git a/www/_includes/footer.html b/www/_includes/footer.html
index 08d718f..5402609 100644
--- a/www/_includes/footer.html
+++ b/www/_includes/footer.html
@@ -55,7 +55,6 @@
                     Learn More
                 </a>
                 <p style="padding-top:20px"> <a href="https://twitter.com/apachecordova" class="twitter-follow-button" data-show-count="false">Follow @apachecordova</a></p>
-                <script async defer src="http://slack.cordova.io/slackin.js"></script>    
             </div>
         </div>
         <p class="copyright_text">
@@ -65,13 +64,3 @@
         <a class="closing" href="#top"></a>
     </div>
 </footer>
-
-<!-- JS -->
-<script type="text/javascript" src="{{ site.baseurl }}/static/js/lib/jquery-2.1.1.min.js"></script>
-<script type="text/javascript" src="{{ site.baseurl }}/static/js/lib/bootstrap.min.js"></script>
-<script type="text/javascript" src="{{ site.baseurl }}/static/js/lib/toc.min.js"></script>
-<script type="text/javascript" src="{{ site.baseurl }}/static/js/lib/ZeroClipboard.js"></script>
-<script type="text/javascript" src="{{ site.baseurl }}/static/js/docs.js"></script>
-<script type="text/javascript" src="{{ site.baseurl }}/static/js/main.js"></script>
-<script type="text/javascript" src="{{ site.baseurl }}/static/js/index.js"></script>
-<script type="text/javascript" src="{{ site.baseurl }}/static/js/twitter.js"></script>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/da06b8b5/www/_includes/head.html
----------------------------------------------------------------------
diff --git a/www/_includes/head.html b/www/_includes/head.html
index a43e348..c8710c5 100644
--- a/www/_includes/head.html
+++ b/www/_includes/head.html
@@ -22,4 +22,7 @@
     <script type="text/javascript">
         var disqus_developer = 1; // this would set it to developer mode
     </script>
+
+    <!-- JS -->
+    {% include scripts.html %}
 </head>

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/da06b8b5/www/_includes/links.html
----------------------------------------------------------------------
diff --git a/www/_includes/links.html b/www/_includes/links.html
deleted file mode 100644
index e69de29..0000000

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/da06b8b5/www/_includes/scripts.html
----------------------------------------------------------------------
diff --git a/www/_includes/scripts.html b/www/_includes/scripts.html
new file mode 100644
index 0000000..2e3171d
--- /dev/null
+++ b/www/_includes/scripts.html
@@ -0,0 +1,9 @@
+<script type="text/javascript" src="{{ site.baseurl }}/static/js/lib/jquery-2.1.1.min.js" defer></script>
+<script type="text/javascript" src="{{ site.baseurl }}/static/js/lib/bootstrap.min.js" defer></script>
+<script type="text/javascript" src="{{ site.baseurl }}/static/js/lib/toc.min.js" defer></script>
+<script type="text/javascript" src="{{ site.baseurl }}/static/js/lib/ZeroClipboard.js" defer></script>
+<script type="text/javascript" src="{{ site.baseurl }}/static/js/main.js" defer></script>
+<script type="text/javascript" src="{{ site.baseurl }}/static/js/index.js" defer></script>
+<script type="text/javascript" src="{{ site.baseurl }}/static/js/twitter.js" defer></script>
+
+<script src="http://slack.cordova.io/slackin.js" defer></script>

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/da06b8b5/www/_includes/twitterFeed.html
----------------------------------------------------------------------
diff --git a/www/_includes/twitterFeed.html b/www/_includes/twitterFeed.html
index 4d24486..4c9e8e6 100644
--- a/www/_includes/twitterFeed.html
+++ b/www/_includes/twitterFeed.html
@@ -1,18 +1,20 @@
 <a class="twitter-timeline" data-dnt="true" href="https://twitter.com/apachecordova" data-widget-id="629424968011386884">Tweets by @apachecordova</a>
 
-<script>window.twttr = (function(d, s, id) {
-  var js, fjs = d.getElementsByTagName(s)[0],
-    t = window.twttr || {};
-  if (d.getElementById(id)) return t;
-  js = d.createElement(s);
-  js.id = id;
-  js.src = "https://platform.twitter.com/widgets.js";
-  fjs.parentNode.insertBefore(js, fjs);
+<script>
+window.twttr = (function(d, s, id) {
+    var js, fjs = d.getElementsByTagName(s)[0],
+        t = window.twttr || {};
+    if (d.getElementById(id)) return t;
+    js = d.createElement(s);
+    js.id = id;
+    js.src = "https://platform.twitter.com/widgets.js";
+    fjs.parentNode.insertBefore(js, fjs);
 
-  t._e = [];
-  t.ready = function(f) {
-    t._e.push(f);
-  };
+    t._e = [];
+    t.ready = function(f) {
+        t._e.push(f);
+    };
 
-  return t;
-}(document, "script", "twitter-wjs"));</script>
+    return t;
+}(document, "script", "twitter-wjs"));
+</script>

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/da06b8b5/www/_layouts/cordova.html
----------------------------------------------------------------------
diff --git a/www/_layouts/cordova.html b/www/_layouts/cordova.html
index 1400508..69c27fd 100644
--- a/www/_layouts/cordova.html
+++ b/www/_layouts/cordova.html
@@ -8,7 +8,6 @@ analytics_id: UA-64283057-3
 <body>
     {% include header.html %}
     {{ content }}
-    {% include links.html %}
     {% include footer.html %}
     {% include analytics.html %}
 </body>

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/da06b8b5/www/_layouts/docs.html
----------------------------------------------------------------------
diff --git a/www/_layouts/docs.html b/www/_layouts/docs.html
index 4985756..a8c41ab 100644
--- a/www/_layouts/docs.html
+++ b/www/_layouts/docs.html
@@ -158,3 +158,5 @@ analytics_id: UA-64283057-1
 
     </div>
 </div>
+
+<script type="text/javascript" src="{{ site.baseurl }}/static/js/docs.js" defer></script>

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/da06b8b5/www/blog/index.html
----------------------------------------------------------------------
diff --git a/www/blog/index.html b/www/blog/index.html
index a4f11a4..3bf1f95 100644
--- a/www/blog/index.html
+++ b/www/blog/index.html
@@ -4,60 +4,60 @@ title: Apache Cordova Blog
 ---
 
 <script>
-window.onload = function(){
-  setTimeout(function(){
-    var lastPostTime = new Date("{{ site.posts[0].date | date_to_rfc822 }}").getTime();
-    setCookie("visitTime", lastPostTime, 365);
-  }, 2000);
-};
+    window.onload = function(){
+        setTimeout(function(){
+            var lastPostTime = new Date("{{ site.posts[0].date | date_to_rfc822 }}").getTime();
+          setCookie("visitTime", lastPostTime, 365);
+        }, 2000);
+    };
 </script>
 
 <div class="blog">
-  <div id="content" class="container">
-     <div class="row">
-        <div class="col-sm-8 blog-list">
-          <div class="blogHeader">
-            <h1>Blog</h1>
-            <div>
-              <img src="{{ site.baseurl }}/static/img/subscribe.png">
-              <a href="{{ site.baseurl }}{{ site.rss_path }}">RSS Feed</a>
-            </div>
-          </div>
-          <ul class="posts">
-              {% for post in site.posts %}
-              <li>
-                <header>
-                  <div class="adorner" blogTime="{{ post.date | date_to_rfc822 }}"></div>
-                  <div>
-                    <div class="title"><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></div>
+    <div id="content" class="container">
+        <div class="row">
+            <div class="col-sm-8 blog-list">
+                <div class="blogHeader">
+                    <h1>Blog</h1>
                     <div>
-                      <span class="date">{{ post.date | date_to_string }}</span>
-                      <span> - by </span>
-                      <span class="author">
-                        {% if post.author.url %}
-                          <a href="{{ post.author.url }}">{{ post.author.name }}</a>
-                        {% else %}
-                          {{ post.author.name }}
-                        {% endif %}  
-                      </span>
-                      <a class="comment" href="{{ site.baseurl }}{{ post.url }}#disqus_thread">Comments</a>
+                        <img src="{{ site.baseurl }}/static/img/subscribe.png">
+                        <a href="{{ site.baseurl }}{{ site.rss_path }}">RSS Feed</a>
                     </div>
-                  </div>
-                </header>
-                <section class="post-excerpt">
-                  <p>{{ post.excerpt }}</p>
-                  <div><a href="{{ site.baseurl }}{{ post.url }}">More...</a></div>
-                </section>
-              </li>
-              {% endfor %}
-          </ul>
-          <!-- <a href="http://feed1.w3.org/check.cgi?url={{ site.baseurl }}{{ site.rss_path }}"><img src="{{ site.baseurl }}/static/img/valid-rss-rogers.png" alt="[Valid RSS]" title="Validate my RSS feed" /></a> -->
-        </div>
-        <div class="col-sm-4 social-container">
-            {% include twitterFeed.html %}
+                </div>
+                <ul class="posts">
+                    {% for post in site.posts %}
+                    <li>
+                        <header>
+                            <div class="adorner" blogTime="{{ post.date | date_to_rfc822 }}"></div>
+                            <div>
+                                <div class="title"><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></div>
+                                <div>
+                                    <span class="date">{{ post.date | date_to_string }}</span>
+                                    <span> - by </span>
+                                    <span class="author">
+                                        {% if post.author.url %}
+                                            <a href="{{ post.author.url }}">{{ post.author.name }}</a>
+                                        {% else %}
+                                            {{ post.author.name }}
+                                        {% endif %}
+                                    </span>
+                                    <a class="comment" href="{{ site.baseurl }}{{ post.url }}#disqus_thread"></a>
+                                </div>
+                            </div>
+                        </header>
+                        <section class="post-excerpt">
+                            <p>{{ post.excerpt }}</p>
+                            <div><a href="{{ site.baseurl }}{{ post.url }}">More...</a></div>
+                        </section>
+                    </li>
+                    {% endfor %}
+                </ul>
+                <!-- <a href="http://feed1.w3.org/check.cgi?url={{ site.baseurl }}{{ site.rss_path }}"><img src="{{ site.baseurl }}/static/img/valid-rss-rogers.png" alt="[Valid RSS]" title="Validate my RSS feed" /></a> -->
+            </div>
+            <div class="col-sm-4 social-container">
+                {% include twitterFeed.html %}
+            </div>
         </div>
-     </div>
- </div>
+    </div>
 </div>
 
 {% include comment_count.html %}

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/da06b8b5/www/plugins/index.html
----------------------------------------------------------------------
diff --git a/www/plugins/index.html b/www/plugins/index.html
index 8a6c142..e7a5739 100644
--- a/www/plugins/index.html
+++ b/www/plugins/index.html
@@ -5,13 +5,10 @@ plugins_tab: true
 description: Search here for Apache Cordova plugins published on NPM.
 ---
 
-<!-- REMOVE THIS LINK BEFORE PUBLISHING.  This is just for IntelliSense while coding -->
-<!-- <link rel="stylesheet" type="text/css" href="static/css/lib/bootstrap.css"/> -->
-
 <!-- Main jumbotron for a primary marketing message or call to action -->
 <div class="container">
     <div id="container"></div>
-    <script src="{{ site.baseurl }}/static/js/plugins.js"></script>
-    <script>App.start();</script>
 </div>
-<!-- /container -->
+
+<script type="text/javascript" src="{{ site.baseurl }}/static/js/plugins.js" defer></script>
+<script type="text/javascript" src="{{ site.baseurl }}/static/js/plugins-page.js" defer></script>

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/da06b8b5/www/static/js/main.js
----------------------------------------------------------------------
diff --git a/www/static/js/main.js b/www/static/js/main.js
index dd06684..856378f 100644
--- a/www/static/js/main.js
+++ b/www/static/js/main.js
@@ -1,5 +1,5 @@
-$(function(){
-	
+$(document).ready(function () {
+
 	function setHeroHeight() {
 		console.log('IT works!');
 		// resize the hero to the innerWidth of the window
@@ -13,5 +13,5 @@ $(function(){
 	}
 	setHeroHeight();
 	$(window).resize(function() { setHeroHeight() });
-	
+
  });

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/da06b8b5/www/static/js/plugins-page.js
----------------------------------------------------------------------
diff --git a/www/static/js/plugins-page.js b/www/static/js/plugins-page.js
new file mode 100644
index 0000000..7fed270
--- /dev/null
+++ b/www/static/js/plugins-page.js
@@ -0,0 +1,3 @@
+$(document).ready(function () {
+    App.start();
+});


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org