Merge remote-tracking branch 'snide/master' into move-javascript-to-bottom

This commit is contained in:
Eric Hough 2014-01-20 21:16:22 -05:00
commit 94d0d7bbb3
10 changed files with 89 additions and 85 deletions

View File

@ -29,6 +29,9 @@
&.rst-out-of-date &.rst-out-of-date
background-color: $red background-color: $red
color: $white color: $white
&.rst-active-old-version
background-color: $yellow
color: $black
&.shift-up .rst-other-versions &.shift-up .rst-other-versions
display: block display: block
.rst-other-versions .rst-other-versions

View File

@ -1,18 +1,19 @@
<ul class="wy-breadcrumbs"> <div role="navigation" aria-label="breadcrumbs navigation">
<li><a href="{{ pathto(master_doc) }}">Docs</a> &raquo;</li> <ul class="wy-breadcrumbs">
{% for doc in parents %} <li><a href="{{ pathto(master_doc) }}">Docs</a> &raquo;</li>
<li><a href="{{ doc.link|e }}">{{ doc.title }}</a> &raquo;</li> {% for doc in parents %}
{% endfor %} <li><a href="{{ doc.link|e }}">{{ doc.title }}</a> &raquo;</li>
<li>{{ title }}</li> {% endfor %}
<li class="wy-breadcrumbs-aside"> <li>{{ title }}</li>
{% if display_github %} <li class="wy-breadcrumbs-aside">
<a href="https://github.com/{{ github_user }}/{{ github_repo }}/blob/{{ github_version }}{{ conf_py_path }}{{ pagename }}.rst" class="icon icon-github"> Edit on GitHub</a> {% if display_github %}
{% elif display_bitbucket %} <a href="https://github.com/{{ github_user }}/{{ github_repo }}/blob/{{ github_version }}{{ conf_py_path }}{{ pagename }}.rst" class="icon icon-github"> Edit on GitHub</a>
<a href="https://bitbucket.org/{{ bitbucket_user }}/{{ bitbucket_repo }}/src/{{ bitbucket_version}}{{ conf_py_path }}{{ pagename }}.rst'" class="icon icon-bitbucket"> Edit on Bitbucket</a> {% elif display_bitbucket %}
{% elif show_source and has_source and sourcename %} <a href="https://bitbucket.org/{{ bitbucket_user }}/{{ bitbucket_repo }}/src/{{ bitbucket_version}}{{ conf_py_path }}{{ pagename }}.rst" class="icon icon-bitbucket"> Edit on Bitbucket</a>
<a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow"> View page source</a> {% elif show_source and has_source and sourcename %}
{% endif %} <a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow"> View page source</a>
</li> {% endif %}
</ul> </li>
<hr/> </ul>
<hr/>
</div>

View File

