cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblot...@apache.org
Subject [45/45] docs commit: Fixing scripts and smooth scrolling, as well as miscellanous formatting and logic.
Date Fri, 28 Aug 2015 00:39:29 GMT
Fixing scripts and smooth scrolling, as well as miscellanous formatting and logic.


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

Branch: refs/heads/cordova-website
Commit: fb628f63385ff37f89e067bec71b2769f87ba8ee
Parents: 0ada467
Author: Dmitry Blotsky <dmitry.blotsky@gmail.com>
Authored: Thu Aug 27 17:38:35 2015 -0700
Committer: Dmitry Blotsky <dmitry.blotsky@gmail.com>
Committed: Thu Aug 27 17:38:35 2015 -0700

----------------------------------------------------------------------
 www/_includes/footer.html            |  1 +
 www/_includes/tools_and_samples.html | 12 +++-----
 www/index.html                       | 49 ++-----------------------------
 www/static/js/index.js               | 36 ++++++++++++++++++++++-
 4 files changed, 43 insertions(+), 55 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/fb628f63/www/_includes/footer.html
----------------------------------------------------------------------
diff --git a/www/_includes/footer.html b/www/_includes/footer.html
index 96b124c..7bc1b85 100644
--- a/www/_includes/footer.html
+++ b/www/_includes/footer.html
@@ -68,6 +68,7 @@
 <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>

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/fb628f63/www/_includes/tools_and_samples.html
----------------------------------------------------------------------
diff --git a/www/_includes/tools_and_samples.html b/www/_includes/tools_and_samples.html
index 22cab92..d467d9c 100644
--- a/www/_includes/tools_and_samples.html
+++ b/www/_includes/tools_and_samples.html
@@ -1,4 +1,3 @@
-{% if site.data.tools | size > 0 %}
 <div class="container">
     <div class="row showcase_section_intro">
         <div class="col-md-12 text-center">
@@ -21,7 +20,7 @@
                     {% endif %}
                 </p>
                 <p>
-                    {{ tool.description | truncatewords:25 }}
+                    {{ tool.description | truncatewords:50 }}
                 </p>
             </div>
         </div>
@@ -30,19 +29,17 @@
     <div class="row"> <!-- Add yours or see more links -->
         <div class="col-sm-12">
             <div class="pull-right add_seemore_links">
-                <a href="#">Add your tool</a>
+                <a href="https://github.com/apache/cordova-docs/#adding-a-tool-or-a-sample-app">Add
your tool</a>
             </div>
         </div>
     </div>
 </div>
-{% endif %}
 
-{% if site.data.sample-apps | size > 0 %}
 <div class="container">
     <div class="row showcase_section_intro">
         <div class="col-md-12 text-center">
             <h1>Sample Cordova Apps</h1>
-            <h2>See examples how to access native device APIs and more</h2>
+            <h2>See examples of how to access native device APIs and more</h2>
         </div>
     </div>
     <div class="row cordova_tools_gallery">
@@ -67,7 +64,7 @@
     <div class="row">
         <div class="col-sm-12">
             <div class="pull-right add_seemore_links">
-                <a href="#">Add your app</a>
+                <a href="https://github.com/apache/cordova-docs/#adding-a-tool-or-a-sample-app">Add
your app</a>
             </div>
         </div>
     </div>
@@ -77,4 +74,3 @@
         </p>
     </div>
 </div>
-{% endif %}

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/fb628f63/www/index.html
----------------------------------------------------------------------
diff --git a/www/index.html b/www/index.html
index bfaab6e..ab56fb6 100644
--- a/www/index.html
+++ b/www/index.html
@@ -75,7 +75,7 @@ permalink: /
         </div>
         <div class="col-md-7">
             <h2>Installing Cordova</h2>
-            <p>Cordova command-line runs on <a href="http://nodejs.org/">Node.js</a>
and available on <a href="https://npmjs.org/package/cordova">NPM</a>. Follow <a
href="{{ site.baseurl }}/docs/en/edge/guide_platforms_index.md.html#Platform%20Guides">platform
specific guides</a> to install additional platform dependencies. Open a command prompt
or Terminal, and type <code>npm install -g cordova</code></p>
+            <p>Cordova command-line runs on <a href="http://nodejs.org/">Node.js</a>
and is available on <a href="https://npmjs.org/package/cordova">NPM</a>. Follow
<a href="{{ site.baseurl }}/docs/en/edge/guide/platforms/">platform specific guides</a>
to install additional platform dependencies. Open a command prompt or Terminal, and type <code>npm
install -g cordova</code></p>
         </div>
         <div class="col-md-4">
             <div class="well_code">
