8000 Merge branch '2.8' into 3.4 · Tobion/symfony-docs@4a88e71 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4a88e71

Browse files
committed
Merge branch '2.8' into 3.4
* 2.8: Use the ReadTheDocs theme as the default Sphinx theme [ExpressionLanguage] Add missing argument in example code Install component for dev environment
2 parents 05fbb9c + 8ce6323 commit 4a88e71

32 files changed

+3181
-169
lines changed

_build/_theme/_templates/globaltoc.html

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

_build/_theme/_templates/layout.html

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

_build/_theme/_templates/localtoc.html

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

_build/_theme/assets/css/app.css

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

_build/_theme/assets/css/doc.css

Lines changed: 0 additions & 1 deletion
This file was deleted.

_build/_theme/assets/js/app.js

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

_build/_theme/assets/js/doc.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

_build/_theme/assets/js/manifest.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

_build/_theme/_exts/symfonycom/sphinx/__init__.py renamed to _build/_themes/_exts/symfonycom/sphinx/__init__.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,14 @@ def __init__(self, builder, *args, **kwds):
2626
self.highlightlinenothreshold = 0
2727

2828
def visit_literal(self, node):
29-
self.body.append(self.starttag(node, 'tt', '', CLASS='docutils literal'))
30-
self.body.append('<code>')
29+
self.body.append(self.starttag(node, 'code', '', CLASS='docutils literal notranslate'))
3130

3231
def depart_literal(self, node):
3332
self.body.append('</code>')
34-
self.body.append('</tt>')
3533

3634
def visit_admonition(self, node, name=''):
3735
self.body.append(self.starttag(node, 'div', CLASS=('admonition-wrapper')))
38-
self.body.append('<div class="' + name + '"></div>')
39-
self.body.append('<div class="admonition admonition-' + name + '">')
36+
self.body.append('<div class="admonition ' + name + '">')
4037
if name and name != 'seealso':
4138
node.insert(0, nodes.title(name, customadmonitionlabels[name]))
4239
self.set_first_last(node)
@@ -46,7 +43,6 @@ def depart_admonition(self, node=None):
4643

