From 55540ef3992e598bd7de200dfd1293f53a76fa41 Mon Sep 17 00:00:00 2001 From: Brecht Ooms Date: Fri, 25 Oct 2024 13:36:15 +0200 Subject: [PATCH] Add support for multiple copyright statements --- alabaster/layout.html | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/alabaster/layout.html b/alabaster/layout.html index d71dcec..80c476e 100644 --- a/alabaster/layout.html +++ b/alabaster/layout.html @@ -85,9 +85,31 @@ {%- endif %} {%- endblock %} +{%- macro pipe_split_copyright_block() %} + {%- if hasdoc('copyright') %} + {%- set copyright_prefix = '' + _('Copyright') + '' -%} + {%- 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 %} + © {{ copyright_prefix }} {{ copyright }}. + {% endtrans %} + {% if not loop.last %}|{% endif %} + {% endfor %} + {%- else %} + {% trans trimmed copyright_prefix=copyright_prefix, copyright=copyright|e %} + © {{ copyright_prefix }} {{ copyright }}. + {% endtrans %} + {%- endif %} +{%- endmacro %} + {%- block footer %}