-
Notifications
You must be signed in to change notification settings - Fork 19
/
child_template.html
146 lines (132 loc) · 4.01 KB
/
child_template.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<!DOCTYPE html>
<html lang="en">
<head>
<title>Graphic : NPR</title>
<meta name="description" content="">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="robots" content="noindex" />
<link rel="shortcut icon" href="http://media.npr.org/favicon.ico" />
<style type="text/css">
/* base styles */
html { -webkit-text-size-adjust: none; }
body {
margin: 0;
padding: 0;
font: 14px/1.4 Arial, Helvetica, sans-serif;
color: #333;
}
h1 {
margin: 0 0 15px 0;
font-size: 16px;
color: #333;
}
h2 {
font-weight: normal;
color: #666;
font-size: 14px;
margin: -7px 0 22px 0;
}
.footnotes { margin-bottom: 20px; }
.footnotes h4 {
margin: 2px 0 7px 0;
color: #666;
font-size: 11px;
}
.footnotes p,
.footer p {
margin: 2px 0 0 0;
font-size: 11px;
line-height: 1.3;
color: #808080;
}
a, a:link, a:visited {
color: #4774CC;
text-decoration: none;
}
a:hover, a:active { opacity: 0.7; }
/* graphic */
#graphic {
margin: 0 0 11px 0;
position: relative;
}
#graphic img.fallback {
max-width: 100%;
height: auto;
}
.key {
margin: 0 0 22px 0;
padding: 0;
list-style-type: none;
}
.key .key-item {
display: inline-block;
margin: 0 18px 0 0;
padding: 0;
line-height: 15px;
}
.key .key-item b {
display: inline-block;
width: 15px;
height: 15px;
margin-right: 6px;
float: left;
}
.key .key-item label {
white-space: nowrap;
font-size: 12px;
color: #333;
font-weight: normal;
}
.axis {
font-size: 12px;
fill: #666;
}
.axis path,
.axis line {
fill: none;
stroke: #666;
shape-rendering: crispEdges;
}
.axis.y path { display: none; }
.axis.y .tick line { display: none; }
.grid path { display: none; }
.grid .tick {
stroke: #ccc;
stroke-dasharray: 1px 3px;
stroke-width: 1px;
shape-rendering: crispEdges;
}
.grid.y .tick:first-child { display: none; }
.lines {
fill: none;
stroke-width: 3px;
stroke: #ccc;
}
</style>
</head>
<body>
{% if COPY.labels.headline %}<h1>{{ COPY.labels.headline }}</h1>{% endif %}
{% if COPY.labels.subhed %}<h2>{{ COPY.labels.subhed }}</h2>{% endif %}
<div id="graphic"><img src="fallback.png" alt="[Chart]" class="fallback" /></div>
{% if COPY.labels.footnote %}
<div class="footnotes">
<h4>Notes</h4>
<p>{{ COPY.labels.footnote }}</p>
</div>
{% endif %}
<div class="footer">
{% if COPY.labels.source %}<p>Source: {{ COPY.labels.source }}</p>{% endif %}
{% if COPY.labels.credit %}<p>Credit: {{ COPY.labels.credit }}</p>{% endif %}
</div>
<script type="text/javascript">
var GRAPHIC_DATA = {{ COPY.data_line.json() }};
</script>
<script src="js/lib/jquery.min.js" type="text/javascript"></script>
<script src="js/lib/d3.min.js" type="text/javascript"></script>
<script src="js/lib/modernizr.svg.min.js" type="text/javascript"></script>
<script src="js/lib/pym.js" type="text/javascript"></script>
<script src="js/graphic.js" type="text/javascript"></script>
</body>
</html>