4744
def visit_sidebar(self, node):
4845
self.body.append(self.starttag(node, 'div', CLASS=('admonition-wrapper')))
49-
self.body.append('<div class="sidebar"></div>')
5046
self.body.append('<div class="admonition admonition-sidebar">')
5147
self.set_first_last(node)
5248
self.in_sidebar = 1
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
"""Sphinx ReadTheDocs theme.
2+
3+
From https://github.com/ryan-roemer/sphinx-bootstrap-theme.
4+
5+
"""
6+
from os import path
7+
8+
__version__ = '0.4.0'
9+
__version_full__ = __version__
10+
11+
12+
def get_html_theme_path():
13+
"""Return list of HTML theme paths."""
14+
cur_dir = path.abspath(path.dirname(path.dirname(__file__)))
15+
return cur_dir
16+
17+
# See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package
18+
def setup(app):
19+
app.add_html_theme('sphinx_rtd_theme', path.abspath(path.dirname(__file__)))
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
{# Support for Sphinx 1.3+ page_source_suffix, but don't break old builds. #}
2+
3+
{% if page_source_suffix %}
4+
{% set suffix = page_source_suffix %}
5+
{% else %}
6+
{% set suffix = source_suffix %}
7+
{% endif %}
8+
9+
{% if meta is defined and meta is not none %}
10+
{% set check_meta = True %}
11+
{% else %}
12+
{% set check_meta = False %}
13+
{% endif %}
14+
15+
{% if check_meta and 'github_url' in meta %}
16+
{% set display_github = True %}
17+
{% endif %}
18+
19+
{% if check_meta and 'bitbucket_url' in meta %}
20+
{% set display_bitbucket = True %}
21+
{% endif %}
22+
23+
{% if check_meta and 'gitlab_url' in meta %}
24+
{% set display_gitlab = True %}
25+
{% endif %}
26+
27+
<div role="navigation" aria-label="breadcrumbs navigation">
28+
29+
<ul class="wy-breadcrumbs">
30+
{% block breadcrumbs %}
31+
<li><a href="{{ pathto(master_doc) }}">{{ _('Docs') }}</a> &raquo;</li>
32+
{% for doc in parents %}
33+
<li><a href="{{ doc.link|e }}">{{ doc.title }}</a> &raquo;</li>
34+
{% endfor %}
35+
<li>{{ title }}</li>
36+
{% endblock %}
37+
{% block breadcrumbs_aside %}
38+
<li class="wy-breadcrumbs-aside">
39+
{% if hasdoc(pagename) %}
40+
{% if display_github %}
41+
{% if check_meta and 'github_url' in meta %}
42+
<!-- User defined GitHub URL -->
43+
<a href="{{ meta['github_url'] }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
44+
{% else %}
45+
<a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/{{ theme_vcs_pageview_mode|default("blob") }}/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
46+
{% endif %}
47+
{% elif display_bitbucket %}
48+
{% if check_meta and 'bitbucket_url' in meta %}
49+
<!-- User defined Bitbucket URL -->
50+
<a href="{{ meta['bitbucket_url'] }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a>
51+
{% else %}
52+
<a href="https://bitbucket.org/{{ bitbucket_user }}/{{ bitbucket_repo }}/src/{{ bitbucket_version}}{{ conf_py_path }}{{ pagename }}{{ suffix }}?mode={{ theme_vcs_pageview_mode|default("view") }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a>
53+
{% endif %}
54+
{% elif display_gitlab %}
55+
{% if check_meta and 'gitlab_url' in meta %}
56+
<!-- User defined GitLab URL -->
57+
<a href="{{ meta['gitlab_url'] }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a>
58+
{% else %}
59+
<a href="https://{{ gitlab_host|default("gitlab.com") }}/{{ gitlab_user }}/{{ gitlab_repo }}/{{ theme_vcs_pageview_mode|default("blob") }}/{{ gitlab_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a>
60+
{% endif %}
61+
{% elif show_source and source_url_prefix %}
62+
<a href="{{ source_url_prefix }}{{ pagename }}{{ suffix }}">{{ _('View page source') }}</a>
63+
{% elif show_source and has_source and sourcename %}
64+
<a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow"> {{ _('View page source') }}</a>
65+
{% endif %}
66+
{% endif %}
67+
</li>
68+
{% endblock %}
69+
</ul>
70+
71+
{% if (theme_prev_next_buttons_location == 'top' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
72+
<div class="rst-breadcrumbs-buttons" role="navigation" aria-label="breadcrumb navigation">
73+
{% if next %}
74+
<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>
75+
{% endif %}
76+
{% if prev %}
77+
<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>
78+
{% endif %}
79+
</div>
80+
{% endif %}
81+
<hr/>
82+
</div>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<footer>
2+
{% if (theme_prev_next_buttons_location == 'bottom' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
3+
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
4+
{% if next %}
5+
<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>
6+
{% endif %}
7+
{% if prev %}
8+
<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> 1241 ; {{ _('Previous') }}</a>
9+
{% endif %}
10+
</div>
11+
{% endif %}
12+
13+
<hr/>
14+
15+
<div role="contentinfo">
16+
<p>
17+
{%- if show_copyright %}
18+
{%- if hasdoc('copyright') %}
19+
{% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
20+
{%- else %}
21+
{% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}
22+
{%- endif %}
23+
{%- endif %}
24+
25+
{%- if build_id and build_url %}
26+
{% trans build_url=build_url, build_id=build_id %}
27+
<span class="build">
28+
Build
29+
<a href="{{ build_url }}">{{ build_id }}</a>.
30+
</span>
31+
{% endtrans %}
32+
{%- elif commit %}
33+
{% trans commit=commit %}
34+
<span class="commit">
35+
Revision <code>{{ commit }}</code>.
36+
</span>
37+
{% endtrans %}
38+
{%- elif last_updated %}
39+
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
40+
{%- endif %}
41+
42+
</p>
43+
</div>
44+
45+
{%- if show_sphinx %}
46+
{% trans %}Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>{% endtrans %}.
47+
{%- endif %}
48+
49+
{%- block extrafooter %} {% endblock %}
50+
51+
</footer>
52+

0 commit comments

Comments
 (0)
0