Make a bare-bones starlingxdocs theme

We can use this as a starting point for further changes.  These files
are copies of those from openstacdocs with most of the openstac-specific
bits removed.  This way we can track additional changes made as we progress.

Change-Id: I41c2a7d63ba7796aa3cf3cc001e077d5de28a14d
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
This commit is contained in:
Dean Troyer 2018-10-16 11:20:58 -05:00
parent db99f407fe
commit 4ed01cd69c
7 changed files with 144 additions and 2 deletions

View File

@ -0,0 +1,41 @@
<footer>
<div class="container">
<div class="row footer-links">
<div class="col-lg-2 col-sm-2">
<h3>StarlingX</h3>
<ul>
<li><a href="http://docs.starlingx.io/projects/">Projects</a></li>
</ul>
</div>
<div class="col-lg-2 col-sm-2">
<h3>Documentation</h3>
<ul>
<li><a href="http://docs.starlingx.io">StarlingX Manuals</a></li>
<li><a href="http://docs.starlingx.io/api-ref/">API Documentation</a></li>
<li><a href="https://wiki.openstack.org/StarlingX">Wiki</a></li>
</ul>
</div>
<div class="col-lg-2 col-sm-2">
<h3>Branding & Legal</h3>
<ul>
<li><a href="http://openstack.org/brand/">Logos & Guidelines</a></li>
<li><a href="http://openstack.org/brand/openstack-trademark-policy/">Trademark Policy</a></li>
<li><a href="http://openstack.org/privacy/">Privacy Policy</a></li>
<li><a href="https://wiki.openstack.org/wiki/How_To_Contribute#Contributor_License_Agreement">OpenStack CLA</a></li>
</ul>
</div>
<div class="col-lg-4 col-sm-4">
<h3>Stay In Touch</h3>
<a href="https://twitter.com/OpenStack" target="_blank" class="social-icons footer-twitter"></a>
<a href="https://www.facebook.com/openstack" target="_blank" class="social-icons footer-facebook"></a>
<a href="https://www.linkedin.com/company/openstack" target="_blank" class="social-icons footer-linkedin"></a>
<a href="https://www.youtube.com/user/OpenStackFoundation" target="_blank" class="social-icons footer-youtube"></a>
<p class="fine-print">
The StarlingX project is provided under the
<a href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0 license</a>. starlingx.io is powered by
<a href="http://rackspace.com" target="_blank">Rackspace Cloud Computing</a>.
</p>
</div>
</div>
</div>
</footer>

View File

