-
Notifications
You must be signed in to change notification settings - Fork 0
/
_htmlstory.html
71 lines (62 loc) · 1.84 KB
/
_htmlstory.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{#
# Template for an HTML story published to P2P.
#
# If you want to publish multiple HTML stories, copy, or inherit from
# this template.
#
#}
{% block content %}
<section class='intro'>
{% include '_table.html' %}
<div class="intro__text">
{{ intro|markdown }}
</div>
</section>
<h2 class='nations-title'>{{ nations_title }}</h2>
<p class='nations-subtitle'>{{ nations_subtitle }}</p>
{# <!-- This is the chart key --> #}
<dl class='nation-key'>
<dt>
<span></span>
</dt>
<dd>{{ legend_banned }}</dd>
</dl>
{# <!-- Loop through each nation in the spreadsheet, but only include those who have refugees here. The one exception is Libya, which is included here b/c it is on the banned list --> #}
<div id='nations' class='nations'>
{% for nation in nations[1:]|sort(true, attribute="TOTAL_2007") %}
{% if nation.BANNED == 1 or nation.TOTAL_2007 > 0 %}
{% set n = nation %}
{% set i = loop.index %}
{% include '_nation-chart.html' %}
{% endif %}
{% endfor %}
</div>
{# <!-- The usual closing out stuff. --> #}
<div class='credits'>
{{ sources|markdown }}
{{ credits|markdown }}
</div>
{% endblock content %}
{% block library_scripts %}
{# Uncomment this if you are using libraries such as jQuery #}
<script src="//{{ ROOT_URL }}/js/vendor.min.js"></script>
{% endblock %}
{% block scripts %}
{# Uncomment this if you are using custom JavaScript #}
<script src="//{{ ROOT_URL }}/js/app.min.js"></script>
<script>
(function(document) {
window.data = {{ nations|tojson }};
window.cities = {{ cities|tojson }};
var CSS = [
"//{{ ROOT_URL }}/css/styles.css"
];
CSS.forEach(function(url) {
var link = document.createElement('link');
link.setAttribute('rel', 'stylesheet');
link.setAttribute('href', url);
document.head.appendChild(link);
});
})(document);
</script>
{% endblock scripts %}