|
1 | | -{# Support for Sphinx 1.3+ page_source_suffix, but don't break old builds. #} |
| 1 | +{#- Support for Sphinx 1.3+ page_source_suffix, but don't break old builds. #} |
2 | 2 |
|
3 | | -{% if page_source_suffix %} |
4 | | -{% set suffix = page_source_suffix %} |
5 | | -{% else %} |
6 | | -{% set suffix = source_suffix %} |
7 | | -{% endif %} |
| 3 | +{%- if page_source_suffix %} |
| 4 | + {%- set suffix = page_source_suffix %} |
| 5 | +{%- else %} |
| 6 | + {%- set suffix = source_suffix %} |
| 7 | +{%- endif %} |
8 | 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 %} |
| 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 | 14 |
|
15 | | -{% if check_meta and 'github_url' in meta %} |
16 | | -{% set display_github = True %} |
17 | | -{% endif %} |
| 15 | +{%- if check_meta and 'github_url' in meta %} |
| 16 | + {%- set display_github = True %} |
| 17 | +{%- endif %} |
18 | 18 |
|
19 | | -{% if check_meta and 'bitbucket_url' in meta %} |
20 | | -{% set display_bitbucket = True %} |
21 | | -{% endif %} |
| 19 | +{%- if check_meta and 'bitbucket_url' in meta %} |
| 20 | + {%- set display_bitbucket = True %} |
| 21 | +{%- endif %} |
22 | 22 |
|
23 | | -{% if check_meta and 'gitlab_url' in meta %} |
24 | | -{% set display_gitlab = True %} |
25 | | -{% endif %} |
| 23 | +{%- if check_meta and 'gitlab_url' in meta %} |
| 24 | + {%- set display_gitlab = True %} |
| 25 | +{%- endif %} |
26 | 26 |
|
27 | | -{% set display_vcs_links = display_vcs_links if display_vcs_links is defined else True %} |
| 27 | +{%- set display_vcs_links = display_vcs_links if display_vcs_links is defined else True %} |
28 | 28 |
|
29 | 29 | <div role="navigation" aria-label="{{ _('Breadcrumbs') }}"> |
30 | | - |
31 | 30 | <ul class="wy-breadcrumbs"> |
32 | | - {% block breadcrumbs %} |
| 31 | + {%- block breadcrumbs %} |
33 | 32 | <li><a href="{{ pathto(master_doc) }}" class="icon icon-home"></a> »</li> |
34 | | - {% for doc in parents %} |
| 33 | + {%- for doc in parents %} |
35 | 34 | <li><a href="{{ doc.link|e }}">{{ doc.title }}</a> »</li> |
36 | | - {% endfor %} |
| 35 | + {%- endfor %} |
37 | 36 | <li>{{ title }}</li> |
38 | | - {% endblock %} |
39 | | - {% block breadcrumbs_aside %} |
| 37 | + {%- endblock %} |
| 38 | + {%- block breadcrumbs_aside %} |
40 | 39 | <li class="wy-breadcrumbs-aside"> |
41 | | - {% if hasdoc(pagename) and display_vcs_links %} |
42 | | - {% if display_github %} |
43 | | - {% if check_meta and 'github_url' in meta %} |
| 40 | + {%- if hasdoc(pagename) and display_vcs_links %} |
| 41 | + {%- if display_github %} |
| 42 | + {%- if check_meta and 'github_url' in meta %} |
44 | 43 | <!-- User defined GitHub URL --> |
45 | 44 | <a href="{{ meta['github_url'] }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a> |
46 | | - {% else %} |
| 45 | + {%- else %} |
47 | 46 | <a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/{{ theme_vcs_pageview_mode or "blob" }}/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a> |
48 | | - {% endif %} |
49 | | - {% elif display_bitbucket %} |
50 | | - {% if check_meta and 'bitbucket_url' in meta %} |
| 47 | + {%- endif %} |
| 48 | + {%- elif display_bitbucket %} |
| 49 | + {%- if check_meta and 'bitbucket_url' in meta %} |
51 | 50 | <!-- User defined Bitbucket URL --> |
52 | 51 | <a href="{{ meta['bitbucket_url'] }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a> |
53 | | - {% else %} |
| 52 | + {%- else %} |
54 | 53 | <a href="https://bitbucket.org/{{ bitbucket_user }}/{{ bitbucket_repo }}/src/{{ bitbucket_version}}{{ conf_py_path }}{{ pagename }}{{ suffix }}?mode={{ theme_vcs_pageview_mode or "view" }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a> |
55 | | - {% endif %} |
56 | | - {% elif display_gitlab %} |
57 | | - {% if check_meta and 'gitlab_url' in meta %} |
| 54 | + {%- endif %} |
| 55 | + {%- elif display_gitlab %} |
| 56 | + {%- if check_meta and 'gitlab_url' in meta %} |
58 | 57 | <!-- User defined GitLab URL --> |
59 | 58 | <a href="{{ meta['gitlab_url'] }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a> |
60 | | - {% else %} |
| 59 | + {%- else %} |
61 | 60 | <a href="https://{{ gitlab_host|default("gitlab.com") }}/{{ gitlab_user }}/{{ gitlab_repo }}/{{ theme_vcs_pageview_mode or "blob" }}/{{ gitlab_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a> |
62 | | - {% endif %} |
63 | | - {% elif show_source and source_url_prefix %} |
| 61 | + {%- endif %} |
| 62 | + {%- elif show_source and source_url_prefix %} |
64 | 63 | <a href="{{ source_url_prefix }}{{ pagename }}{{ suffix }}">{{ _('View page source') }}</a> |
65 | | - {% elif show_source and has_source and sourcename %} |
| 64 | + {%- elif show_source and has_source and sourcename %} |
66 | 65 | <a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow"> {{ _('View page source') }}</a> |
67 | | - {% endif %} |
68 | | - {% endif %} |
| 66 | + {%- endif %} |
| 67 | + {%- endif %} |
69 | 68 | </li> |
70 | | - {% endblock %} |
| 69 | + {%- endblock %} |
71 | 70 | </ul> |
72 | 71 |
|
73 | | - {% if (theme_prev_next_buttons_location == 'top' or theme_prev_next_buttons_location == 'both') and (next or prev) %} |
| 72 | + {%- if (theme_prev_next_buttons_location == 'top' or theme_prev_next_buttons_location == 'both') and (next or prev) %} |
74 | 73 | <div class="rst-breadcrumbs-buttons" role="navigation" aria-label="{{ _('Breadcrumbs') }}"> |
75 | | - {% if prev %} |
| 74 | + {%- if prev %} |
76 | 75 | <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" aria-hidden="true"></span> {{ _('Previous') }}</a> |
77 | | - {% endif %} |
78 | | - {% if next %} |
| 76 | + {%- endif %} |
| 77 | + {%- if next %} |
79 | 78 | <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" aria-hidden="true"></span></a> |
80 | | - {% endif %} |
| 79 | + {%- endif %} |
81 | 80 | </div> |
82 | | - {% endif %} |
| 81 | + {%- endif %} |
83 | 82 | <hr/> |
84 | 83 | </div> |
0 commit comments