@ -0,0 +1,52 @@
{% if page_source_suffix %}{# an input file was read #}
<!-- SOURCE_FILE: {% if giturl %}{{giturl}}/{% endif %}{{pagename}}{{page_source_suffix}} -->
{% else %}{# a template was rendered directly #}
<!-- TEMPLATE_NAME: {{pagename}} -->
{% endif %}
{% include 'os_search_install.html' %}
<nav class="navbar navbar-default" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button class="navbar-toggle" data-target="#bs-example-navbar-collapse-1" data-toggle="collapse" type="button">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<div class="brand-wrapper">
<a class="navbar-brand" href="https://www.starlingx.io/"></a>
</div>
<div class="search-icon show"><i class="fa fa-search"></i> Search</div></div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
{% include 'os_search.html' %}
<ul class="nav navbar-nav navbar-main show">
{% include 'os_search_mobile.html' %}
<li>
<a href="https://docs.starlingx.io/">Docs</a>
</li>
<li>
</li>
<li>
<li class="join-nav-section">
<a href="https://www.openstack.org/join/" id="dropdownMenuJoin">Join <i class="fa fa-caret-down"></i></a>
<ul class="dropdown-menu dropdown-hover" role="menu" aria-labelledby="dropdownMenuJoin" style="display: none;">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/join/register/?membership-type=foundation">Sign up for Foundation Membership</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/join/#sponsor">Sponsor the Foundation</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://www.openstack.org/foundation">More about the Foundation</a></li>
</ul>
</li>
<li>
<a href="https://www.openstack.org/Security/login/?BackURL=/home/" class="sign-in-btn">Log In</a>
</li>
</li>
</ul>
</div>
</div>
<!-- /.container -->
</nav>

View File

@ -0,0 +1,6 @@
<button href="#" type="button" data-toggle="dropdown" class="btn docs-sidebar-release-select">StarlingX Documentation<i class="fa fa-caret-down"></i></button>
<ul class="dropdown-menu docs-sidebar-dropdown" role="menu" aria-labelledby="dLabel">
<li role="presentation" class="dropdown-header">Guides</li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://docs.starlingx.io">Install Guides</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="http://docs.starlingx.io/api-ref/">API Guides</a></li>
</ul>

View File

@ -0,0 +1,11 @@
<button href="#" type="button" data-toggle="dropdown" class="btn docs-sidebar-release-select">StarlingX APIs<i class="fa fa-caret-down"></i></button>
<ul class="dropdown-menu docs-sidebar-dropdown" role="menu" aria-labelledby="dLabel">
<li role="presentation" class="dropdown-header">References</li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://docs.starlingx.io/api-ref/stx-metal/">Bare Metal</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://docs.starlingx.io/api-ref/stx-config/">Configuration</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://docs.starlingx.io/api-ref/stx-distcloud/">Distributed Cloud</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://docs.starlingx.io/api-ref/stx-fault/">Fault Management</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://docs.starlingx.io/api-ref/stx-ha/">High Availability</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://docs.starlingx.io/api-ref/stx-nfv/">Network Function Virtualization</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://docs.starlingx.io/api-ref/stx-update/">Software Update</a></li>
</ul>

View File

@ -0,0 +1,20 @@
<div class="row">
<div class="col-lg-8">
{%- if theme_sidebar_dropdown == 'os_docs' %}
<h2>{{ title }}</h2>
{% else %}
<h2>StarlingX API Documentation</h2>
{%- endif %}
</div>
<div class="docs-actions">
{% if prev %}
<a href="{{ prev.link|e }}"><i class="fa fa-angle-double-left" data-toggle="tooltip" data-placement="top" title="Previous: {{ prev.title|striptags }}"></i></a>
{% endif %}
{% if next %}
<a href="{{ next.link|e }}"><i class="fa fa-angle-double-right" data-toggle="tooltip" data-placement="top" title="Next: {{ next.title|striptags }}"></i></a>
{% endif %}
{%- if bug_project %}
<a id="logABugLink1" href="" target="_blank" title="Found an error? Report a bug against this page"><i class="fa fa-bug" data-toggle="tooltip" data-placement="top" title="Report a Bug"></i></a>
{% endif %}
</div>
</div>

View File

@ -1,8 +1,8 @@
---
features:
- |
Add support for additional themes is included in the package. The
first theme is ``starlingxdocs``. The initial implementation sets up
Add support for including additional themes in the package, starting
with ``starlingxdocs``. The initial implementation sets up
the new theme to inherit from ``openstackdocs`` and updates some of
the ``openstackdocs`` bits that are hard coded in the Python.

12
tox.ini
View File

@ -49,12 +49,24 @@ commands =
rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[testenv:releasenotes-starlingxdocs]
basepython = python3
commands =
rm -rf releasenotes/build
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html -D html_theme=starlingxdocs releasenotes/source releasenotes/build/html
[testenv:api-ref]
basepython = python3
commands =
rm -rf api-ref/build
sphinx-build -a -E -W -d api-ref/build/doctrees -b html api-ref/source api-ref/build/html
[testenv:api-ref-starlingxdocs]
basepython = python3
commands =
rm -rf api-ref/build
sphinx-build -a -E -W -d api-ref/build/doctrees -b html -D html_theme=starlingxdocs api-ref/source api-ref/build/html
[testenv:buildpdf]
# Only build PDF and push it to publish-docs folder so that OpenStack
# CI jobs will publish it.