cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblot...@apache.org
Subject [3/3] docs commit: Finishing porting Richard's changes. Fixing UI on plugin page a bit.
Date Fri, 21 Aug 2015 22:55:20 GMT
Finishing porting Richard's changes. Fixing UI on plugin page a bit.


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

Branch: refs/heads/cordova-website
Commit: 786c1ab71df91023476b1d7fd1ae4ff576bc3e68
Parents: 89d0774
Author: Dmitry Blotsky <dmitry.blotsky@gmail.com>
Authored: Fri Aug 21 15:54:35 2015 -0700
Committer: Dmitry Blotsky <dmitry.blotsky@gmail.com>
Committed: Fri Aug 21 15:54:35 2015 -0700

----------------------------------------------------------------------
 www/plugins/index.html                | 103 +----------------------------
 www/static/css-src/_plugins.scss      |  23 +++++--
 www/static/plugins/app.js             |  10 +--
 www/static/plugins/platformbutton.jsx |   8 +--
 4 files changed, 31 insertions(+), 113 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/786c1ab7/www/plugins/index.html
----------------------------------------------------------------------
diff --git a/www/plugins/index.html b/www/plugins/index.html
index d135328..8d8c8ea 100644
--- a/www/plugins/index.html
+++ b/www/plugins/index.html
@@ -9,105 +9,8 @@ plugins_tab: true
 
 <!-- Main jumbotron for a primary marketing message or call to action -->
 <div class="container">
-    <div class="row">
-        <div class="col-sm-12 text-center">
-            <h1>Cordova Plugins</h1>
-        </div>
-    </div>
-    <div class="row">
-        <div class="col-sm-12">
-            <div class="plugins_search_container">
-                <div class="input-group">
-                    <input type="text" class="form-control" placeholder="Find a Plugin...">
-                    <span class="input-group-btn">
-                        <button class="btn btn-default" type="button"><span class="glyphicon
glyphicon-search"></span></button>
-                    </span>
-                </div>
-            </div>
-            <div class="plugins_links">
-                    <ul class="nav nav-justified">
-                    <li><a href="#"><span class="glyphicon glyphicon-plus"></span><i>&nbsp;</i>Contribute
Plugins</a></li>
-                    <li><a href="#"><span class="glyphicon glyphicon-question-sign"></span><i>&nbsp;</i>Plugin
Help</a></li>
-                    <li><a href="#"><span class="glyphicon glyphicon-alert"></span><i>&nbsp;</i>Plugin
Issue Tracker</a></li>
-                    </ul>
-            </div>
-            <!-- /input-group -->
-        </div>
-    </div>
-    <div class="row filter-by-platforms">
-        <div class="filter-by-platform-label"><span>Platform:</span></div>
-        <ul class="nav nav-pills filter-by-platform-filters">
-            <li role="presentation" class="active"><a href="#"><span class="glyphicon
glyphicon-ok"></span><i>&nbsp;</i>Android</a></li>
-            <li role="presentation" class="active"><a href="#"><span class="glyphicon
glyphicon-ok"></span><i>&nbsp;</i>iOS</a></li>
-            <li role="presentation" class="active"><a href="#"><span class="glyphicon
glyphicon-ok"></span><i>&nbsp;</i>Windows 10</a></li>
-            <li role="presentation"><a href="#">Blackberry</a></li>
-            <li role="presentation"><a href="#">Ubuntu</a></li>
-            <li role="presentation"><a href="#">Firefox OS</a></li>
-            <li role="presentation"><a href="#">WebOS</a></li>
-            <li role="presentation"><a href="#">Fire OS</a></li>
-        </ul>
-    </div>
-</div>
-<div class="container plugins-results-container">
-    <div class="container plugin-results-result">
-        <img src="{{ site.baseurl }}/static/img/copy-clipboard-icon.svg" class="plugins-copy-to-clipboard"/>
-        <div class="row">
-            <div class="col-sm-9">
-                <h2><a href="">cordova-plugin-android-idfa</a></h2>
-                <p class="version_and_author">v1.04 by <strong>praves</strong></p>
-            </div>       
-        </div>
-        <div class="row">
-            <div class="col-sm-8">
-                <p>Cordova Advertising ID (IDFA) Plugin for Android using Google Play
Services API Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat. </p>
-            </div>
-            <div class="col-sm-3 col-sm-offset-1">
-                <hr class="visible-xs results-divider-line">
-                <p class="license">License</p>
-                <p class="downloads"><strong>114</strong> downloads last
month</p>
-                <p class="last-updated">Last updated <strong>21 days ago</strong></p>
-            </div>
-        </div>
-    </div>
-    <div class="container plugin-results-result">
-        <img src="{{ site.baseurl }}/static/img/copy-clipboard-icon.svg" class="plugins-copy-to-clipboard"/>
-        <div class="row">
-            <div class="col-sm-9">
-                <h2><a href="">cordova-plugin-android-idfa</a></h2>
-                <p class="version_and_author">v1.04 by <strong>praves</strong></p>
-            </div>       
-        </div>
-        <div class="row">
-            <div class="col-sm-8">
-                <p>Cordova Advertising ID (IDFA) Plugin for Android using Google Play
Services API Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat. </p>
-            </div>
-            <div class="col-sm-3 col-sm-offset-1">
-                <hr class="visible-xs results-divider-line">
-                <p class="license">License</p>
-                <p class="downloads"><strong>114</strong> downloads last
month</p>
-                <p class="last-updated">Last updated <strong>21 days ago</strong></p>
-            </div>
-        </div>
-    </div> 
-    <div class="container plugin-results-result">
-        <img src="{{ site.baseurl }}/static/img/copy-clipboard-icon.svg" class="plugins-copy-to-clipboard"/>
-        <div class="row">
-            <div class="col-sm-9">
-                <h2><a href="">cordova-plugin-android-idfa</a></h2>
-                <p class="version_and_author">v1.04 by <strong>praves</strong></p>
-            </div>       
-        </div>
-        <div class="row">
-            <div class="col-sm-8">
-                <p>Cordova Advertising ID (IDFA) Plugin for Android using Google Play
Services API Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation
ullamco laboris nisi ut aliquip ex ea commodo consequat. </p>
-            </div>
-            <div class="col-sm-3 col-sm-offset-1">
-                <hr class="visible-xs results-divider-line">
-                <p class="license">License</p>
-                <p class="downloads"><strong>114</strong> downloads last
month</p>
-                <p class="last-updated">Last updated <strong>21 days ago</strong></p>
-            </div>
-        </div>
-    </div>     
+    <div id="container"></div>
+    <script src="/static/js/plugins.js"></script>
+    <script>App.start();</script>
 </div>
 <!-- /container -->

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/786c1ab7/www/static/css-src/_plugins.scss
----------------------------------------------------------------------
diff --git a/www/static/css-src/_plugins.scss b/www/static/css-src/_plugins.scss
index 06a8d29..54879a0 100644
--- a/www/static/css-src/_plugins.scss
+++ b/www/static/css-src/_plugins.scss
@@ -2,12 +2,11 @@
 	max-width:405px;
 	margin:auto;
 
