Skip to content

Commit a6404c7

Browse files
committed
Update for logo and footer
1 parent 416d56d commit a6404c7

File tree

10 files changed

+496
-32
lines changed

10 files changed

+496
-32
lines changed

source/_templates/breadcrumbs.html

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{%- if meta is defined and meta is not none %}
2+
{%- set check_meta = True %}
3+
{%- else %}
4+
{%- set check_meta = False %}
5+
{%- endif %}
6+
7+
{%- if check_meta and 'github_url' in meta %}
8+
{%- set display_github = True %}
9+
{%- endif %}
10+
11+
{%- if check_meta and 'bitbucket_url' in meta %}
12+
{%- set display_bitbucket = True %}
13+
{%- endif %}
14+
15+
{%- if check_meta and 'gitlab_url' in meta %}
16+
{%- set display_gitlab = True %}
17+
{%- endif %}
18+
19+
{%- set display_vcs_links = display_vcs_links if display_vcs_links is defined else True %}
20+
21+
{#- Translators: This is an ARIA section label for page links, including previous/next page link and links to GitHub/GitLab/etc. -#}
22+
<div role="navigation" aria-label="{{ _('Page navigation') }}">
23+
<ul class="wy-breadcrumbs">
24+
{%- block breadcrumbs %}
25+
<li><a href="{{ pathto(master_doc) }}" class="icon icon-home" aria-label="Home"></a></li>
26+
{%- for doc in parents %}
27+
<li class="breadcrumb-item"><a href="{{ doc.link|e }}">{{ doc.title }}</a></li>
28+
{%- endfor %}
29+
<li class="breadcrumb-item active">{{ title }}</li>
30+
{%- endblock %}
31+
{%- block breadcrumbs_aside %}
32+
<li class="wy-breadcrumbs-aside">
33+
{%- if hasdoc(pagename) and display_vcs_links %}
34+
{%- if display_github %}
35+
{%- if check_meta and 'github_url' in meta %}
36+
<!-- User defined GitHub URL -->
37+
<a href="{{ meta['github_url'] }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
38+
{%- else %}
39+
<a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/{{ theme_vcs_pageview_mode or "blob" }}/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ page_source_suffix }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
40+
{%- endif %}
41+
{%- elif display_bitbucket %}
42+
{%- if check_meta and 'bitbucket_url' in meta %}
43+
<!-- User defined Bitbucket URL -->
44+
<a href="{{ meta['bitbucket_url'] }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a>
45+
{%- else %}
46+
<a href="https://bitbucket.org/{{ bitbucket_user }}/{{ bitbucket_repo }}/src/{{ bitbucket_version}}{{ conf_py_path }}{{ pagename }}{{ page_source_suffix }}?mode={{ theme_vcs_pageview_mode or "view" }}" class="fa fa-bitbucket"> {{ _('Edit on Bitbucket') }}</a>
47+
{%- endif %}
48+
{%- elif display_gitlab %}
49+
{%- if check_meta and 'gitlab_url' in meta %}
50+
<!-- User defined GitLab URL -->
51+
<a href="{{ meta['gitlab_url'] }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a>
52+
{%- else %}
53+
<a href="https://{{ gitlab_host|default("gitlab.com") }}/{{ gitlab_user }}/{{ gitlab_repo }}/{{ theme_vcs_pageview_mode or "blob" }}/{{ gitlab_version }}{{ conf_py_path }}{{ pagename }}{{ page_source_suffix }}" class="fa fa-gitlab"> {{ _('Edit on GitLab') }}</a>
54+
{%- endif %}
55+
{%- elif show_source and source_url_prefix %}
56+
<a href="{{ source_url_prefix }}{{ pagename }}{{ page_source_suffix }}">{{ _('View page source') }}</a>
57+
{%- elif show_source and has_source and sourcename %}
58+
<a href="{{ pathto('_sources/' + sourcename, true)|e }}" rel="nofollow"> {{ _('View page source') }}</a>
59+
{%- endif %}
60+
{%- endif %}
61+
</li>
62+
{%- endblock %}
63+
</ul>
64+
65+
{%- if (theme_prev_next_buttons_location == 'top' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
66+
{#- Translators: This is an ARIA section label for sequential page links, such as previous and next page links. -#}
67+
<div class="rst-breadcrumbs-buttons" role="navigation" aria-label="{{ _('Sequential page navigation') }}">
68+
{%- if prev %}
69+
<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>
70+
{%- endif %}
71+
{%- if next %}
72+
<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>
73+
{%- endif %}
74+
</div>
75+
{%- endif %}
76+
<hr/>
77+
</div>

source/_templates/footer.html

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
<footer>
2+
{%- if (theme_prev_next_buttons_location == 'bottom' or theme_prev_next_buttons_location == 'both') and (next or prev) %}
3+
{#- Translators: This is an ARIA section label for the footer section of the page. -#}
4+
<div class="rst-footer-buttons" role="navigation" aria-label="{{ _('Footer') }}">
5+
{%- if prev %}
6+
<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" aria-hidden="true"></span> {{ _('Previous') }}</a>
7+
{%- endif %}
8+
{%- if next %}
9+
<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" aria-hidden="true"></span></a>
10+
{%- endif %}
11+
</div>
12+
{%- endif %}
13+
14+
<hr/>
15+
16+
{# Add centered images with links #}
17+
<div class="footer-images">
18+
<a href="{{ logo_image_info['logo_image_1']['link'] }}" target="_blank">
19+
<img src="{{ pathto(logo_image_info['logo_image_1']['path'], 1) }}" alt="{{ logo_image_info['logo_image_1']['alt'] }}" class="center-image">
20+
</a>
21+
<a href="{{ logo_image_info['logo_image_2']['link'] }}" target="_blank">
22+
<img src="{{ pathto(logo_image_info['logo_image_2']['path'], 1) }}" alt="{{ logo_image_info['logo_image_2']['alt'] }}" class="center-image">
23+
</a>
24+
<a href="{{ logo_image_info['logo_image_3']['link'] }}" target="_blank">
25+
<img src="{{ pathto(logo_image_info['logo_image_3']['path'], 1) }}" alt="{{ logo_image_info['logo_image_3']['alt'] }}" class="center-image">
26+
</a>
27+
<a href="{{ logo_image_info['logo_image_4']['link'] }}" target="_blank">
28+
<img src="{{ pathto(logo_image_info['logo_image_4']['path'], 1) }}" alt="{{ logo_image_info['logo_image_4']['alt'] }}" class="center-image">
29+
</a>
30+
<a href="{{ logo_image_info['logo_image_5']['link'] }}" target="_blank">
31+
<img src="{{ pathto(logo_image_info['logo_image_5']['path'], 1) }}" alt="{{ logo_image_info['logo_image_5']['alt'] }}" class="center-image">
32+
</a>
33+
</div>
34+
35+
<style>
36+
.footer-images {
37+
text-align: center;
38+
margin-top: 20px;
39+
}
40+
41+
.footer-images .center-image {
42+
display: inline-block;
43+
margin: 10px;
44+
max-width: 80px !important; /* Adjust this value as needed and use !important to ensure it overrides other styles */
45+
}
46+
</style>
47+
48+
<div role="contentinfo">
49+
{%- block contentinfo %}
50+
<p>
51+
{%- if show_copyright %}
52+
{%- if hasdoc('copyright') %}
53+
{%- trans path=pathto('copyright'), copyright=copyright|e %}&#169; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
54+
{%- else %}
55+
{%- trans copyright=copyright|e %}&#169; Copyright {{ copyright }}.{% endtrans %}
56+
{%- endif %}
57+
{%- endif %}
58+
59+
{%- if build_id and build_url %}
60+
<span class="build">
61+
{#- Translators: Build is a noun, not a verb -#}
62+
{%- trans %}Build{% endtrans -%}
63+
<a href="{{ build_url }}">{{ build_id }}</a>.
64+
</span>
65+
{%- elif commit %}
66+
<span class="commit">
67+
{#- Translators: the phrase "revision" comes from Git, referring to a commit #}
68+
{%- trans %}Revision{% endtrans %} <code>{{ commit }}</code>.
69+
</span>
70+
{%- endif %}
71+
{%- if last_updated %}
72+
<span class="lastupdated">
73+
{%- trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
74+
</span>
75+
{%- endif -%}
76+
77+
</p>
78+
{%- endblock %}
79+
</div>
80+
81+
{% if show_sphinx %}
82+
{%- set sphinx_web = '<a href="https://www.sphinx-doc.org/">Sphinx</a>' %}
83+
{%- set readthedocs_web = '<a href="https://readthedocs.org">Read the Docs</a>' %}
84+
{#- Translators: the variable "sphinx_web" is a link to the Sphinx project documentation with the text "Sphinx" #}
85+
{%- trans sphinx_web=sphinx_web, readthedocs_web=readthedocs_web %}Built with {{ sphinx_web }} using a{% endtrans %}
86+
{#- Translators: "theme" refers to a theme for Sphinx, which alters the appearance of the generated documentation #}
87+
<a href="https://github.com/readthedocs/sphinx_rtd_theme">{% trans %}theme{% endtrans %}</a>
88+
{#- Translators: this is always used as "provided by Read the Docs", and should not imply Read the Docs is an author of the generated documentation. #}
89+
{% trans %}provided by {{ readthedocs_web }}{% endtrans %}.
90+
{% endif %}
91+
92+
{%- block extrafooter %} {% endblock %}
93+
94+
</footer>

0 commit comments

Comments
 (0)