mirror of
https://github.com/readthedocs/sphinx_rtd_theme.git
synced 2025-02-25 18:55:21 -06:00
Merge branch 'master' into manifast_tests
This commit is contained in:
commit
b3d090e3e4
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1,6 +1,7 @@
|
|||||||
# Document global line endings settings
|
# Document global line endings settings
|
||||||
# https://help.github.com/articles/dealing-with-line-endings/
|
# https://help.github.com/articles/dealing-with-line-endings/
|
||||||
* text eol=lf
|
* text eol=lf
|
||||||
|
*.bat text eol=crlf
|
||||||
|
|
||||||
|
|
||||||
# Denote all files that are truly binary and should not be modified.
|
# Denote all files that are truly binary and should not be modified.
|
||||||
|
@ -8,7 +8,6 @@ matrix:
|
|||||||
include:
|
include:
|
||||||
- python: 2.7
|
- python: 2.7
|
||||||
env: TOXENV=docs
|
env: TOXENV=docs
|
||||||
sudo: false
|
|
||||||
install:
|
install:
|
||||||
- pip install tox-travis
|
- pip install tox-travis
|
||||||
script:
|
script:
|
||||||
|
@ -3,6 +3,27 @@
|
|||||||
Changelog
|
Changelog
|
||||||
*********
|
*********
|
||||||
|
|
||||||
|
master
|
||||||
|
======
|
||||||
|
|
||||||
|
:Date: TBD
|
||||||
|
|
||||||
|
New Features
|
||||||
|
-------------
|
||||||
|
|
||||||
|
|
||||||
|
Fixes
|
||||||
|
-----
|
||||||
|
|
||||||
|
* Fix scrolling to active item in sidebar on load (#214)
|
||||||
|
* Style caption link for code and literal blocks
|
||||||
|
* Fix inconsistent font size and line height for autodoc "raises" and "returns" (#267)
|
||||||
|
|
||||||
|
|
||||||
|
Other Changes
|
||||||
|
--------------
|
||||||
|
|
||||||
|
|
||||||
v0.4.2
|
v0.4.2
|
||||||
======
|
======
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ file of this repository, and can be defined in your project's ``conf.py`` via
|
|||||||
|
|
||||||
html_theme_options = {
|
html_theme_options = {
|
||||||
'canonical_url': '',
|
'canonical_url': '',
|
||||||
'analytics_id': '',
|
'analytics_id': 'UA-XXXXXXX-1', # Provided by Google in your dashboard
|
||||||
'logo_only': False,
|
'logo_only': False,
|
||||||
'display_version': True,
|
'display_version': True,
|
||||||
'prev_next_buttons_location': 'bottom',
|
'prev_next_buttons_location': 'bottom',
|
||||||
|
@ -87,7 +87,3 @@ you should do the following:
|
|||||||
$ rm -rf dist/
|
$ rm -rf dist/
|
||||||
$ python setup.py sdist bdist_wheel
|
$ python setup.py sdist bdist_wheel
|
||||||
$ twine upload --sign --identity security@readthedocs.org dist/*
|
$ twine upload --sign --identity security@readthedocs.org dist/*
|
||||||
|
|
||||||
#. In the ``readthedocs.org`` repo, edit the ``bower.json`` file to point at the correct version
|
|
||||||
(``sphinx-rtd-theme": "https://github.com/rtfd/sphinx-rtd-theme.git#$NEW_VERSION"``).
|
|
||||||
#. In the ``readthedocs.org`` repo, run ``gulp build`` to update the distributed theme files.
|
|
||||||
|
@ -152,6 +152,7 @@ function ThemeNav () {
|
|||||||
link.closest('li.toctree-l2').addClass('current');
|
link.closest('li.toctree-l2').addClass('current');
|
||||||
link.closest('li.toctree-l3').addClass('current');
|
link.closest('li.toctree-l3').addClass('current');
|
||||||
link.closest('li.toctree-l4').addClass('current');
|
link.closest('li.toctree-l4').addClass('current');
|
||||||
|
link[0].scrollIntoView();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
|
@ -36,6 +36,7 @@
|
|||||||
&.shift-up
|
&.shift-up
|
||||||
height: auto
|
height: auto
|
||||||
max-height: 100%
|
max-height: 100%
|
||||||
|
overflow-y: scroll
|
||||||
&.shift-up .rst-other-versions
|
&.shift-up .rst-other-versions
|
||||||
display: block
|
display: block
|
||||||
.rst-other-versions
|
.rst-other-versions
|
||||||
@ -64,6 +65,7 @@
|
|||||||
left: auto
|
left: auto
|
||||||
border: none
|
border: none
|
||||||
max-width: $nav-desktop-width
|
max-width: $nav-desktop-width
|
||||||
|
max-height: 90%
|
||||||
.icon-book
|
.icon-book
|
||||||
float: none
|
float: none
|
||||||
.fa-book
|
.fa-book
|
||||||
|
@ -31,15 +31,16 @@ html
|
|||||||
width: $nav-desktop-width
|
width: $nav-desktop-width
|
||||||
|
|
||||||
header, p.caption
|
header, p.caption
|
||||||
|
color: $nav-caption
|
||||||
height: $base-font-size * 2
|
height: $base-font-size * 2
|
||||||
display: inline-block
|
display: inline-block
|
||||||
line-height: $base-font-size * 2
|
line-height: $base-font-size * 2
|
||||||
padding: 0 $gutter
|
padding: 0 $gutter
|
||||||
margin-bottom: 0
|
margin: $base-line-height / 2 0 0 0
|
||||||
display: block
|
display: block
|
||||||
font-weight: bold
|
font-weight: bold
|
||||||
text-transform: uppercase
|
text-transform: uppercase
|
||||||
font-size: 80%
|
font-size: 85%
|
||||||
white-space: nowrap
|
white-space: nowrap
|
||||||
|
|
||||||
ul
|
ul
|
||||||
@ -362,6 +363,8 @@ footer
|
|||||||
color: $text-medium
|
color: $text-medium
|
||||||
font-size: 90%
|
font-size: 90%
|
||||||
|
|
||||||
|
.genindextable li > ul
|
||||||
|
margin-left: $base-line-height
|
||||||
|
|
||||||
+media($tablet)
|
+media($tablet)
|
||||||
.wy-body-for-nav
|
.wy-body-for-nav
|
||||||
|
@ -95,6 +95,13 @@
|
|||||||
font-size: 12px
|
font-size: 12px
|
||||||
line-height: 1.4
|
line-height: 1.4
|
||||||
|
|
||||||
|
.code-block-caption
|
||||||
|
font-style: italic
|
||||||
|
font-size: 85%
|
||||||
|
line-height: 1
|
||||||
|
padding: 1em 0
|
||||||
|
text-align: center
|
||||||
|
|
||||||
@media print
|
@media print
|
||||||
.codeblock, div[class^='highlight'], div[class^='highlight'] pre
|
.codeblock, div[class^='highlight'], div[class^='highlight'] pre
|
||||||
white-space: pre-wrap
|
white-space: pre-wrap
|
||||||
@ -165,7 +172,7 @@
|
|||||||
@extend h2
|
@extend h2
|
||||||
|
|
||||||
// This is the #href that shows up on hover. Sphinx's is terrible so I hack it away.
|
// This is the #href that shows up on hover. Sphinx's is terrible so I hack it away.
|
||||||
h1, h2, h3, h4, h5, h6, dl dt, p.caption, table > caption
|
h1, h2, h3, h4, h5, h6, dl dt, p.caption, table > caption, .code-block-caption
|
||||||
.headerlink
|
.headerlink
|
||||||
visibility: hidden
|
visibility: hidden
|
||||||
font-size: 14px
|
font-size: 14px
|
||||||
@ -263,6 +270,9 @@
|
|||||||
border: none
|
border: none
|
||||||
td
|
td
|
||||||
border: none
|
border: none
|
||||||
|
p
|
||||||
|
font-size: inherit
|
||||||
|
line-height: inherit
|
||||||
td > strong
|
td > strong
|
||||||
display: inline-block
|
display: inline-block
|
||||||
.field-name
|
.field-name
|
||||||
|
@ -51,6 +51,7 @@ $nav-link-color: $blue
|
|||||||
$nav-link-color-visited: $purple
|
$nav-link-color-visited: $purple
|
||||||
$nav-link-color-hover: lighten($nav-link-color, 6%) !default
|
$nav-link-color-hover: lighten($nav-link-color, 6%) !default
|
||||||
$nav-link-color-alt: hsl(33, 100%, 51%)
|
$nav-link-color-alt: hsl(33, 100%, 51%)
|
||||||
|
$nav-caption: desaturate($blue, 15%)
|
||||||
|
|
||||||
// Sidebar colors
|
// Sidebar colors
|
||||||
$sidebar-background-color: $table-stripe-color
|
$sidebar-background-color: $table-stripe-color
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
|
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if prev %}
|
{% if prev %}
|
||||||
<a href="{{ prev.link|e }}" class="btn btn-neutral" title="{{ prev.title|striptags|e }}" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
<a href="{{ prev.link|e }}" class="btn btn-neutral float-left" title="{{ prev.title|striptags|e }}" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n" rel="next">{{ _('Next') }} <span class="fa fa-arrow-circle-right"></span></a>
|
<a href="{{ next.link|e }}" class="btn btn-neutral float-right" title="{{ next.title|striptags|e }}" accesskey="n" rel="next">{{ _('Next') }} <span class="fa fa-arrow-circle-right"></span></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if prev %}
|
{% if prev %}
|
||||||
<a href="{{ prev.link|e }}" class="btn btn-neutral" title="{{ prev.title|striptags|e }}" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> {{ _('Previous') }}</a>
|
<a href="{{ prev.link|e }}" class="btn btn-neutral float-left" title="{{ prev.title|striptags|e }}" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> {{ _('Previous') }}</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -28,18 +28,42 @@
|
|||||||
<link rel="canonical" href="{{ theme_canonical_url }}{{ pagename }}.html"/>
|
<link rel="canonical" href="{{ theme_canonical_url }}{{ pagename }}.html"/>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{# CSS #}
|
{# JAVASCRIPTS #}
|
||||||
|
<script type="text/javascript" src="{{ pathto('_static/js/modernizr.min.js', 1) }}"></script>
|
||||||
{# OPENSEARCH #}
|
{%- if not embedded %}
|
||||||
{% if not embedded %}
|
{# XXX Sphinx 1.8.0 made this an external js-file, quick fix until we refactor the template to inherert more blocks directly from sphinx #}
|
||||||
{% if use_opensearch %}
|
{% if sphinx_version >= "1.8.0" %}
|
||||||
<link rel="search" type="application/opensearchdescription+xml"
|
<script type="text/javascript" id="documentation_options" data-url_root="{{ pathto('', 1) }}" src="{{ pathto('_static/documentation_options.js', 1) }}"></script>
|
||||||
title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
|
{%- for scriptfile in script_files %}
|
||||||
href="{{ pathto('_static/opensearch.xml', 1) }}"/>
|
{{ js_tag(scriptfile) }}
|
||||||
|
{%- endfor %}
|
||||||
|
{% else %}
|
||||||
|
<script type="text/javascript">
|
||||||
|
var DOCUMENTATION_OPTIONS = {
|
||||||
|
URL_ROOT:'{{ url_root }}',
|
||||||
|
VERSION:'{{ release|e }}',
|
||||||
|
LANGUAGE:'{{ language }}',
|
||||||
|
COLLAPSE_INDEX:false,
|
||||||
|
FILE_SUFFIX:'{{ '' if no_search_suffix else file_suffix }}',
|
||||||
|
HAS_SOURCE: {{ has_source|lower }},
|
||||||
|
SOURCELINK_SUFFIX: '{{ sourcelink_suffix }}'
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
{%- for scriptfile in script_files %}
|
||||||
|
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
|
||||||
|
{%- endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
<script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script>
|
||||||
|
|
||||||
{% endif %}
|
{# OPENSEARCH #}
|
||||||
|
{%- if use_opensearch %}
|
||||||
|
<link rel="search" type="application/opensearchdescription+xml"
|
||||||
|
title="{% trans docstitle=docstitle|e %}Search within {{ docstitle }}{% endtrans %}"
|
||||||
|
href="{{ pathto('_static/opensearch.xml', 1) }}"/>
|
||||||
|
{%- endif %}
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
|
{# CSS #}
|
||||||
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
|
<link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />
|
||||||
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
|
<link rel="stylesheet" href="{{ pathto('_static/pygments.css', 1) }}" type="text/css" />
|
||||||
{%- for css in css_files %}
|
{%- for css in css_files %}
|
||||||
@ -49,6 +73,7 @@
|
|||||||
<link rel="stylesheet" href="{{ pathto(css, 1) }}" type="text/css" />
|
<link rel="stylesheet" href="{{ pathto(css, 1) }}" type="text/css" />
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
|
|
||||||
{%- for cssfile in extra_css_files %}
|
{%- for cssfile in extra_css_files %}
|
||||||
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
|
<link rel="stylesheet" href="{{ pathto(cssfile, 1) }}" type="text/css" />
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
@ -74,10 +99,6 @@
|
|||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- endblock %}
|
{%- endblock %}
|
||||||
{%- block extrahead %} {% endblock %}
|
{%- block extrahead %} {% endblock %}
|
||||||
|
|
||||||
{# Keep modernizr in head - http://modernizr.com/docs/#installing #}
|
|
||||||
<script src="{{ pathto('_static/js/modernizr.min.js', 1) }}"></script>
|
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body class="wy-body-for-nav">
|
<body class="wy-body-for-nav">
|
||||||
@ -186,41 +207,29 @@
|
|||||||
</div>
|
</div>
|
||||||
{% include "versions.html" %}
|
{% include "versions.html" %}
|
||||||
|
|
||||||
{% if not embedded %}
|
|
||||||
|
|
||||||
{# XXX Sphinx 1.8.0 made this an external js-file, quick fix until we refactor the template to inherert more blocks directly from sphinx #}
|
|
||||||
{% if sphinx_version >= "1.8.0" %}
|
|
||||||
<script type="text/javascript" id="documentation_options" data-url_root="{{ pathto('', 1) }}" src="{{ pathto('_static/documentation_options.js', 1) }}"></script>
|
|
||||||
{%- for scriptfile in script_files %}
|
|
||||||
{{ js_tag(scriptfile) }}
|
|
||||||
{%- endfor %}
|
|
||||||
{% else %}
|
|
||||||
<script type="text/javascript">
|
|
||||||
var DOCUMENTATION_OPTIONS = {
|
|
||||||
URL_ROOT:'{{ url_root }}',
|
|
||||||
VERSION:'{{ release|e }}',
|
|
||||||
LANGUAGE:'{{ language }}',
|
|
||||||
COLLAPSE_INDEX:false,
|
|
||||||
FILE_SUFFIX:'{{ '' if no_search_suffix else file_suffix }}',
|
|
||||||
HAS_SOURCE: {{ has_source|lower }},
|
|
||||||
SOURCELINK_SUFFIX: '{{ sourcelink_suffix }}'
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
{%- for scriptfile in script_files %}
|
|
||||||
<script type="text/javascript" src="{{ pathto(scriptfile, 1) }}"></script>
|
|
||||||
{%- endfor %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<script type="text/javascript" src="{{ pathto('_static/js/theme.js', 1) }}"></script>
|
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
jQuery(function () {
|
jQuery(function () {
|
||||||
SphinxRtdTheme.Navigation.enable({{ 'true' if theme_sticky_navigation|tobool else 'false' }});
|
SphinxRtdTheme.Navigation.enable({{ 'true' if theme_sticky_navigation|tobool else 'false' }});
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
{# Do not conflict with RTD insertion of analytics script #}
|
||||||
|
{% if not READTHEDOCS %}
|
||||||
|
{% if theme_analytics_id %}
|
||||||
|
<!-- Theme Analytics -->
|
||||||
|
<script>
|
||||||
|
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||||
|
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||||
|
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
|
||||||
|
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
|
||||||
|
|
||||||
|
ga('create', '{{ theme_analytics_id }}', 'auto');
|
||||||
|
ga('send', 'pageview');
|
||||||
|
</script>
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{%- block footer %} {% endblock %}
|
{%- block footer %} {% endblock %}
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
Reference in New Issue
Block a user