Bibcite footnotes modified for CKEditor 5
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

23 lines
962 B

{# footnotes/footnote-list.html.twig #}
<ul class="footnotes">
{% for fn in footnotes %}
{% if fn.ref_id is iterable %}
{#
// Output footnote that has more than one reference to it in the body.
// The only difference is to insert backlinks to all references.
// Helper: we need to enumerate a, b, c...
#}
{% set abc = "abcdefghijklmnopqrstuvwxyz"|split('') %}
{% set i = 0 %}
<li class="footnote" id="{{ fn.fn_id }}"><a href="#{{ fn.ref_id.0 }}" class="footnote-label">{{ fn.value }}</a>
{% for ref in fn.ref_id %}
<a class="footnote-multi" href="#{{ ref }}">{{ attribute(abc, i) }}</a>
{% set i = i + 1 %}
{% endfor %}
{{ fn.text|raw }}</li>
{% else %}
{# Output normal footnote. #}
<li class="footnote" id="{{ fn.fn_id }}"><a class="footnote-label" href="#{{ fn.ref_id }}">{{ fn.value }}</a>{{ fn.text|raw }}</li>
{% endif %}
{% endfor %}
</ul>