-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_tax-base.html
424 lines (360 loc) · 16.7 KB
/
_tax-base.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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
{% extends "_base.html" %}
{% macro aside(aside_type, add_class) %}
{% if aside_type == 'subscribe' %}
{% set refer_url = refers[aside_type + "_url"]['text'] %}
{% else %}
{% set refer_url = "http://" + ROOT_URL + "/" + refers[aside_type + "_url"]['text'] %}
{% endif %}
<aside class='refer refer--{{ aside_type }} {% if add_class %} {{ add_class }} {% endif %}'>
<h3 class='refer__headline'>{{ refers[aside_type + "_headline"]['text']|dumb_to_smart_quotes|process_text() }}</h3>
<p class='refer__blurb'>{{ refers[aside_type + "_text"]['text']|dumb_to_smart_quotes|process_text() }}</p>
{% if refers[aside_type + "_url"] and refers[aside_type + "_button_text"] %}
<a class='refer__button' href='{{ refer_url }}' target="_blank">{{ refers[aside_type + "_button_text"]["text"] }}</a>
{% endif %}
</aside>
{% endmacro %}
{% macro add_photo(url, add_class, caption, alt) %}
<figure class='image {{ add_class }}'>
<img src='{{ url }}' alt='{{ alt }}'/>
<figcaption> {{ caption }}</figcaption>
</figure>
{% endmacro %}
{% macro add_p2p_photo(slug, add_class, width, display_caption, display_credit) %}
{% set photo = get_p2p_content_item(slug) %}
{% if photo|check_if_is_okay_to_publish %}
{% set caption = "" %}
{% if display_caption %}
{% set caption = caption + photo.caption|striptags|strip_whitespace %}
{% endif %}
{% if display_credit %}
{% set caption = caption + " (" + photo.credit|striptags|strip_whitespace + ")" %}
{% endif %}
<figure class='image image--lazy {{ add_class }}'>
<img data-full-res-src='{{ photo.photo_services_url }}/{{ width }}' src='{{ photo.photo_services_url }}/10' alt='{{ photo.title }} title='{{ photo.title }}'/>
<noscript>
{# Experiement to see if this is a suitable fallback for noJS users #}
{# <img src='{{ photo.photo_services_url }}/{{ width }}' alt='{{ photo.title }} title='{{ photo.title }}'/> #}
</noscript>
<figcaption>{{ caption }}</figcaption>
</figure>
{% else %}
<p style='padding:20px;background:red; color:yellow'>Photo (slug: {{ slug }}) is not set to "live"</p>
{% endif %}
{% endmacro %}
{% macro ad(type, alignment) %}
{# returns an advert <div> with the proper alignment classes and data-* attributes to make it fit within this project. #}
{% if alignment %}
{% set class = "advert--" + alignment%}
{% endif %}
{% if type == "cube" %}
<div class="advert {{ class }}" data-ad-type="shrinky-cube"></div>
{% elif type == "leaderboard" %}
<div class="advert" data-ad-type="leaderboard"></div>
{% endif %}
{% endmacro %}
{% macro keep_scrolling_icon() %}
<div class='story-header__scrolling-icon'>
<span>{{ scrolling_icon_text }}</span>
<i class="fa fa-arrow-circle-down fa-2x" aria-hidden="true"></i>
</div>
{% endmacro %}
{% macro pullquote(quote_text, quote_attribution, quote_attribution_secondary) %}
{% set page_url = "http://" + ROOT_URL + "/" + PATH %}
{% set tweet = quote_text + ' #TaxDivide from @chicagotribune' %}
<figure class="trib-pullquote">
<ul class="social-menu">
<li>
<a target="_blank" href="https://twitter.com/share?url={{ page_url }}&text={{ tweet|urlencode }}">
<i class="fa fa-twitter fa-2x" aria-hidden="true"></i>
<span class="hidden">Twitter</span>
</a>
</li>
<li>
<a target="_blank" href="https://www.facebook.com/sharer.php?u={{ page_url }}&t={{ quote_text|urlencode }}">
<i class="fa fa-facebook fa-2x" aria-hidden="true"></i>
<span class="hidden">Facebook</span>
</a>
</li>
</ul>
{# <p>{{ quote_text|length }} CHARS QUOTE</p>
<p>{{ tweet|length }} CHARS TOTAL</p> #}
<blockquote>{{ quote_text|dumb_to_smart_quotes|process_text() }}</blockquote>
{% if quote_attribution %}
<figcaption>
{{ quote_attribution|process_text() }}
{% if quote_attribution_secondary|process_text() %}<span>{{ quote_attribution_secondary|process_text() }}</span>{% endif %}
</figcaption>
{% endif %}
</figure>
{% endmacro %}
{% macro add_chart(id, addon_class, url) %}
{% if addon_class %}
{% set class = addon_class %}
{% else %}
{% set class = "" %}
{% endif %}
<div class='chart chart--{{ id }} {{ class }}'>
<div id='{{ id }}' class='graphic-embed' data-iframe-url='{{ url }}'></div>
{# {% include "_subtemplates/_loading-spinner.html" %} #}
</div>
{% endmacro %}
{% macro add_video(id, link_base_url, addon_class="", header, video_slug) %}
{% set video = get_p2p_content_item(video_slug) %}
{# {{ video }} #}
{# <img src="{{ photo['alt_thumbnail_url']|format_video_thumb }}" /> #}
{% if addon_class %}
{% set class = addon_class %}
{% else %}
{% set class = "" %}
{% endif %}
{# Randomstring for an id. #}
{% set id = id|generate_id %}
{% set video_player_ref = link_base_url|get_video_ref %}
<div class='video {{ class }}'>
{% if header %}
<h4 class='video__headline'>{{ header }}</h4>
{% endif %}
<div class='video__wrapper'>
<div class='video__object-wrapper'>
<video data-account="3690581440001"
data-player="S1vBkbMfe"
data-embed="default"
data-video-id="ref:{{ video['id'] }}"
data-application-id
tabindex="-1"
class="video-js"
controls></video>
</div>
</div>
</div>
{% endmacro %}
{% macro add_author(name, email) %}
<a itemprop="author" {% if email %}href="mailto:{{- email -}}?subject=Regarding: {{ overall_project_title }}"{% endif %}>{{- name -}}</a>
{% endmacro%}
{% block nav scoped %}
{% set part = part %}
{% include '_subtemplates/_nav.html' %}
{% endblock nav %}
{% block opengraph scoped %}
{% set part = part %}
<link rel="canonical" href="http://{{ ROOT_URL }}/{{ PATH }}" />
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@chicagotribune" />
<meta name="twitter:creator" content="@chicagotribune" />
<meta property="og:url" content="http://{{ ROOT_URL }}/{{ PATH }}" />
<meta property="og:type" content="article" />
{% set keywords = part|fetch_keywords %}
<meta name="keywords" content="{{ keywords }}">
{% block opengraph_story_specific scoped %}
{# These are generic fallbacks. They can be customized on the story template #}
<meta name="twitter:title" content="{{ title }}" />
<meta name="twitter:description" content="{{ og_description }}" />
<meta name="twitter:image" content="{{ og_image }}" />
<meta name="twitter:image:alt" content="{{ og_image_alt_text }}" />
{# OPENGRAPH #}
<meta property="og:title" content="{{ title }}" />
<meta property="og:description" content="{{ og_description }}" />
<meta property="og:image" content="{{ og_image }}" />
{% endblock opengraph_story_specific %}
{% endblock %}
{% block content %}
{#
Remove ad per convo with Kaarin, JB and Kurt.
{{ ad('leaderboard', false) }}
#}
{% block story_header scoped %}
<article itemprop="mainEntityOfPage">
{% set part = part %}
{% include '_subtemplates/' + part + '/_header-supplement.html' ignore missing %}
<section class='story-header story-header--{{ part }}'>
{# The main image, required by google #}
<meta itemprop="image" content="http://{{ ROOT_URL }}/img/posters/{{ self.video_poster() }}--large.jpg"></meta>
{% block video_background %}
<div style='background:url(img/posters/{{ self.video_poster() }}--small.jpg) center center no-repeat;background-size:cover;' class='story-header__display'>
<div class='story-header__video'>
{% for size in ["small", "large"] %}
{# Two sizes so larger screens can get larger displays #}
<video class='header-video header-video--{{ size }}' autoplay muted loop
poster='img/posters/{% block video_poster %}{% endblock video_poster %}--{{ size }}.jpg'
style='width:100%;'>
{# There are several different sources. Each day should use the same filename #}
<source src="http://{{ ROOT_URL }}/img/videos/{% block video_file_name %}{% endblock video_file_name %}--{{ size }}.webm" type="video/webm">
<source src="http://{{ ROOT_URL }}/img/videos/{{ self.video_file_name() }}--{{ size }}.mp4" type="video/mp4">
</video>
{% endfor %}
<div class='story-header__video-controls video-controls'>
<button id='pause' class='video-control video-control--pause video-control--visible'>
<i class="fa fa-pause-circle" aria-hidden="true"></i>
Pause
</button>
<button id='play' class='video-control video-control--play'>
<i class="fa fa-play-circle" aria-hidden="true"></i>
Resume
</button>
</div>
</div>
<div class='story-header__video-texture'></div>
<p class='story-header__caption'>{% block mobile_image_alt_text %}{% endblock mobile_image_alt_text %} <br />({% block video_credit %}{% endblock video_credit %})</p>
{# <i class="fa fa-arrow-circle-down fa-2x story-header__scrolling-icon" aria-hidden="true"></i> #}
{% endblock video_background %}
<div class='story-header__project-title'>
{# Editors want to hide the "tribune watchdog" label from all collaborative parts #}
{% set credits_note = part|show_note %}
{% if credits_note %}
{% set title_prefix = "" %}
{% else %}
{% set title_prefix = "Tribune watchdog: <br />" %}
{% endif %}
<span class='story-header__project-title-inner'>
<p>{{ title_prefix|process_text() }}{{ title }}</p>
</span>
</div>
<h2 class='story-header__headline'>
{% block headline %}{% endblock headline %}
</h2>
<h1 class='story-header__subheadline' itemprop="headline">
{% block dek %}{% endblock dek %}
</h1>
</div>
<div class='container'>
{# <div class='row'> #}
{# <div class='col-xs-12'> #}
<div class='river--narrow'>
{# SOCIAL MEDIA BUTTONS #}
{% set page_url = "http://" + ROOT_URL + "/" + PATH %}
<ul class="social-menu">
<li>
<a target="_blank" href="https://twitter.com/share?url={{ page_url }}&text={% block tweet %}{{ twitter_description|urlencode }}{% endblock tweet%}">
<i class="fa fa-twitter fa-2x"></i> <span class="hidden">Twitter</span>
</a>
</li>
<li>
<a target="_blank" href="https://www.facebook.com/sharer.php?u={{ page_url }}&t={% block facebook %}{{ og_description|urlencode }}{% endblock facebook %}">
<i class="fa fa-facebook fa-2x"></i> <span class="hidden">Facebook</span>
</a>
</li>
</ul>
<div class='byline'>
{% block byline %}{% endblock byline%}
{# <time class='byline-publish-date' itemprop="datePublished">Published: {{ publish_date|xldate_to_datetime|format_date("%B %d, %Y") }}</time>
#} </div>
</div>
{# </div> #}
{# </div> #}
</div>
</section>
{% endblock story_header %}
<div class="container" itemprop="articleBody">
<div class='river--narrow'>{% block story %}{% endblock story %}</div>
</div>
</article>
{% block credits scoped %}
{% set part = part %}
{% include '_subtemplates/_credits.html' %}
{% endblock credits %}
{% block solid_opinion_comments scoped %}
{# The comments require a unique id in the data-attribute, so we'll fashion one
using the part variable, but since we launched with the FPO "very important story" for all installments, we'll leave it in place for part1. That way the comments already posted are
preserved there.
#}
{% if part != "assessments" %}
{% set part = part + "--tax-comments" %}
{% else %}
{% set part = "very-important-story" %}
{% endif %}
{% include '_subtemplates/_solid-opinion-comments.html'%}
<div data-trb-thirdpartynav></div>
{% endblock solid_opinion_comments %}
{% endblock content %}
{% block comments %}{% endblock comments %}
{% block library_css %}
<link rel="stylesheet" type="text/css" href="css/base.css" />
{% endblock %}
{% block css %}
<link rel="stylesheet" href="https://use.fontawesome.com/6745e48e70.css">
<link rel="stylesheet" type="text/css" href="css/styles.css">
{% endblock %}
{% block meta %}
{{ super() }}
{# <meta http-equiv="X-UA-Compatible" content="IE=edge">
#}{% endblock meta %}
{% block scripts %}
<script src="http://{{ ROOT_URL }}/js/app.min.js"></script>
{# <script>brightcove.createExperiences();</script> #}
{% endblock scripts %}
{% block chartbeat scoped%}
{% set part = part %}
<script type='text/javascript'>
var _sf_async_config = _sf_async_config || {};
var pageTitle = "The Tax Divide ({{ part }})";
_sf_async_config.uid = 25745
_sf_async_config.domain = 'chicagotribune.com';
_sf_async_config.useCanonical = true;
_sf_async_config.sections = 'Watchdog, Tax Divide';
_sf_async_config.authors = 'Tribune Staff, ProPublica Illinois, Jason Grotto';
_sf_async_config.title = pageTitle;
(function() {
function loadChartbeat() {
var e = document.createElement('script');
e.setAttribute('language', 'javascript');
e.setAttribute('type', 'text/javascript');
e.setAttribute('src', '//static.chartbeat.com/js/chartbeat.js');
document.body.appendChild(e);
}
var oldonload = window.onload;
window.onload = (typeof window.onload != 'function') ?
loadChartbeat : function() {
oldonload();
loadChartbeat();
};
})();
</script>
{% endblock %}
{% block omniture_scripts %}
{{ super() }}
{# <script src="http://www.chicagotribune.com/thirdpartyservice?disablenav=true" async></script> #}
<script src="//players.brightcove.net/3690581440001/S1vBkbMfe_default/index.min.js"></script>
{% endblock omniture_scripts %}
{% block omniture %}
{% endblock omniture %}
{% block library_scripts scoped%}
<script type="text/javascript">
((((window.trb || (window.trb = {})).data || (trb.data = {})).metrics || (trb.data.metrics = {})).thirdparty = {
pageName: 'ct:apps:news:cook-county-property-taxes-{{ part }}:articleproject.',
channel: 'news',
server: 'apps.chicagotribune.com',
hier1: 'chicagotribune:news',
hier2: 'news',
prop1: 'D=pageName',
prop2: 'news',
prop38: 'articleproject',
prop57: 'D=c38',
prop59: '',
eVar20: 'chicagotribune',
eVar21: 'D=c38',
eVar34: 'D=ch',
eVar35: 'D=pageName',
events:''
});
</script>
{# <script src="//media.apps.chicagotribune.com/bootstrap/v3.1.1/js/bootstrap.min.js"></script> #}
{# <script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js"></script> #}
{# <script src="//cdnjs.cloudflare.com/ajax/libs/backbone.js/1.0.0/backbone-min.js"></script> #}
{# For the bootstrap. Can this be removed? #}
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
{# For the adverts #}
<script src="//media.apps.chicagotribune.com/ads/v2.1.4/ads.min.js" defer async></script>
{# For comments #}
{# Removed on recommendation from Andrew Baltazar. #}
{# <script type="text/javascript" src="//ssor.tribdss.com/reg/tribune/chinews-static.min.js" defer async></script> #}
{# <script type="text/javascript" src="//www.tribdss.com/meter/ctcngux.min.js" defer async></script> #}
{# For some of the JS I wrote, I need this. #}
<script type="text/javascript">
window.ROOT_URL = "{{ ROOT_URL }}";
</script>
{% endblock %}
{% block shim %}{% endblock shim %}
{% block paywall %}
<script src="http://ssor.tribdss.com/reg/tribune/chinews-apps.min.js"></script>
<script type="text/javascript" src="//www.tribdss.com/meter/ctcngux.min.js" defer async></script>
{% endblock paywall %}