Skip to content

Commit

Permalink
Create data-footer.html
Browse files Browse the repository at this point in the history
  • Loading branch information
chriscalleja3 authored Nov 7, 2024
1 parent e76662a commit 05b6078
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions _includes/components/indicator/data-footer.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<div id="{{ include.footerId | default: 'selectionChartFooter' }}" class="table-footer-text">
<h5 class="sr-only">Chart details</h5>
<dl>
{% if page.indicator.national_geographical_coverage and page.indicator.national_geographical_coverage != '' %}
<dt>{{ page.t.indicator.geographical_area }}:</dt>
<dd>{{ page.indicator.national_geographical_coverage }}</dd>
{% endif %}

<dt class="data-controlled-footer-field unit-from-data">{{ page.t.indicator.unit_of_measurement }}:</dt>
<dd class="data-controlled-footer-field unit-from-data"></dd>

{% if page.indicator.copyright and page.indicator.copyright != '' %}
<dt>{{ page.t.metadata_fields.copyright }}:</dt>
<dd>{{ page.indicator.copyright }}</dd>
{% endif %}

{% if page.indicator.data_footnote and page.indicator.data_footnote != '' %}
<dt>{{ page.t.indicator.footnote }}:</dt>
<dd>{{ page.indicator.data_footnote }}</dd>
{% endif %}

{% if page.indicator.footer_fields and page.indicator.footer_fields.size > 0 %}
{% for footer_field in page.indicator.footer_fields %}
<dt
data-for-series={{ footer_field.series | default: "" | jsonify }}
data-for-unit={{ footer_field.unit | default: "" | jsonify }}
>{{ footer_field.label | t }}:</dt>
<dd
data-for-series={{ footer_field.series | default: "" | jsonify }}
data-for-unit={{ footer_field.unit | default: "" | jsonify }}
>{{ footer_field.value | t }}</dd>
{% endfor %}
{% endif %}

{% if site.time_series_attributes and site.time_series_attributes.size > 0 %}
{% for ts_attribute in site.time_series_attributes %}
<dt
class="data-controlled-footer-field"
data-ts-attribute={{ ts_attribute.field | jsonify }}
>{{ ts_attribute.label | t }}:</dt>
<dd
class="data-controlled-footer-field"
data-ts-attribute={{ ts_attribute.field | jsonify }}
></dd>
{% endfor %}
{% endif %}
</dl>
{% if site.observation_attributes and site.observation_attributes.size > 0 %}
<dl class="observation-attribute-list"></dl>
{% endif %}
</div>

0 comments on commit 05b6078

Please sign in to comment.