cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblot...@apache.org
Subject docs commit: CB-10020: Indicated the latest version in the docs version dropdown. This closes #424.
Date Wed, 18 Nov 2015 21:51:04 GMT
Repository: cordova-docs
Updated Branches:
  refs/heads/master c9175990c -> 1d69fcab9


CB-10020: Indicated the latest version in the docs version dropdown. This closes #424.


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

Branch: refs/heads/master
Commit: 1d69fcab9263b847693450139779db963ae7b0ca
Parents: c917599
Author: riknoll <richard.b.knoll@gmail.com>
Authored: Mon Nov 16 17:49:48 2015 -0800
Committer: Dmitry Blotsky <dmitry.blotsky@gmail.com>
Committed: Wed Nov 18 13:49:26 2015 -0800

----------------------------------------------------------------------
 www/_layouts/docs.html        | 14 ++++++++++++--
 www/static/css-src/_docs.scss |  6 ++++++
 2 files changed, 18 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/1d69fcab/www/_layouts/docs.html
----------------------------------------------------------------------
diff --git a/www/_layouts/docs.html b/www/_layouts/docs.html
index be462bd..c273711 100644
--- a/www/_layouts/docs.html
+++ b/www/_layouts/docs.html
@@ -115,6 +115,9 @@ analytics_id: UA-64283057-1
             <div class="dropdown">
                 <button class="btn btn-default dropdown-toggle" type="button" id="versionDropdown"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
                     {{ page.version }}
+                    {% if page.version == site.latest_docs_version %}
+                        (Latest)
+                    {% endif %}
                     <span class="caret"></span>
                 </button>
                 <ul class="dropdown-menu" aria-labelledby="versionDropdown">
@@ -125,6 +128,13 @@ analytics_id: UA-64283057-1
                         {% capture current_version_path %}/docs/{{ page.language }}/{{ page.version
}}/{% endcapture %}
                         {% capture target_version_path %}/docs/{{ page.language }}/{{ version
}}/{% endcapture %}
 
+                        {% capture version_entry_string %}
+                            {{ version }}
+                            {% if version == site.latest_docs_version %}
+                                (Latest)
+                            {% endif %}
+                        {% endcapture %}
+
                         <!--
                         Replace only the version part of the URI, thereby
                         redirecting to the same page in the other version.
@@ -138,10 +148,10 @@ analytics_id: UA-64283057-1
                         <a href="{{ site.baseurl }}{{ target_version_url }}">
                             {% if page.version == version %}
                                 <span class="selected">
-                                    {{ version }}
+                                    {{ version_entry_string }}
                                 </span>
                             {% else %}
-                                {{ version }}
+                                {{ version_entry_string }}
                             {% endif %}
                         </a>
                     </li>

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/1d69fcab/www/static/css-src/_docs.scss
----------------------------------------------------------------------
diff --git a/www/static/css-src/_docs.scss b/www/static/css-src/_docs.scss
index 965397c..012ac25 100644
--- a/www/static/css-src/_docs.scss
+++ b/www/static/css-src/_docs.scss
@@ -100,6 +100,12 @@
             background-color: rgb(191, 191, 191);
         }
     }
+
+    .dropdown-menu {
+        left: inherit;
+        right: 0;
+    }
+
     .content-header .edit {
         margin-right: 0.5em;
         margin-left: 0.5em;


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


Mime
View raw message