-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
185 lines (152 loc) · 6.08 KB
/
index.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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
{% extends 'base.html' %}
{% block styles %}
<link rel="stylesheet" href="{% static 'styles/app.scss' %}">
<!-- Custom Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Mulish:ital,wght@0,200..1000;1,200..1000&display=swap" rel="stylesheet">
{% endblock styles %}
{% block scripts %}
{% script 'app' %}
{% endblock scripts %}
{% block content %}
<article>
<div class="container">
<div class="copy-width">
<figure class="graphic-container">
<img class="graphic-photo" src="{% static '/assets/images/grid-map.png' %}" alt="Map of DC showing density of cherry blossom trees">
<div class="legend" aria-hidden="true">
<div class="legend-text legend-title">Cherry blossom trees</div>
<img class="graphic-photo-legend" src="{% static '/assets/images/grid-legend.png' %}" alt="Map of DC showing density of cherry blossom trees">
<div class="legend-text legend-left">Least</div>
<div class="legend-text legend-right">Most</div>
</div>
</figure>
<header class="header">
<h1 class="headline centered">{{ meta.headline }}</h1>
<div class="attribution">
{% set comma = joiner() %}
<p class="byline">
By {%- for author in meta.byline -%}
{% if not loop.last %}{{ comma() }}{% elif not loop.first %} and{% endif %} <span class="author" itemscope itemtype="http://schema.org/Person"><a itemprop="url" href="{{ author.url }}">{{ author.name }}</a></span>
{%- endfor -%}
</p>
<p class="pubdate">March 19, 2024</p>
</div>
</header>
<hr>
{% for p in copy.body %}
<p class="prose">{{ p.value }}</p>
{% endfor %}
<hr>
<figure class="graphic-container">
<div class="graphic-header">
<h3 class="graphic-hed">How Many Trees Can You See Nearby?</h3>
</div>
<div id="map-container">
<div id="map"></div>
<div id="map-overlay">
<!--div class="map-bar-title">How many trees can you see nearby?</div-->
<div class="map-bar-text">
<div id="map-address-text" class="map-highlight-text">2000 GEORGIA AVENUE NW</div>
<div id="map-trees-text">145</div> cherry blossom trees within one half mile
</div>
<div class="checkbox map-bar-text">
<div class="toggle-label-text">Show Metro stations</div>
<div class="toggle-holder">
<input class="toggle-input" id="metro-toggle" type="checkbox" name="metro-toggle" type="checkbox" value="metro">
<label class="toggle-label" for="metro-toggle">
Toggle
</label>
</div>
</div>
<div class="instructions">
<div>Click on the map to count trees</div>
</div>
</div>
</div>
<figcaption class="graphic-footer">
<div>Sources: Tree locations from <a href="https://caseytrees.org/" target="_blank">Casey Trees</a>, Metro locations from <a href="https://opendata.dc.gov/" target="_blank">Open Data DC</a></div>
<div>Note: Trees planted on private property and some parks are not included.</div>
</figcaption>
</figure>
<hr>
{% for p in copy.body2 %}
<p class="prose">{{ p.value }}</p>
{% endfor %}
<hr>
<figure class="graphic-container">
<div class="graphic-header">
<h3 class="graphic-hed">Blossoms Near the Metro</h3>
</div>
<table class="metro-table" id="metro-trees-table" collapsed="true">
<thead>
<tr>
<th scope="col" class="metro-name">Station</th>
<th scope="col">Cherry blossom trees within one half mile</th>
</tr>
</thead>
<tbody>
{% for obj in metro_tree_counts %}
<tr>
<td class="metro-name">{{ obj.name_short }}
<span class="metro-symbols" aria-hidden="true">{{ obj.line_display }}</span>
<span class="sr-only">{{ obj.line_names }}</span>
</td>
<td class="metro-tree-count">
<span class="sr-only">{{ obj.tree_count }}</span>
<div class="tree-bar-container" aria-hidden="true">
<div class="tree-bar-max">
<div class="tree-bar" style="width: {{ (100 * (obj.tree_count/593)) }}%;"> </div>
</div>
<div class="tree-text-holder">
<div class="tree-count" style="left: {{ (100 * (obj.tree_count/593)) }}%;">{{ obj.tree_count }}</div>
</div>
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<button class="table-expand" id="metro-table-expand">+ Click to show all D.C. stations</button>
<figcaption class="graphic-footer copy-width">
<div>Sources: Tree locations from <a href="https://caseytrees.org/" target="_blank">Casey Trees</a>, station locations from <a href="https://opendata.dc.gov/" target="_blank">Open Data DC</a></div>
<div>Note: Trees planted on private property and some parks are not included.</div>
</figcaption>
</figure>
<hr>
{% for p in copy.body3 %}
<p class="prose">{{ p.value }}</p>
{% endfor %}
</div>
</div>
<figure>
<div class="flex-row bordered">
<div class="flex-column">
<img class="photo" src="{% static 'assets/images/white-square.jpeg' %}" alt="Upward view of a tree with white cherry blossoms against a vivid blue sky">
</div>
<div class="flex-column">
<img class="photo" src="{% static 'assets/images/light-pink-square.jpeg' %}" alt="Tree with light pink blossoms in a park">
</div>
<div class="flex-column">
<img class="photo" src="{% static '/assets/images/blossoms-square.jpeg' %}" alt="Close up view of light pink cherry blossoms">
</div>
<div class="flex-column">
<img class="photo" src="{% static 'assets/images/pink-square.jpeg' %}" alt="Branches of tree with medium pink cherry blossoms">
</div>
</div>
<figcaption class="graphic-footer centered">Trees that brought me joy in March 2024.
</figcaption>
</figure>
<div class="container">
<div class="copy-width">
<section id="about">
<h3 class="graphic-hed">How I Built It</h3>
{% for p in copy.about %}
<p class="methods">{{ p.value }}</p>
{% endfor %}
</section>
</div>
</div>
</article>
{% endblock content %}