Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only show 'Last updated on ...' when last_updated defined #183

Merged
merged 2 commits into from
Mar 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions python_docs_theme/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -136,21 +136,35 @@ <h3>{{ _('Navigation') }}</h3>

{% block footer %}
<div class="footer">
&copy; {% if theme_copyright_url or hasdoc('copyright') %}<a href="{% if theme_copyright_url %}{{ theme_copyright_url }}{% else %}{{ pathto('copyright') }}{% endif %}">{% endif %}{% trans %}Copyright{% endtrans %}{% if theme_copyright_url or hasdoc('copyright') %}</a>{% endif %} {{ copyright|e }}.
&copy; {% if theme_copyright_url or hasdoc('copyright') %}
<a href="{% if theme_copyright_url %}{{ theme_copyright_url }}{% else %}{{ pathto('copyright') }}{% endif %}">
{% endif %}
{% trans %}Copyright{% endtrans %}
{% if theme_copyright_url or hasdoc('copyright') %}
</a>
{% endif %} {{ copyright|e }}.
<br />
{% trans %}This page is licensed under the Python Software Foundation License Version 2.{% endtrans %}
<br />
{% trans %}Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.{% endtrans %}
<br />
{% if theme_license_url %}{% trans license_file=theme_license_url %}See <a href="{{ license_file }}">History and License</a> for more information.{% endtrans %}<br />{% endif %}
{% if theme_hosted_on %}{% trans hosted_on=theme_hosted_on %}Hosted on {{ hosted_on }}.{% endtrans %}<br />{% endif %}
{% if theme_license_url %}
{% trans license_file=theme_license_url %}See <a href="{{ license_file }}">History and License</a> for more information.{% endtrans %}<br />
{% endif %}
{% if theme_hosted_on %}
{% trans hosted_on=theme_hosted_on %}Hosted on {{ hosted_on }}.{% endtrans %}<br />
{% endif %}
<br />

{% include "footerdonate.html" %}
<br />

{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
{% if theme_issues_url %}{% trans %}<a href="{{ theme_issues_url }}">Found a bug</a>?{% endtrans %}{% endif %}
{%- if last_updated %}
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
{%- endif %}
{% if theme_issues_url %}
{% trans %}<a href="{{ theme_issues_url }}">Found a bug</a>?{% endtrans %}
{% endif %}
<br />

{% trans sphinx_version=sphinx_version|e %}Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
Expand Down
Loading