Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit b7fb257

Browse files
authored
Merge pull request #512 from eregs/511-footnotes
Ensure footnotes template has proper params.
2 parents 2f75507 + 8b7cbed commit b7fb257

4 files changed

Lines changed: 22 additions & 18 deletions

File tree

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
1-
{% if sub_context.node.footnotes %}
2-
<div class="footnote-box">
3-
<h5>Footnotes</h5>
4-
<ul class="footnotes">
5-
{% for footnote in sub_context.node.footnotes %}
6-
<li id="footnote-{{footnote.ref}}">
7-
<span class="reference-num">{{footnote.ref}}.</span>
8-
<p>
9-
{{footnote.note}}
10-
</p>
11-
</li>
12-
{% endfor %}
13-
</ul>
14-
</div>
15-
{% endif %}
1+
{% comment %}
2+
Lists footnotes at the bottom of a section. Assumes the "footnotes" variable
3+
is defined as a list.
4+
{% endcomment %}
5+
{% if footnotes %}
6+
<div class="footnote-box">
7+
<h5>Footnotes</h5>
8+
<ul class="footnotes">
9+
{% for footnote in footnotes %}
10+
<li id="footnote-{{footnote.ref}}">
11+
<span class="reference-num">{{footnote.ref}}.</span>
12+
<p>
13+
{{footnote.note}}
14+
</p>
15+
</li>
16+
{% endfor %}
17+
</ul>
18+
</div>
19+
{% endif %}

regulations/templates/regulations/preamble-partial.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
{% endif %}
1818
</div>
1919

20-
{% include "regulations/footnotes.html" %}
20+
{% include "regulations/footnotes.html" with footnotes=sub_context.node.footnotes only %}
2121
{% include "regulations/navigation.html" %}
2222
</div>
2323

regulations/templates/regulations/regulation_text.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ <h3 class="section-title" tabindex="0"> {{c.header|safe}} </h3>
3333
{% endwith %}
3434
{% endif %}
3535

36-
{% include "regulations/footnotes.html" %}
36+
{% include "regulations/footnotes.html" with footnotes=c.footnotes only %}
3737

3838
</section>
3939
{% endif %}

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
setup(
55
name="regulations",
6-
version="8.4.0",
6+
version="8.4.1",
77
packages=find_packages(),
88
include_package_data=True,
99
install_requires=[

0 commit comments

Comments
 (0)