Skip to content

Commit e84647e

Browse files
committed
Update site packages
1 parent a1bf96d commit e84647e

File tree

4,582 files changed

+908231
-242520
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,582 files changed

+908231
-242520
lines changed
Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import os
22

3-
from alabaster import _version as version
3+
__version_info__ = (1, 0, 0)
4+
__version__ = "1.0.0"
45

56

67
def get_path():
@@ -12,9 +13,27 @@ def get_path():
1213

1314

1415
def update_context(app, pagename, templatename, context, doctree):
15-
context['alabaster_version'] = version.__version__
16+
context["alabaster_version"] = __version__
17+
context["alabaster_version_info"] = __version_info__
18+
19+
# Convert 'show_powered_by' in the theme options to
20+
# the preferred option, html_show_sphinx.
21+
html_theme_options = app.config.html_theme_options
22+
if "show_powered_by" in html_theme_options:
23+
show_powered_by = html_theme_options["show_powered_by"]
24+
if isinstance(show_powered_by, str):
25+
context["show_sphinx"] = show_powered_by.lower() == "true"
26+
else:
27+
context["show_sphinx"] = bool(show_powered_by) # to allow int values
28+
1629

1730
def setup(app):
18-
app.connect('html-page-context', update_context)
19-
return {'version': version.__version__,
20-
'parallel_read_safe': True}
31+
app.require_sphinx("6.2")
32+
theme_path = os.path.abspath(os.path.dirname(__file__))
33+
app.add_html_theme("alabaster", theme_path)
34+
app.connect("html-page-context", update_context)
35+
return {
36+
"version": __version__,
37+
"parallel_read_safe": True,
38+
"parallel_write_safe": True,
39+
}

addons/source-python/packages/site-packages/alabaster/_version.py

Lines changed: 0 additions & 2 deletions
This file was deleted.