@ -1,6 +1,6 @@
<footer> <footer>
{% if next or prev %} {% if next or prev %}
<div class="rst-footer-buttons"> <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
{% if next %} {% if next %}
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}"/>Next <span class="icon icon-circle-arrow-right"></span></a> <a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}"/>Next <span class="icon icon-circle-arrow-right"></span></a>
{% endif %} {% endif %}
@ -12,19 +12,21 @@
<hr/> <hr/>
<p> <div role="contentinfo">
{%- if show_copyright %} <p>
{%- if hasdoc('copyright') %} {%- if show_copyright %}
{% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %} {%- if hasdoc('copyright') %}
{%- else %} {% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
{% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %} {%- else %}
{% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}
{%- endif %}
{%- endif %} {%- endif %}
{%- endif %}
{%- if last_updated %} {%- if last_updated %}
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %} {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
{%- endif %} {%- endif %}
</p> </p>
</div>
{% trans %}<a href="https://github.com/snide/sphinx_rtd_theme">Sphinx theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>{% endtrans %} {% trans %}<a href="https://github.com/snide/sphinx_rtd_theme">Sphinx theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>{% endtrans %}
</footer> </footer>

View File

@ -37,15 +37,6 @@
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" /> <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
{% endif %} {% endif %}
{# STICKY NAVIGATION #}
{% if theme_sticky_navigation %}
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
{% endif %}
{% for cssfile in css_files %} {% for cssfile in css_files %}
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" /> <link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
{% endfor %} {% endfor %}
@ -83,18 +74,27 @@
</head> </head>
<body class="wy-body-for-nav"> <body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav"> <div class="wy-grid-for-nav">
{# SIDE NAV, TOGGLES ON MOBILE #} {# SIDE NAV, TOGGLES ON MOBILE #}
<nav data-toggle="wy-nav-shift" class="wy-nav-side"> <nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-nav-search"> <div class="wy-side-nav-search">
<a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }}</a> {% if logo and theme_logo_only %}
<a href="{{ pathto(master_doc) }}">
{% else %}
<a href="{{ pathto(master_doc) }}" class="icon icon-home"> {{ project }}
{% endif %}
{% if logo %}
{# Not strictly valid HTML, but it's the only way to display/scale it properly, without weird scripting or heaps of work #}
<img src="{{ pathto('_static/' + logo, 1) }}" class="logo" />
{% endif %}
</a>
{% include "searchbox.html" %} {% include "searchbox.html" %}
</div> </div>
<div class="wy-menu wy-menu-vertical" data-spy="affix"> <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
{% set toctree = toctree(maxdepth=2, collapse=False, includehidden=True) %} {% set toctree = toctree(maxdepth=2, collapse=False, includehidden=True) %}
{% if toctree %} {% if toctree %}
{{ toctree }} {{ toctree }}
@ -109,7 +109,7 @@
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
{# MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #} {# MOBILE NAV, TRIGGLES SIDE NAV ON TOGGLE #}
<nav class="wy-nav-top"> <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="icon icon-reorder"></i> <i data-toggle="wy-nav-top" class="icon icon-reorder"></i>
<a href="{{ pathto(master_doc) }}">{{ project }}</a> <a href="{{ pathto(master_doc) }}">{{ project }}</a>
</nav> </nav>
@ -119,7 +119,9 @@
<div class="wy-nav-content"> <div class="wy-nav-content">
<div class="rst-content"> <div class="rst-content">
{% include "breadcrumbs.html" %} {% include "breadcrumbs.html" %}
{% block body %}{% endblock %} <div role="main">
{% block body %}{% endblock %}
</div>
{% include "footer.html" %} {% include "footer.html" %}
</div> </div>
</div> </div>
@ -151,6 +153,15 @@
<script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script> <script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script>
{% endif %} {% endif %}
{# STICKY NAVIGATION #}
{% if theme_sticky_navigation %}
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
{% endif %}
{%- block inlinejs %} {% endblock %} {%- block inlinejs %} {% endblock %}
</body> </body>

View File

@ -1,5 +1,7 @@
<form id ="rtd-search-form" class="wy-form" action="{{ pathto('search') }}" method="get"> <div role="search">
<input type="text" name="q" placeholder="Search docs" /> <form id ="rtd-search-form" class="wy-form" action="{{ pathto('search') }}" method="get">
<input type="hidden" name="check_keywords" value="yes" /> <input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="area" value="default" /> <input type="hidden" name="check_keywords" value="yes" />
</form> <input type="hidden" name="area" value="default" />
</form>
</div>

View File

@ -1 +1 @@
.font-smooth,.icon:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:fontawesome-webfont;font-weight:normal;font-style:normal;src:url("../font/fontawesome_webfont.eot");src:url("../font/fontawesome_webfont.eot?#iefix") format("embedded-opentype"),url("../font/fontawesome_webfont.woff") format("woff"),url("../font/fontawesome_webfont.ttf") format("truetype"),url("../font/fontawesome_webfont.svg#fontawesome-webfont") format("svg")}.icon:before{display:inline-block;font-family:fontawesome-webfont;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .icon{display:inline-block;text-decoration:inherit}li .icon{display:inline-block}li .icon-large:before,li .icon-large:before{width:1.875em}ul.icons{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.icons li .icon{width:0.8em}ul.icons li .icon-large:before,ul.icons li .icon-large:before{vertical-align:baseline}.icon-book:before{content:"\f02d"}.icon-caret-down:before{content:"\f0d7"}.icon-caret-up:before{content:"\f0d8"}.icon-caret-left:before{content:"\f0d9"}.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;border-top:solid 10px #343131;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .icon{color:#fcfcfc}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}img{width:100%;height:auto}} .font-smooth,.icon:before{-webkit-font-smoothing:antialiased}.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;content:""}.clearfix:after{clear:both}@font-face{font-family:fontawesome-webfont;font-weight:normal;font-style:normal;src:url("../font/fontawesome_webfont.eot");src:url("../font/fontawesome_webfont.eot?#iefix") format("embedded-opentype"),url("../font/fontawesome_webfont.woff") format("woff"),url("../font/fontawesome_webfont.ttf") format("truetype"),url("../font/fontawesome_webfont.svg#fontawesome-webfont") format("svg")}.icon:before{display:inline-block;font-family:fontawesome-webfont;font-style:normal;font-weight:normal;line-height:1;text-decoration:inherit}a .icon{display:inline-block;text-decoration:inherit}li .icon{display:inline-block}li .icon-large:before,li .icon-large:before{width:1.875em}ul.icons{list-style-type:none;margin-left:2em;text-indent:-0.8em}ul.icons li .icon{width:0.8em}ul.icons li .icon-large:before,ul.icons li .icon-large:before{vertical-align:baseline}.icon-book:before{content:"\f02d"}.icon-caret-down:before{content:"\f0d7"}.icon-caret-up:before{content:"\f0d8"}.icon-caret-left:before{content:"\f0d9"}.icon-caret-right:before{content:"\f0da"}.rst-versions{position:fixed;bottom:0;left:0;width:300px;color:#fcfcfc;background:#1f1d1d;border-top:solid 10px #343131;font-family:"Lato","proxima-nova","Helvetica Neue",Arial,sans-serif;z-index:400}.rst-versions a{color:#2980b9;text-decoration:none}.rst-versions .rst-badge-small{display:none}.rst-versions .rst-current-version{padding:12px;background-color:#272525;display:block;text-align:right;font-size:90%;cursor:pointer;color:#27ae60;*zoom:1}.rst-versions .rst-current-version:before,.rst-versions .rst-current-version:after{display:table;content:""}.rst-versions .rst-current-version:after{clear:both}.rst-versions .rst-current-version .icon{color:#fcfcfc}.rst-versions .rst-current-version .icon-book{float:left}.rst-versions .rst-current-version.rst-out-of-date{background-color:#e74c3c;color:#fff}.rst-versions .rst-current-version.rst-active-old-version{background-color:#f1c40f;color:#000}.rst-versions.shift-up .rst-other-versions{display:block}.rst-versions .rst-other-versions{font-size:90%;padding:12px;color:gray;display:none}.rst-versions .rst-other-versions hr{display:block;height:1px;border:0;margin:20px 0;padding:0;border-top:solid 1px #413d3d}.rst-versions .rst-other-versions dd{display:inline-block;margin:0}.rst-versions .rst-other-versions dd a{display:inline-block;padding:6px;color:#fcfcfc}.rst-versions.rst-badge{width:auto;bottom:20px;right:20px;left:auto;border:none;max-width:300px}.rst-versions.rst-badge .icon-book{float:none}.rst-versions.rst-badge.shift-up .rst-current-version{text-align:right}.rst-versions.rst-badge.shift-up .rst-current-version .icon-book{float:left}.rst-versions.rst-badge .rst-current-version{width:auto;height:30px;line-height:30px;padding:0 6px;display:block;text-align:center}@media screen and (max-width: 768px){.rst-versions{width:85%;display:none}.rst-versions.shift{display:block}img{width:100%;height:auto}}

File diff suppressed because one or more lines are too long

View File

@ -1,63 +1,47 @@
$( document ).ready(function() { $( document ).ready(function() {
// Shift nav in mobile when clicking the menu. // Shift nav in mobile when clicking the menu.
$("[data-toggle='wy-nav-top']").click(function() { $(document).on('click', "[data-toggle='wy-nav-top']", function() {
$("[data-toggle='wy-nav-shift']").toggleClass("shift"); $("[data-toggle='wy-nav-shift']").toggleClass("shift");
$("[data-toggle='rst-versions']").toggleClass("shift"); $("[data-toggle='rst-versions']").toggleClass("shift");
}); });
// Close menu when you click a link. // Close menu when you click a link.
$(".wy-menu-vertical .current ul li a").click(function() { $(document).on('click', ".wy-menu-vertical .current ul li a", function() {
$("[data-toggle='wy-nav-shift']").removeClass("shift"); $("[data-toggle='wy-nav-shift']").removeClass("shift");
$("[data-toggle='rst-versions']").toggleClass("shift"); $("[data-toggle='rst-versions']").toggleClass("shift");
}); });
$("[data-toggle='rst-current-version']").click(function() { $(document).on('click', "[data-toggle='rst-current-version']", function() {
$("[data-toggle='rst-versions']").toggleClass("shift-up"); $("[data-toggle='rst-versions']").toggleClass("shift-up");
}); });
$("table.docutils:not(.field-list").wrap("<div class='wy-table-responsive'></div>"); // Make tables responsive
$("table.docutils:not(.field-list)").wrap("<div class='wy-table-responsive'></div>");
}); });
window.SphinxRtdTheme = (function (jquery) { window.SphinxRtdTheme = (function (jquery) {
var stickyNav = (function () { var stickyNav = (function () {
var navBar, var navBar,
win, win,
stickyNavCssClass = 'stickynav', stickyNavCssClass = 'stickynav',
applyStickNav = function () { applyStickNav = function () {
if (navBar.height() <= win.height()) { if (navBar.height() <= win.height()) {
navBar.addClass(stickyNavCssClass); navBar.addClass(stickyNavCssClass);
} else { } else {
navBar.removeClass(stickyNavCssClass); navBar.removeClass(stickyNavCssClass);
} }
}, },
enable = function () { enable = function () {
applyStickNav(); applyStickNav();
win.on('resize', applyStickNav); win.on('resize', applyStickNav);
}, },
init = function () { init = function () {
navBar = jquery('nav.wy-nav-side:first'); navBar = jquery('nav.wy-nav-side:first');
win = jquery(window); win = jquery(window);
}; };
jquery(init); jquery(init);
return { return {
enable : enable enable : enable
}; };
}()); }());
return { return {
StickyNav : stickyNav StickyNav : stickyNav
}; };
}($)); }($));

View File

@ -6,3 +6,4 @@ stylesheet = css/theme.css
typekit_id = hiw1hhg typekit_id = hiw1hhg
analytics_id = analytics_id =
sticky_navigation = False sticky_navigation = False
logo_only =

View File

@ -1,6 +1,6 @@
{% if READTHEDOCS %} {% if READTHEDOCS %}
{# Add rst-badge after rst-versions for small badge style. #} {# Add rst-badge after rst-versions for small badge style. #}
<div class="rst-versions" data-toggle="rst-versions"> <div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
<span class="rst-current-version" data-toggle="rst-current-version"> <span class="rst-current-version" data-toggle="rst-current-version">
<span class="icon icon-book"> Read the Docs</span> <span class="icon icon-book"> Read the Docs</span>
v: {{ current_version }} v: {{ current_version }}