-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
217 lines (192 loc) · 13.4 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
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
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>A public event calendar about trust, verification, fact checking & beyond, curated by the MisinfoCon community</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Place favicon.ico in the root directory -->
<!-- TODO create Jekyll conf to be able to point to the site.url-->
<!--<link rel="shortcut icon" href="favicon.ico"/>-->
<!--<link rel="stylesheet" href="css/normalize.css">-->
<script src="js/vendor/modernizr-2.8.3.min.js"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<link rel="stylesheet" href="css/main.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/handlebars.js/4.0.6/handlebars.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/sugar/2.0.4/sugar.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/markdown.js/0.5.0/markdown.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/tabletop.js/1.5.1/tabletop.min.js'></script>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script type='text/javascript'>
// Handbars helpers
Handlebars.registerHelper('type', function(event) {
var type = Handlebars.escapeExpression(event.type);
if (type === 'Dedicated event') {
return new Handlebars.SafeString(
"<span class='label label-success'>Dedicated event</span>"
);
} else {
return new Handlebars.SafeString(
"<span class='label label-warning'>Larger event</span>"
)}
});
// Tabletop
window.App = {};
App.events = [];
var publicSpreadsheetUrl = 'https://docs.google.com/spreadsheets/d/1jo_9r2-7a3W2uwQqjAD9KtSeNiqMb43wP0XjXrz4J8w/pubhtml';
function init() {
Tabletop.init( { key: publicSpreadsheetUrl,
callback: showInfo,
// Now we have multiple sheets
//simpleSheet: true,
parseNumbers: true,
prettyColumnNames: false,
postProcess: function(element) {
// Convert string date into Date date
element["start-date"] = Sugar.Date.create(element["start"]);
element["start-date-mmddyy"] = Sugar.Date.format(element["start-date"], '%m-%d-%y');
element["start-nice"] = Sugar.Date.medium(element["start-date"]);
element["start-relative"] = Sugar.Date.relative(element["start-date"]);
var dateEnd = element["end"] || element["start-date"];
element["end-date"] = Sugar.Date.create(dateEnd);
element["end-date-mmddyy"] = Sugar.Date.format(element["end-date"], '%m-%d-%y');
element["end-nice"] = Sugar.Date.medium(element["end-date"]);
element["description"] ? element["description-html"] = markdown.toHTML(element["description"]): '';
}
} )
}
function showInfo(data, tabletop) {
var events = data["Public calendar"].elements;
// First, let's get rid of events that are not reviewed
var approvedEvents = _.filter(events, function(event){
return event["reviewed"] === "Yes";
});
// Sort by date, descending
approvedEvents.sort(function(a,b) {
return new Date(a["start-date"]) - new Date(b["start-date"]);
});
App.events = approvedEvents;
// Create three arraays, one for upcoming one for past & one for today
var eventsToday = _.filter(approvedEvents, function(event){
return Sugar.Date.isToday(event["start-date"]) || Sugar.Date.isBetween(new Date(), event["start-date"], event["end-date"]);
});
var eventsUpcoming = _.filter(approvedEvents, function(event){
return Sugar.Date.isFuture(event["start-date"])
});
var eventsPast = _.filter(approvedEvents, function(event){
return Sugar.Date.isPast(event["end-date"]);
});
// Same template, but different divs
var sourceFuture = $("#event-template-future").html();
var sourcePast = $("#event-template-past").html();
var templateFuture = Handlebars.compile(sourceFuture);
var templatePast = Handlebars.compile(sourcePast);
var htmlToday = templateFuture(eventsToday);
var htmlUpcoming = templateFuture(eventsUpcoming);
var htmlPast = templatePast(eventsPast);
$('.event-listing-upcoming').html(htmlUpcoming);
$('.event-listing-past').html(htmlPast);
// If there are any events today, add a heading and div
if ( eventsToday.length > 0 ) {
$('#event-listing').prepend('<div class="alert alert-warning" role="alert"><h3>Happening now</h3><div class="event-listing-today"></div></div>');
$('.event-listing-today').html(htmlToday);
}
App.showMap();
}
window.addEventListener('DOMContentLoaded', init)
</script>
</head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<div class="container">
<div class="header clearfix">
<!--<nav>-->
<!--<ul class="nav nav-pills pull-right">-->
<!--<li role="presentation" class="active"><a href="#">Home</a></li>-->
<!--<li role="presentation"><a href="#">About</a></li>-->
<!--<li role="presentation"><a href="#">Contact</a></li>-->
<!--</ul>-->
<!--</nav>-->
<h1 class="page-title text-muted">Event calendar: Trust, verification, fact checking & beyond</h1>
<p class="text-muted">Curated by the <a href="https://misinfocon.com/">MisinfoCon community</a>.<br />Built with ❤️ by <a href="https://twitter.com/phillipadsmith">@phillipadsmith</a> on <a href="https://github.com/hackshackers/misinfocon-event-calendar">GitHub</a>.</p>
</div>
<div class="visible-md visible-lg" id="event-map"></div>
<div class="jumbotron">
<h2>Can we talk about misinformation?</h2>
<p class="lead">There are a lot of conversations happening right now about misinformation, disinformation, rumours, and so-called "fake news." The event listing below is an attempt to catalogue when and where those conversations are happening, and to provide links to follow-up material from those conversations. You can help out by filling in the blanks: What's missing?</p>
<p><a class="btn btn-primary btn-sm" href="http://bit.ly/misinformation-events-calendar" role="button">Submit an event</a> <a class="btn btn-primary btn-sm" href="http://eepurl.com/cBO3UX" role="button">Subscribe for updates</a></p>
<p class="small">Pssst... You can also just <a href="https://twitter.com/misinfocon">tweet at us here</a>.</p>
<p class="small">Add these events to your calendar or website: <a target="_blank" href="https://calendar.google.com/calendar/ical/8ud28gvrvurgkqoqi935q9m524%40group.calendar.google.com/public/basic.ics"><img src="//calendar.google.com/googlecalendar/images/ical.gif"></a> <a target="_blank" href="https://calendar.google.com/calendar/embed?src=8ud28gvrvurgkqoqi935q9m524%40group.calendar.google.com&ctz=America/Vancouver"><img src="//calendar.google.com/googlecalendar/images/html.gif"></a></p>
<p class="small">Like this calendar? Share the love:
<a href="https://twitter.com/share" class="twitter-share-button" data-size="small" data-hashtags="misinfocon" data-related="misinfocon,phillipadsmith" data-show-count="false">Tweet</a><script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>
<script src="//platform.linkedin.com/in.js" type="text/javascript"> lang: en_US</script>
<script type="IN/Share"></script>
</p>
</div>
<div id="event-listing" class="row marketing">
<h3>Upcoming events</h3>
<div class="event-listing-upcoming"></div>
<h3>Past events</h3>
<div class="event-listing-past"></div>
</div>
<footer class="footer">
<p><a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-sa/4.0/88x31.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>.</p>
</footer>
</div> <!-- /container -->
<script id="event-template-future" type="text/x-handlebars-template">
{{#each this}}
<dl class="vevent">
<dt><h4>{{{type this}}} <a class="url" href="{{url}}">{{event}}</a></h4></dt>
<dd><abbr class="dtstart" title="{{start-date-mmddyy}}">{{start-nice}}</abbr>-
<abbr class="dtend" title="{{end-date-mmddyy}}">{{end-nice}}</abbr>
{{#if hashtag}} | <a href="https://twitter.com/hashtag/{{hashtag}}">#{{hashtag}}</a>{{/if}}
</dd>
<dd><span class="location">{{city}}, {{country}}</span></dd>
<dd><span class="summary">{{{description-html}}}</span></dd>
</dl>
{{/each}}
</script>
<script id="event-template-past" type="text/x-handlebars-template">
{{#each this}}
<dl class="vevent">
<dt><h4>{{{type this}}} <a class="url" href="{{urlarchived}}">{{event}}</a></h4></dt>
<dd><abbr class="dtstart" title="{{start-date-mmddyy}}">{{start-nice}}</abbr>-
<abbr class="dtend" title="{{end-date-mmddyy}}">{{end-nice}}</abbr>
{{#if hashtag}} | <a href="https://twitter.com/hashtag/{{hashtag}}">#{{hashtag}}</a>{{/if}}
</dd>
<dd><span class="location">{{city}}, {{country}}</span></dd>
<dd><span class="summary">{{{description-html}}}</span></dd>
</dl>
{{/each}}
</script>
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.12.0.min.js"><\/script>')</script>
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
<script src="js/plugins.js"></script>
<script src="js/main.js"></script>
<!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
<script>
(function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
e=o.createElement(i);r=o.getElementsByTagName(i)[0];
e.src='https://www.google-analytics.com/analytics.js';
r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
ga('create','UA-12916757-3','auto');ga('send','pageview');
</script>
</body>
</html>