@@ -153,10 +153,10 @@ permalink: /
                     <a href="{{ site.baseurl }}/docs/en/edge/">Read the docs</a>
                 </li>
                 <li>
-                    <a href="{{ site.baseurl }}/docs/en/edge/guide/cli/">Add a Plugin</a>
+                    <a href="{{ site.baseurl }}/docs/en/edge/guide/cli/#add-plugin-features">Add
a Plugin</a>
                 </li>
                 <li>
-                    <a href="{{ site.baseurl }}/docs/en/edge/guide/cli/#add-plugin-features">Add
Icons and Splash Screen</a>
+                    <a href="{{ site.baseurl }}/docs/en/edge/config_ref/images.html">Add
Icons and Splash Screen</a>
                 </li>
                 <li>
                     <a href="{{ site.baseurl }}/docs/en/edge/config_ref/">Configure
Your App</a>
@@ -202,46 +202,3 @@ permalink: /
 
 </div><!-- /container-fluid -->
 
-<!-- Bootstrap core JavaScript
-================================================== -->
-<!-- Placed at the end of the document so the pages load faster -->
-<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
-<script src="../../dist/js/bootstrap.min.js"></script>
-<!-- IE10 viewport hack for Surface/desktop Windows 8 bug -->
-<script src="../../assets/js/ie10-viewport-bug-workaround.js"></script>
-<script>
-        //Smooth scroll to anchor links
-    	$("#navbar ul li a[href^='/#']").on('click', function(e) {
-		// prevent default anchor click behavior
-		console.log('Scrolled to where you asked');
-		e.preventDefault();
-
-		// store hash
-		var hash = this.hash;
-
-		// animate
-		$('html, body').animate({
-			scrollTop: $(hash).offset().top
-			}, 300, function(){
-
-			// when done, add hash to url
-			// (default click behaviour)
-			window.location.hash = hash;
-			});
-
-	});
-</script>
-<script src="{{site.baseurl}}/static/js/lib/ZeroClipboard.js"></script>
-<script>
-    var addCopyText = function(elementId, copyText) {
-        new ZeroClipboard(document.getElementById(elementId))
-            .on("copy", function(event) {
-                event.clipboardData.setData("text/plain", copyText);
-            });
-    }
-
-    addCopyText("copy-npm-install", "npm install -g cordova");
-    addCopyText("copy-cordova-create", "cordova create MyApp");
-    addCopyText("copy-cordova-platform-add", "cd MyApp\ncordova platform add browser");
-    addCopyText("copy-cordova-run", "cordova run browser");
-</script>

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/fb628f63/www/static/js/index.js
----------------------------------------------------------------------
diff --git a/www/static/js/index.js b/www/static/js/index.js
index a6abc2c..5578cfb 100644
--- a/www/static/js/index.js
+++ b/www/static/js/index.js
@@ -96,6 +96,8 @@ function checkNotification() {
 }
 
 $(document).ready(function () {
+
+    // code for blog badge
     $('.adorner').each(function(i) {
         var blog_time = new Date($(this).attr('blogTime')).getTime();
         if(lastVisit != "" && blog_time > lastVisit) {
@@ -103,8 +105,40 @@ $(document).ready(function () {
         }
     });
     var new_blog_count = checkNotification();
-    if(new_blog_count) {
+    if (new_blog_count) {
         document.getElementById("new_blog_count").innerHTML = new_blog_count;
     }
 
+    // code for copy text
+    var addCopyText = function(elementId, copyText) {
+        new ZeroClipboard(document.getElementById(elementId))
+            .on("copy", function(event) {
+                event.clipboardData.setData("text/plain", copyText);
+            });
+    }
+    addCopyText("copy-npm-install", "npm install -g cordova");
+    addCopyText("copy-cordova-create", "cordova create MyApp");
+    addCopyText("copy-cordova-platform-add", "cd MyApp\ncordova platform add browser");
+    addCopyText("copy-cordova-run", "cordova run browser");
+
+    // Smooth scroll to anchor links
+    $("a[href^='#']").on('click', function(e) {
+
+        // prevent default anchor click behavior
+        console.log('Scrolled to where you asked');
+        e.preventDefault();
+
+        // store hash
+        var hash = this.hash;
+
+        // animate
+        $('html, body').animate({
+            scrollTop: $(hash).offset().top
+            }, 300, function(){
+
+            // when done, add hash to url
+            // (default click behaviour)
+            window.location.hash = hash;
+        });
+    });
 });


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


Mime
View raw message