You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ad...@apache.org on 2016/06/17 23:39:38 UTC
[53/63] [abbrv] incubator-mynewt-site git commit: chooser for doc
version
chooser for doc version
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/commit/ab6b5df3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/tree/ab6b5df3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/diff/ab6b5df3
Branch: refs/heads/develop
Commit: ab6b5df3bc412b27361de3f5949f05e1d8f49028
Parents: 9542ac9
Author: Gavin Jefferies <ga...@runtime.io>
Authored: Thu Jun 16 17:24:23 2016 -0700
Committer: Gavin Jefferies <ga...@runtime.io>
Committed: Thu Jun 16 17:58:53 2016 -0700
----------------------------------------------------------------------
custom-theme/breadcrumbs.html | 2 +-
custom-theme/choose_doc_version.html | 10 ++++++++++
custom-theme/css/v2.css | 5 +++++
custom-theme/nav.html | 2 +-
custom-theme/toc.html | 1 +
mkdocs.yml | 1 +
6 files changed, 19 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/ab6b5df3/custom-theme/breadcrumbs.html
----------------------------------------------------------------------
diff --git a/custom-theme/breadcrumbs.html b/custom-theme/breadcrumbs.html
index 32c8476..43f96de 100644
--- a/custom-theme/breadcrumbs.html
+++ b/custom-theme/breadcrumbs.html
@@ -1,6 +1,6 @@
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs pull-right">
- <li><a href="/documentation/">Docs</a></li>
+ <li><a href="/{{ config.extra.version }}/{{ config.extra.doc_path }}">Docs</a></li>
{% if current_page %}
{% for doc in current_page.ancestors %}
{% if doc.children[0].url and doc.children[0].url != current_page.url %}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/ab6b5df3/custom-theme/choose_doc_version.html
----------------------------------------------------------------------
diff --git a/custom-theme/choose_doc_version.html b/custom-theme/choose_doc_version.html
new file mode 100644
index 0000000..67f857f
--- /dev/null
+++ b/custom-theme/choose_doc_version.html
@@ -0,0 +1,10 @@
+<select class="form-control" onchange="if (this.value) window.location.href=this.value">
+ {% for version in config.extra.versions %}
+ <option
+ value="/{{ version.branch }}/{{ config.extra.doc_path }}"
+ {% if config.extra.version == version.branch %}selected="selected"{% endif %}
+ >
+ Version: {{ version.label }}{% if version.latest %} (latest){% endif %}
+ </option>
+ {% endfor %}
+</select>
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/ab6b5df3/custom-theme/css/v2.css
----------------------------------------------------------------------
diff --git a/custom-theme/css/v2.css b/custom-theme/css/v2.css
index f6e84ee..9760e59 100644
--- a/custom-theme/css/v2.css
+++ b/custom-theme/css/v2.css
@@ -85,3 +85,8 @@
background-color: #eee;
border-right: 1px solid black;
}
+
+.v2-sidebar .toc-nav .doc-version {
+ padding-right: 15px;
+ padding-bottom: 10px;
+}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/ab6b5df3/custom-theme/nav.html
----------------------------------------------------------------------
diff --git a/custom-theme/nav.html b/custom-theme/nav.html
index d063068..adfd702 100644
--- a/custom-theme/nav.html
+++ b/custom-theme/nav.html
@@ -37,7 +37,7 @@
<a href="/about/">About</a>
</li>
<li {{ docs_are_active(current_page) }}>
- <a href="/os/introduction/">Documentation</a>
+ <a href="/{{ config.extra.version }}/{{ config.extra.doc_path }}">Documentation</a>
</li>
<li {{ active_nav(current_page, 'Download') }}>
<a href="/download/">Download</a>
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/ab6b5df3/custom-theme/toc.html
----------------------------------------------------------------------
diff --git a/custom-theme/toc.html b/custom-theme/toc.html
index f5417d5..8fa5fa4 100644
--- a/custom-theme/toc.html
+++ b/custom-theme/toc.html
@@ -10,6 +10,7 @@
</div>
</div>
<ul class="toc-nav">
+ <li class="doc-version">{% include 'choose_doc_version.html' %}</li>
{% for nav_item in nav %}
{% if 'Documentation' in nav_item.title or 'Appendix' in nav_item.title %}
{% include 'nested_toc.html' %}
http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/ab6b5df3/mkdocs.yml
----------------------------------------------------------------------
diff --git a/mkdocs.yml b/mkdocs.yml
index 531dd74..0c6d58f 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -377,6 +377,7 @@ extra:
- label: '0.8.0-b2'
branch: 'v0_8_0_b2'
latest: True
+ doc_path: 'os/introduction'
chapters:
Chapter 1 - Get Started: 'The chapter organization is outlined below. Each chapter will include one or more tutorials for hands-on experience with the material in each chapter.'
Chapter 2 - Get Acclimated: 'Delves deeper into the concepts crucial to the software development effort.'