addons/source-python/packages/site-packages/alabaster/about.html

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
{% if theme_logo %}
22
<p class="logo">
33
<a href="{{ pathto(master_doc) }}">
4-
<img class="logo" src="{{ pathto('_static/' ~ theme_logo, 1) }}" alt="Logo"/>
4+
<img class="logo" src="{{ pathto('_static/' ~ theme_logo, 1) }}" alt="Logo" />
55
{% if theme_logo_name|lower == 'true' %}
66
<h1 class="logo logo-name">{{ project }}</h1>
7+
{% elif theme_logo_name|lower != 'false' %}
8+
<h1 class="logo logo-name">{{ theme_logo_name }}</h1>
79
{% endif %}
810
</a>
911
</p>
@@ -31,10 +33,10 @@ <h1 class="logo"><a href="{{ pathto(master_doc) }}">{{ project }}</a></h1>
3133
{% set path = theme_travis_button %}
3234
{% endif %}
3335
<p>
34-
<a href="https://travis-ci.org/{{ path }}">
36+
<a class="badge" href="https://travis-ci.org/{{ path }}">
3537
<img
36-
alt="https://secure.travis-ci.org/{{ path }}.svg?branch=master"
37-
src="https://secure.travis-ci.org/{{ path }}.svg?branch=master"
38+
alt="https://secure.travis-ci.org/{{ path }}.svg?branch={{ theme_badge_branch }}"
39+
src="https://secure.travis-ci.org/{{ path }}.svg?branch={{ theme_badge_branch }}"
3840
/>
3941
</a>
4042
</p>
@@ -47,10 +49,10 @@ <h1 class="logo"><a href="{{ pathto(master_doc) }}">{{ project }}</a></h1>
4749
{% set path = theme_codecov_button %}
4850
{% endif %}
4951
<p>
50-
<a href="https://codecov.io/github/{{ path }}">
52+
<a class="badge" href="https://codecov.io/github/{{ path }}">
5153
<img
52-
alt="https://codecov.io/github/{{ path }}/coverage.svg?branch=master"
53-
src="https://codecov.io/github/{{ path }}/coverage.svg?branch=master"
54+
alt="https://codecov.io/github/{{ path }}/coverage.svg?branch={{ theme_badge_branch }}"
55+
src="https://codecov.io/github/{{ path }}/coverage.svg?branch={{ theme_badge_branch }}"
5456
/>
5557
</a>
5658
</p>
Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,28 @@
1-
{% if theme_gratipay_user or theme_gittip_user %}
2-
<h3>Donate</h3>
1+
{# TODO: wrap all these in their own divs for easier styling #}
2+
3+
{% if theme_donate_url or theme_opencollective or theme_tidelift_url %}
4+
<h3 class="donation">Donate/support</h3>
5+
{% endif %}
6+
7+
{% if theme_donate_url %}
8+
<p>
9+
<a class="badge" href="{{ theme_donate_url }}">
10+
<img src="https://img.shields.io/badge/donate-%E2%9D%A4%C2%A0-ff69b4.svg?style=flat" alt="Donate">
11+
</a>
12+
</p>
13+
{% endif %}
14+
15+
{% if theme_opencollective %}
16+
<p>
17+
<a class="badge" href="https://opencollective.com/{{ theme_opencollective }}/donate" target="_blank">
18+
<img src="https://opencollective.com/{{ theme_opencollective }}/donate/button.png?color={{ theme_opencollective_button_color }}" width=300 />
19+
</a>
20+
</p>
21+
{% endif %}
22+
23+
{% if theme_tidelift_url %}
324
<p>
4-
Consider supporting the authors on <a href="https://www.gratipay.com/">Gratipay</a>:
5-
<script data-gratipay-username="{{ theme_gratipay_user or theme_gittip_user }}"
6-
data-gratipay-widget="button"
7-
src="//gttp.co/v1.js"></script>
25+
Professionally-supported {{ project }} is available with the
26+
<a href="{{ theme_tidelift_url }}">Tidelift Subscription</a>.
827
</p>
928
{% endif %}

addons/source-python/packages/site-packages/alabaster/layout.html

Lines changed: 65 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,41 @@
22

33
{%- block extrahead %}
44
{{ super() }}
5-
<link rel="stylesheet" href="{{ pathto('_static/custom.css', 1) }}" type="text/css" />
5+
<link rel="stylesheet" href="{{ pathto('_static/custom.css', resource=True) }}" type="text/css" />
66
{% if theme_touch_icon %}
7-
<link rel="apple-touch-icon" href="{{ pathto('_static/' ~ theme_touch_icon, 1) }}" />
7+
<link rel="apple-touch-icon" href="{{ pathto('_static/' ~ theme_touch_icon, resource=True) }}" />
8+
{% endif %}
9+
10+
{# Deprecated in favor of html_baseurl (pageurl). This is already set in the basic theme #}
11+
{% if theme_canonical_url and not pageurl %}
12+
<link rel="canonical" href="{{ theme_canonical_url }}{{ pagename }}.html" />
813
{% endif %}
9-
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
1014
{% endblock %}
1115

12-
{# Disable base theme's top+bottom related navs; we have our own in sidebar #}
16+
{# top+bottom related navs; we also have our own in sidebar #}
17+
{%- macro rellink_markup() %}
18+
<nav id="rellinks">
19+
<ul>
20+
{%- if prev %}
21+
<li>
22+
&larr;
23+
<a href="{{ prev.link|e }}" title="Previous document">{{ prev.title }}</a>
24+
</li>
25+
{%- endif %}
26+
{%- if next %}
27+
<li>
28+
<a href="{{ next.link|e }}" title="Next document">{{ next.title }}</a>
29+
&rarr;
30+
</li>
31+
{%- endif %}
32+
</ul>
33+
</nav>
34+
{%- endmacro %}
35+
36+
{%- set theme_show_relbar_top = theme_show_relbar_top or theme_show_relbars %}
37+
{%- set theme_show_relbar_bottom = theme_show_relbar_bottom or theme_show_relbars %}
38+
39+
{# removed existing top+bottom related nav, and embed in main content #}
1340
{%- block relbar1 %}{% endblock %}
1441
{%- block relbar2 %}{% endblock %}
1542

@@ -23,9 +50,29 @@
2350
{%- if render_sidebar %}
2451
<div class="bodywrapper">
2552
{%- endif %}
53+
54+
{%- block relbar_top %}
55+
{%- if theme_show_relbar_top|tobool %}
56+
<div class="related top">
57+
&nbsp;
58+
{{- rellink_markup () }}
59+
</div>
60+
{%- endif %}
61+
{% endblock %}
62+
2663
<div class="body" role="main">
2764
{% block body %} {% endblock %}
2865
</div>
66+
67+
{%- block relbar_bottom %}
68+
{%- if theme_show_relbar_bottom|tobool %}
69+
<div class="related bottom">
70+
&nbsp;
71+
{{- rellink_markup () }}
72+
</div>
73+
{%- endif %}
74+
{% endblock %}
75+
2976
{%- if render_sidebar %}
3077
</div>
3178
{%- endif %}
@@ -40,27 +87,31 @@
4087

4188
{%- block footer %}
4289
<div class="footer">
43-
{% if show_copyright %}&copy;{{ copyright }}.{% endif %}
44-
{% if theme_show_powered_by|lower == 'true' %}
90+
{% if show_copyright %}&#169;{{ copyright }}.{% endif %}
91+
{% if show_sphinx %}
4592
{% if show_copyright %}|{% endif %}
46-
Powered by <a href="http://sphinx-doc.org/">Sphinx {{ sphinx_version }}</a>
47-
&amp; <a href="https://github.com/bitprophet/alabaster">Alabaster {{ alabaster_version }}</a>
93+
Powered by <a href="https://www.sphinx-doc.org/">Sphinx {{ sphinx_version }}</a>
94+
&amp; <a href="https://alabaster.readthedocs.io">Alabaster {{ alabaster_version }}</a>
4895
{% endif %}
4996
{%- if show_source and has_source and sourcename %}
50-
{% if show_copyright or theme_show_powered_by %}|{% endif %}
51-
<a href="{{ pathto('_sources/' + sourcename, true)|e }}"
97+
{% if show_copyright or show_sphinx %}|{% endif %}
98+
<a href="{{ pathto('_sources/' + sourcename, resource=True)|e }}"
5299
rel="nofollow">{{ _('Page source') }}</a>
53100
{%- endif %}
54101
</div>
55102

56103
{% if theme_github_banner|lower != 'false' %}
57104
<a href="https://github.com/{{ theme_github_user }}/{{ theme_github_repo }}" class="github">
58-
<img style="position: absolute; top: 0; right: 0; border: 0;" src="{{ pathto('_static/' ~ theme_github_banner, 1) if theme_github_banner|lower != 'true' else 'https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png' }}" alt="Fork me on GitHub" class="github"/>
105+
{%- if theme_github_banner|lower == 'true' %}
106+
<img src="{{ pathto('_static/github-banner.svg', resource=True) }}" alt="Fork me on GitHub" class="github"/>
107+
{%- else %}
108+
<img src="{{ pathto('_static/' ~ theme_github_banner, resource=True) }}" alt="Fork me on GitHub" class="github"/>
109+
{%- endif %}
59110
</a>
60111
{% endif %}
61112

62113
{% if theme_analytics_id %}
63-
<script type="text/javascript">
114+
<script>
64115

65116
var _gaq = _gaq || [];
66117
_gaq.push(['_setAccount', '{{ theme_analytics_id }}']);
@@ -69,8 +120,8 @@
69120
_gaq.push(['_trackPageview']);
70121

71122
(function() {
72-
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
73-
ga.src = ('https:' == document.location.protocol ? 'https://ssl/' : 'http://www') + '.google-analytics.com/ga.js';
123+
var ga = document.createElement('script'); ga.async = true;
124+
ga.src = ('https:' == document.location.protocol ? 'https://ssl/' : 'https://www') + '.google-analytics.com/ga.js';
74125
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
75126
})();
76127

addons/source-python/packages/site-packages/alabaster/navigation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<h3>{{ _('Navigation') }}</h3>
2-
{{ toctree(includehidden=theme_sidebar_includehidden) }}
2+
{{ toctree(includehidden=theme_sidebar_includehidden, collapse=theme_sidebar_collapse) }}
33
{% if theme_extra_nav_links %}
44
<hr />
55
<ul>

addons/source-python/packages/site-packages/alabaster/relations.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<div class="relations">
2-
<h3>Related Topics</h3>
2+
<h3>{{ _('Related Topics') }}</h3>
33
<ul>
4-
<li><a href="{{ pathto(master_doc) }}">Documentation overview</a><ul>
4+
<li><a href="{{ pathto(master_doc) }}">{{ _('Documentation overview') }}</a><ul>
55
{%- for parent in parents %}
66
<li><a href="{{ parent.link|e }}">{{ parent.title }}</a><ul>
77
{%- endfor %}
88
{%- if prev %}
9-
<li>Previous: <a href="{{ prev.link|e }}" title="{{ _('previous chapter')
9+
<li>{{ _('Previous') }}: <a href="{{ prev.link|e }}" title="{{ _('previous chapter')
1010
}}">{{ prev.title }}</a></li>
1111
{%- endif %}
1212
{%- if next %}
13-
<li>Next: <a href="{{ next.link|e }}" title="{{ _('next chapter')
13+
<li>{{ _('Next') }}: <a href="{{ next.link|e }}" title="{{ _('next chapter')
1414
}}">{{ next.title }}</a></li>
1515
{%- endif %}
1616
{%- for parent in parents %}

0 commit comments

Comments
 (0)