Adds links in sidebar nav that go to docs landing page

- Doesn't implement dyanmic toc but gives basis for improvements.

Partial-bug: 1422454
Change-Id: I6f7aff1bf22e8985fe24e3c7b93d725b92578fe5
This commit is contained in:
Anne Gentle 2015-03-01 23:11:10 -06:00
parent 751ec9c58e
commit aa3ad86eb5
7 changed files with 19 additions and 29 deletions

View File

@ -14,10 +14,7 @@ The demo documentation provides example markup for looking at the expected outpu
The project aims for simple implementation, massive scalability, and a rich set
of features. Cloud computing experts from around the world contribute to the project.
Here's an example configuration.
.. code-block:: ini
:linenos:
Here's an example configuration::
[DEFAULT]
...

View File

@ -1,18 +0,0 @@
<div class="col-lg-3 col-md-3 col-sm-3">
<div class="dropdown docs-dropdown">
<a data-toggle="dropdown" href="#">More Releases &amp; Languages <i class="fa fa-caret-down fa-3"></i></a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
<li role="presentation" class="dropdown-header">Releases</li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="/trunk">In progress (master branch)</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="/juno">Juno (current release)</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="/icehouse">Icehouse</a></li>
<li role="presentation" class="dropdown-header">Languages</li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="/ja">日本語 (Japanese)</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="/de">Deutsch (German)</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="/fr">Français (French)</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="/pt_BR">Português (Portuguese)</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="/zh_CN">简体中文 (Simplified Chinese)</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="/ko_KR">한국의 (Korean)</a></li>
</ul>
</div>
</div>

View File

@ -74,8 +74,8 @@
</div>
</div>
</div>
{% include 'docsreleases.html' %}
{% include 'sidebartoc.html' %}
</div>
</div>
<!-- End Page Content -->

View File

@ -1,5 +1,5 @@
<!-- jQuery Version 1.11.0 -->
<script type="text/javascript" src="{{pathto('_static/js/jquery-1.11.0.js', 1)}}"></script>
<script type="text/javascript" src="{{pathto('_static/js/jquery-1.11.2.js', 1)}}"></script>
<!-- Bootstrap Core JavaScript -->
<script type="text/javascript" src="{{pathto('_static/js/bootstrap.min.js', 1)}}"></script>
@ -27,4 +27,4 @@
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script>
</script>

View File

@ -30,7 +30,7 @@ Search</div>
<a class="docs-sidebar-section-title" href="http://docs.openstack.org/index.html#configuration-guides"><h4>Configuration Guides</h4></a>
</div>
<div class="docs-sidebar-section" id="operations-guides">
<a class="docs-sidebar-section-title"><h4>Operations Guides</h4></a>
<a class="docs-sidebar-section-title" href="http://docs.openstack.org/openstack-ops/content/"><h4>Operations Guide</h4></a>
</div>
<div class="docs-sidebar-section" id="api-guides">
<a class="docs-sidebar-section-title" href="http://docs.openstack.org/index.html#api-guides"><h4>API Guides</h4></a>
@ -49,4 +49,4 @@ Search</div>
{% endif %}
{% endif %}
</div>
</div>
</div>

View File

@ -2,9 +2,16 @@
$(".docs-sidebar-section-title").click(function () {
$('.docs-sidebar-section').not(this).closest('.docs-sidebar-section').removeClass('active');
$(this).closest('.docs-sidebar-section').toggleClass('active');
event.preventDefault();
// Bug #1422454
// Commenting out next line, the default behavior which was preventing links
// from working.
// event.preventDefault();
});
/* Bug #1422454
The toggle functions below enable the expand/collapse, but for now
there's no easy way to get deeper links from other guides. So,
commenting both toggle functions out.
// Toggle 1st sub-sections
$(".docs-sidebar-section ol lh").click(function () {
$('.docs-sidebar-section ol').not(this).closest('.docs-sidebar-section ol').removeClass('active');

File diff suppressed because one or more lines are too long