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

Add support for multiple copyright statements #225

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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: 23 additions & 1 deletion alabaster/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,31 @@
{%- endif %}
{%- endblock %}

{%- macro pipe_split_copyright_block() %}
{%- if hasdoc('copyright') %}
{%- set copyright_prefix = '<a href="' + pathto('copyright') + '">' + _('Copyright') + '</a>' -%}
{%- else %}
{%- set copyright_prefix = _('Copyright') %}
{%- endif %}
{%- if copyright is iterable and copyright is not string %}
{% for copyright_line in copyright %}
{% trans trimmed copyright_prefix=copyright_prefix, copyright=copyright_line|e %}
&#169; {{ copyright_prefix }} {{ copyright }}.
{% endtrans %}
{% if not loop.last %}|{% endif %}
{% endfor %}
{%- else %}
{% trans trimmed copyright_prefix=copyright_prefix, copyright=copyright|e %}
&#169; {{ copyright_prefix }} {{ copyright }}.
{% endtrans %}
{%- endif %}
{%- endmacro %}

{%- block footer %}
<div class="footer">
{% if show_copyright %}&#169;{{ copyright }}.{% endif %}
{%- if show_copyright %}
{{- pipe_split_copyright_block() -}}
{%- endif %}
{% if show_sphinx %}
{% if show_copyright %}|{% endif %}
Powered by <a href="https://www.sphinx-doc.org/">Sphinx {{ sphinx_version }}</a>
Expand Down
Loading