breadcrumbs.html (3921B)
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 {% set display_vcs_links = display_vcs_links if display_vcs_links is defined else True %} 28 29 <div role="navigation" aria-label="breadcrumbs navigation"> 30 31 <ul class="wy-breadcrumbs"> 32 {% block breadcrumbs %} 33 <li><a href="{{ pathto(master_doc) }}" class="icon icon-home"></a> »</li> 34 {% for doc in parents %} 35 <li><a href="{{ doc.link|e }}">{{ doc.title }}</a> »</li> 36 {% endfor %} 37 <li>{{ title }}</li> 38 {% endblock %} 39 {% block breadcrumbs_aside %} 40 <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 %} 44 <!-- User defined GitHub URL --> 45 <a href="{{ meta['github_url'] }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a> 46 {% else %} 47 <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 %} 51 <!-- User defined Bitbucket URL --> 52 <a href="{{ meta['bitbucket_url'] }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a> 53 {% else %} 54 <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 %} 58 <!-- User defined GitLab URL --> 59 <a href="{{ meta['gitlab_url'] }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a> 60 {% else %} 61 <a href="https://{{ gitlab_host|default("gitlab.com") }}/{{ gitlab_group }}" class="fa fa-gitlab"> {{ _('Repositories') }}</a> 62 {% endif %} 63 {% elif show_source and source_url_prefix %} 64 <a href="{{ source_url_prefix }}{{ pagename }}{{ suffix }}">{{ _('View page source') }}</a> 65 {% elif show_source and has_source and sourcename %} 66 <a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow"> {{ _('View page source') }}</a> 67 {% endif %} 68 {% endif %} 69 </li> 70 {% endblock %} 71 </ul> 72 73 {% if (theme_prev_next_buttons_location == 'top' or theme_prev_next_buttons_location == 'both') and (next or prev) %} 74 <div class="rst-breadcrumbs-buttons" role="navigation" aria-label="breadcrumb navigation"> 75 {% if next %} 76 <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> 77 {% endif %} 78 {% if prev %} 79 <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> 80 {% endif %} 81 </div> 82 {% endif %} 83 <hr/> 84 </div>