-}
-button.btn {
-	color:white;
+	button.btn {
+		color:white;
+	}
 }
 .whatisplugin_box {
-
 	img {
 		float:left;
 			padding-right: 20px;
@@ -59,13 +58,27 @@ button.btn {
 }
 
 .filter-by-platform-label {
-	line-height:40px;
 	display: inline-block;
 	vertical-align: top;
+	line-height:40px;
+	margin-right: 1em;
 }
 
 .filter-by-platform-filters {
+	line-height:40px;
 	display: inline-block;
+	button.btn {
+		&.btn-primary {
+			background-color:$brand-primary;
+		}
+		&.btn-default {
+			background-color:$gray-10;
+			&:hover {
+				background-color: $brand-primary;
+				color: white;
+			}
+		}
+	}
 }
 
 /***

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/786c1ab7/www/static/plugins/app.js
----------------------------------------------------------------------
diff --git a/www/static/plugins/app.js b/www/static/plugins/app.js
index 5948833..7ed6dee 100755
--- a/www/static/plugins/app.js
+++ b/www/static/plugins/app.js
@@ -5,6 +5,8 @@ var React           = window.React = require('react'), // assign it to window
fo
     App             = {},
     SortDropdown = require('./sortdropdown.jsx');
 
+var INPUT_DELAY = 500; // in milliseconds
+
 var timer = null;
 var Constants = {
     DownloadCountBatch: 100,
@@ -71,7 +73,7 @@ var App = React.createClass({
 
             delay(function(){
                 App.updateURL(previousState.filterText, previousState.staticFilters['platforms']);
-            }, 2000 );
+            }, INPUT_DELAY);
 
             return {
                 staticFilters: previousState.staticFilters,
@@ -242,7 +244,7 @@ var App = React.createClass({
             return plugins;
         },
         updateURL: function(filterText, platformFilters) {
-            var query = "";
+            var query = "?";
             var stateObj = {};
             if(filterText) {
                 var filterTextLowerCase = filterText;
@@ -251,7 +253,7 @@ var App = React.createClass({
             }
 
             if(platformFilters.length > 0) {
-                if(!query) {
+                if(query === "?") {
                     query = "?platforms=";
                 } else {
                     query = query + "&platforms=";
@@ -263,7 +265,7 @@ var App = React.createClass({
                 stateObj.platforms = platformFilters;
             }
 
-            window.history.pushState(stateObj, "", query);
+            window.history.replaceState(stateObj, "", query);
             ga('send', 'pageview', '/index.html' + query);
         },
     },

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/786c1ab7/www/static/plugins/platformbutton.jsx
----------------------------------------------------------------------
diff --git a/www/static/plugins/platformbutton.jsx b/www/static/plugins/platformbutton.jsx
index 0002284..0bcd42f 100755
--- a/www/static/plugins/platformbutton.jsx
+++ b/www/static/plugins/platformbutton.jsx
@@ -19,17 +19,17 @@ var PlatformButton = React.createClass({
         if(this.state.isActive) {
             return (
                 <li role="presentation" className="active" onClick={this.onClick}>
-                    <a href="#">
+                    <button className="btn btn-primary">
                         <span className="glyphicon glyphicon-ok"></span><i>&nbsp;</i>{this.props.platform}
-                    </a>
+                    </button>
                 </li>
             );
         } else {
             return (
                 <li role="presentation" onClick={this.onClick}>
-                    <a href="#">
+                    <button className="btn btn-default">
                         {this.props.platform}
-                    </a>
+                    </button>
                 </li>
             );
         }


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


Mime
View raw message