Skip to content

Commit

Permalink
Templates
Browse files Browse the repository at this point in the history
  • Loading branch information
willbarton committed Jul 1, 2024
1 parent 4cf9854 commit 02998d8
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions cfgov/v1/jinja2/v1/includes/rich-text/footnote.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<a href="#footnote-{{ index }}" id="footnote-source-{{ index }}"><sup>{{ index }}</sup></a>
13 changes: 13 additions & 0 deletions cfgov/v1/jinja2/v1/layouts/_footnotes.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{% if page and page.footnotes_list %}
<div class="m-full-width-text">
<h2>Footnotes</h2>
<ol>
{% for footnote in page.footnotes_list %}
<li id="footnote-{{ loop.index }}">
{{ footnote.text | richtext }}
<a href="#footnote-source-{{ loop.index }}" aria-label="Back to content"></a>
</li>
{% endfor %}
</ol>
</div>
{% endif %}
1 change: 1 addition & 0 deletions cfgov/v1/jinja2/v1/layouts/layout-1-3.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<div class="u-layout-grid__main"
id="content__main">
{% block content_main scoped -%}{%- endblock %}
{% include 'v1/layouts/_footnotes.html' %}
</div>
{% endblock %}
</div>
Expand Down
1 change: 1 addition & 0 deletions cfgov/v1/jinja2/v1/layouts/layout-2-1.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
{% block body_content scoped %}
<div class="u-layout-grid__main">
{% block content_main scoped -%}{%- endblock %}
{% include 'v1/layouts/_footnotes.html' %}
</div>
<aside class="u-layout-grid__sidebar">
{% block content_sidebar scoped -%}{%- endblock %}
Expand Down
1 change: 1 addition & 0 deletions cfgov/v1/jinja2/v1/layouts/layout-full.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
{# content__main_modifiers block is only used by the homepage #}
<div class="u-layout-grid__main {% block content_main_modifiers -%}{%- endblock %}">
{% block content_main scoped -%}{%- endblock %}
{% include 'v1/layouts/_footnotes.html' %}
</div>
{% endblock %}
</div>
Expand Down

0 comments on commit 02998d8

Please sign in to comment.