This repository has been archived by the owner on Aug 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
technology.html
679 lines (679 loc) · 38.6 KB
/
technology.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
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
<!DOCTYPE html>
<!-- This site was created in Webflow. http://www.webflow.com -->
<!-- Last Published: Thu Oct 12 2017 16:19:19 GMT+0000 (UTC) -->
<html data-wf-page="58e2271fb58087a679be8da0" data-wf-site="580f85cc654a49247bcabbe4">
<head>
<meta charset="utf-8">
<title>Instructions to open your data</title>
<meta content="Give your activities more visibility" name="description">
<meta content="width=device-width, initial-scale=1" name="viewport">
<meta content="Webflow" name="generator">
<link href="css/normalize.css" rel="stylesheet" type="text/css">
<link href="css/webflow.css" rel="stylesheet" type="text/css">
<link href="css/openactive-dev-leeds.webflow.css" rel="stylesheet" type="text/css">
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.4.7/webfont.js" type="text/javascript"></script>
<script type="text/javascript">WebFont.load({ google: { families: ["Open Sans:300,300italic,400,400italic,600,600italic,700,700italic,800,800italic","Montserrat:100,100italic,200,200italic,300,300italic,400,400italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic","Roboto:300,regular,500"] }});</script>
<!-- [if lt IE 9]><script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js" type="text/javascript"></script><![endif] -->
<script type="text/javascript">!function(o,c){var n=c.documentElement,t=" w-mod-";n.className+=t+"js",("ontouchstart"in o||o.DocumentTouch&&c instanceof DocumentTouch)&&(n.className+=t+"touch")}(window,document);</script>
<link href="images/openactive-badge-large-2_1.png" rel="shortcut icon" type="image/x-icon">
<link href="images/openactive-badge-large-2.png" rel="apple-touch-icon">
<script type="text/javascript">var _gaq = _gaq || [];_gaq.push(['_setAccount', 'UA-66225810-1'], ['_trackPageview']);(function() { var ga = document.createElement('script'); ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/0.3.5/marked.min.js" type="text/javascript"></script>
<style>
body {
color: black;
}
/* Making site wider */
@media screen and (min-width: 1024px) {
.w-container {
max-width: 1000px;
}
}
@media screen and (min-width: 1600px) {
.hero-section.centered {
padding-top: 160px;
padding-bottom: 160px;
}
}
</style>
<script>
window['_fs_debug'] = false;
window['_fs_host'] = 'www.fullstory.com';
window['_fs_org'] = '2D3YE';
window['_fs_namespace'] = 'FS';
(function(m,n,e,t,l,o,g,y){
if (e in m && m.console && m.console.log) { m.console.log('FullStory namespace conflict. Please set window["_fs_namespace"].'); return;}
g=m[e]=function(a,b){g.q?g.q.push([a,b]):g._api(a,b);};g.q=[];
o=n.createElement(t);o.async=1;o.src='https://'+_fs_host+'/s/fs.js';
y=n.getElementsByTagName(t)[0];y.parentNode.insertBefore(o,y);
g.identify=function(i,v){g(l,{uid:i});if(v)g(l,v)};g.setUserVars=function(v){g(l,v)};
g.identifyAccount=function(i,v){o='account';v=v||{};v.acctId=i;g(o,v)};
g.clearUserCookie=function(c,d,i){if(!c || document.cookie.match('fs_uid=[`;`]*`[`;`]*`[`;`]*`')){
d=n.domain;while(1){n.cookie='fs_uid=;domain='+d+
';path=/;expires='+new Date(0).toUTCString();i=d.indexOf('.');if(i<0)break;d=d.slice(i+1)}}};
})(window,document,window['_fs_namespace'],'script','user');
</script>
<!-- Begin Cookie Consent plugin - https://cookieconsent.insites.com/ -->
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css">
<style>
.cc-theme-block {
border: 3px solid #333;
}
.cc-btn {
text-decoration: none;
font-family: Montserrat, sans-serif;
letter-spacing: 2px;
text-transform: uppercase;
font-weight: 300;
font-size: 16px;
border-radius: 0px;
}
.cc-btn:hover {
background-color: "#2e9dff";
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
<script>
window.addEventListener("load", function(){
window.cookieconsent.initialise({
"palette": {
"popup": {
"background": "#ffffff",
"text": "#000000",
},
"button": {
"background": "#00b6ff",
"text": "#ffffff"
}
},
"theme": "block",
"position": "bottom-right",
"content": {
"message": "We use cookies to ensure that we give you the best experience on our website.",
"dismiss": "Continue",
"href": "privacy-policy.html"
},
"blacklistPage": [/.*blog.*/],
"dismissOnTimeout": 10000,
"dismissOnScroll": 20
})});
</script>
<!-- End Cookie Consent plugin -->
</head>
<body class="white">
<div data-collapse="medium" data-animation="default" data-duration="400" class="navigation-bar w-nav">
<div class="w-container">
<a href="index.html" target="_top" class="brand-link w-nav-brand">
<h1 class="brand-text main-logo">OpenActive</h1>
</a>
<nav role="navigation" class="navigation-menu w-nav-menu"><a href="index.html" target="_top" class="navigation-link w-nav-link">Home</a><a href="technology.html" target="_top" class="navigation-link w-nav-link">Open your data</a><a href="use-data.html" target="_top" class="navigation-link w-nav-link">Use data</a><a href="learn.html" target="_top" class="navigation-link w-nav-link">Learn about data</a><a href="w3c-community-group.html" target="_top" class="navigation-link w-nav-link">Data standards</a><a href="participate.html" target="_top" class="hidden navigation-link w-nav-link">Resources</a><a href="https://blog.openactive.io" target="_top" class="navigation-link w-nav-link">Blog</a><a href="pioneers.html" target="_top" class="navigation-link w-nav-link">Who's involved?</a><a href="ignore-template-originals/faq.html" target="_top" class="hidden navigation-link w-nav-link">FAQ</a><a href="join.html" target="_top" class="navigation-link w-nav-link">Join us</a></nav>
<div class="hamburger-button w-nav-button">
<div class="w-icon-nav-menu"></div>
</div>
</div>
</div><a href="https://github.com/openactive/activation" target="_blank" class="github-forkme w-hidden-medium w-hidden-small w-hidden-tiny w-inline-block"></a>
<div class="hero-image-base open-my-data"></div>
<div class="w-embed">
<style>
.marked table {
border-collapse: separate;
border-spacing: 16px;
text-align: left;
display: block;
overflow-x: auto;
}
.marked th {
white-space: nowrap;
}
.marked li {
font-weight: lighter;
}
</style>
</div>
<div class="section"><a href="w3c-community-group.html" target="_blank" class="cg-logo w-hidden-tiny w-inline-block"><img src="images/back-cg-group.png"></a>
<div class="w-container">
<div class="left section-title-group">
<h2 class="centered section-heading">Open your data</h2>
<div class="center section-subheading">Give your activities more visibility</div>
<h3 class="home-header">Why should I open my data? Which data?</h3>
<p class="home-body">We believe the most useful data for consumers is <strong>opportunity data</strong>. This is data that describes a physical activity including what it is, where and when it's taking place. Opportunity data includes enough information for a participant to decide whether an activity is right for them.</p>
<p class="home-body">We are encouraging organisations to openly publish their data, in the same way they currently publish web pages on the internet. Opening up opportunity data according to a commonly agreed standard can make it easier to find and use by others. Attaching an open licence means that it can be accessed, used and shared by anyone. </p>
<p class="home-body">While we cannot predict what new services will be created once opportunity data is opened, we will support and encourage new and existing organisations to innovate in response to the needs of consumers.</p>
<p class="home-body">In the long-term, open opportunity data will help activity providers deliver a better experience and attract and retain customers. This will help the sector as a whole get people more active. <a href="join.html">Joining OpenActive now</a> means you can work with the Open Data Institute to shape how we get there.</p>
<h3 class="home-header">Find out more</h3>
<p class="home-body">If you are interested in opening up your opportunity data or finding out more about it, the Open Data Institute is offering free consultations to discuss the benefits and help you do this. Please <a href="join.html">contact us</a> to find out more.</p>
<h3 class="home-header">Help us shape this</h3>
<p class="home-body">This guidance is evolving, and everyone is welcome to contribute. Shape the direction of this specification by joining our <a href="w3c-community-group.html">W3C Community Group</a> or get involved more broadly with OpenActive by <a href="join.html">getting in touch</a>.</p>
</div>
</div>
</div>
<div id="the-steps" class="accent section">
<div class="w-container">
<div class="left section-title-group">
<div class="w-embed">
<style>
/* unvisited link */
.whitetext a:link {
color: white;
}
/* visited link */
.whitetext a:visited {
color: white;
}
/* mouse over link */
.whitetext a:hover {
color: white;
}
/* selected link */
.whitetext a:active {
color: white;
}
</style>
</div>
<h2 class="centered section-heading white">HOW TO PUBLISH YOUR DATA</h2>
<div class="center off-white section-subheading">5 steps to publishing your data</div>
<p class="whitetext">The steps below are designed for organisations who already have a booking system or website that lists opportunities to be active. If you do not have either of these, but would like to learn more about how to open up your data, please go to our <a href="learn.html">Learn about data</a> page, or <a href="join.html">contact us</a>.</p>
<h3 class="white-heading">1) Build your OpenActive API</h3>
<h4 class="subheading4">(estimated time to complete: 2-3 developer days)</h4>
<div class="w-row">
<div class="join-description-parent w-col w-col-9">
<p class="whitetext">Send the <a href="https://github.com/openactive/realtime-paged-data-exchange/blob/master/README.md">specification details</a> to your technical team, and ask them to open up your session data according to the OpenActive specification. Note this is usually an additional API to any that you may already have, and should be simple to implement. <a href="#" data-ix="show-and-hide-1">See more</a></p>
</div>
<div class="join-description-parent right w-col w-col-3"><a href="https://github.com/openactive/realtime-paged-data-exchange/blob/master/README.md" class="button">View specification</a></div>
</div>
<div data-ix="display-none-on-load" id="seemore1" class="seemore">
<p class="whitetext">A sentence for your tech team: “Please create a new JSON endpoint that conforms to the <a href="https://github.com/openactive/realtime-paged-data-exchange/blob/master/README.md">OpenActive RTPE specification</a>. The specification is designed to be simple to implement, take a look at the examples in the <a href="https://github.com/openactive/activation">Activation Issue Tracker</a> to get an idea.”</p>
</div>
<h3 class="white-heading">2) Choose a licence</h3>
<h4 class="subheading4">(estimated time to complete: 5 minutes)</h4>
<p class="whitetext">License your data for anyone to access, use and share. The Open Data Institute recommends the <a href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution Licence (cc-by) version 4</a>. Inform your tech team. <a href="#" data-ix="show-and-hide-2">See more</a></p>
<div data-ix="display-none-on-load" class="seemore2">
<p class="whitetext">Using the recommended licence is low risk and represents no commitment. The cc-by licence is the most common in use for publishing open data, and importantly version 4 includes specific provision for database rights. Generic open data licensing guidance is also available.</p>
<p class="whitetext">Once you have selected a licence, inform your developer of your decision so that they can make the appropriate changes to the API.</p>
<p class="whitetext">If your legal department needs to be consulted, reassure them that this is the same licence that Wikipedia uses for its content, and is the most common licence in use for open data published on the internet. The licence can also be replaced or revoked at any time and represents no commitment from you.</p>
</div>
<h3 class="white-heading">3) Amend terms and build opt-out</h3>
<h4 class="subheading4">(<strong>booking systems only</strong> - estimated time to complete: 30 minutes / 1 developer day)</h4>
<p class="whitetext">If you <strong>do not</strong> own the data (e.g. in the case of a booking system provider), then you need to ensure that you obtain permission to publish the data. <a href="#" data-ix="show-and-hide-3">See more</a></p>
<div data-ix="display-none-on-load" class="seemore3 w-clearfix">
<p class="whitetext">You need to amend your terms and conditions to indicate that your users' sessions will be published openly. You may also give your users an option to opt-out of session publishing, while sending them an e-mail notifying them that you are turning data sharing on.</p>
<p class="whitetext">A simple addition to your Terms and Conditions similar to the following:</p>
<p class="quote whitetext"><strong>Publishing Sessions Openly</strong><br>Information about your session that is already available publicly (e.g. title, location, description, date/time, price, images) will be published as open data for anyone to access, use and share, licensed under the <a target="_blank" href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution License (cc-by) version 4</a>. This gives your sessions more visibility by publishing them openly to apps and websites that will help you promote your sessions, including but not limited to those listed <a target="_blank" href="/pioneers.html">here</a>. This will help more people find your sessions, and will not incur any additional cost to you. [You may opt-out of this free service in your settings page.]</p>
<p class="whitetext">A simple opt-out checkbox visible in your application as below:</p><img src="images/tick.png" class="tickbox">
<p class="whitetext"><strong>Publish Sessions Openly</strong><br>Information about your sessions that is already available publicly (e.g. title, location, description, date/time, price, images) is published for anyone to access, use and share. This helps more people find your sessions, by making them visible on other apps and websites such as the ones listed <a target="_blank" href="/pioneers.html">here</a>. This does not incur any additional cost to you.</p>
<p class="whitetext">A simple e-mail alert similar to the following:</p>
<p class="quote whitetext"><strong>Publishing Sessions Openly</strong><br>We are now giving your sessions more visibility by publishing information about them that is already available publicly (e.g. title, location, description, date/time, price, images) openly to <a href="pioneers.html">apps and websites that will help you promote your sessions</a>, such as the ones listed <a target="_blank" href="/pioneers.html">here</a>. This will help more people find your sessions, and will not incur any additional cost to you. If you want to opt-out of this free service, <a href="#">go to your settings page</a>.</p>
</div>
<h3 class="white-heading">4) Create a dataset homepage</h3>
<h4 class="subheading4">(estimated time to complete: 1.5 hours)</h4>
<div class="w-row">
<div class="join-description-parent short w-col w-col-9">
<p class="whitetext">To publish open data for anyone to freely access, use and share, you must create a webpage that describes the data you are publishing. <a href="#" data-ix="show-and-hide-4">See more</a></p>
</div>
<div class="join-description-parent right short w-col w-col-3"><a href="https://github.com/openactive/dataset-site-generator/wiki" class="button">View generator</a></div>
</div>
<div data-ix="display-none-on-load" class="seemore4">
<p class="whitetext">You must also include relevant human and machine readable licensing information, documentation, a mailing list, and ideally an issue tracker. You must specify how dataset users (innovators who want to build on top of/use your data) should attribute your data.</p>
<p class="whitetext">The <a href="https://github.com/openactive/dataset-site-generator/wiki">Dataset Site Generator</a> includes a template site, and complete step-by-step guides designed for non-technical users, to quickly and easily create a subsite that contains all of the above. Although it is possible to do this without the generator by following the ODI guides for <a target="_blank" href="https://theodi.org/guides/marking-up-your-dataset-with-dcat">metadata</a> and <a target="_blank" href="https://theodi.org/guides/publishers-guide-to-the-open-data-rights-statement-vocabulary">rights statements</a>, we recommend using the <a href="https://github.com/openactive/dataset-site-generator/wiki">Dataset Site Generator</a> to save you time and to benefit from additional updates - it's free and open source!</p>
<p class="whitetext">As with all of OpenActive, your feedback would be hugely appreciated. Please create an issue on this <a target="_blank" href="https://github.com/openactive/dataset-site-generator/issues">issue tracker</a> with any feedback, or comment on the guides directly.</p>
</div>
<h3 class="white-heading">5) Create an open data certificate</h3>
<h4 class="subheading4">(estimated time to complete: 30 minutes)</h4>
<p class="whitetext">The Open Data Institute encourages all publishers to create an <a href="https://certificates.theodi.org/">Open Data Certificate</a> for any open data published. If your dataset site has been set up correctly, it should automatically populate much of the Open Data Certificate form.</p>
</div>
</div>
</div>
<div class="footer">
<div class="footercta w-container">
<div class="w-row">
<div class="spc w-col w-col-6">
<h5 class="home-header">About OpenActive</h5>
<p class="home-body left-align">We are a group of organisations who believe that open data will help people get active, coordinated by the <a target="_blank" href="http://opendata.institute">Open Data Institute</a>.</p>
<div class="twitter-footer w-widget w-widget-twitter"><iframe src="https://platform.twitter.com/widgets/follow_button.html#screen_name=openactiveio&show_count=false&size=l&show_screen_name=true&dnt=true" scrolling="no" frameborder="0" allowtransparency="true" style="border: none; overflow: hidden; width: 100%; height: 28px;"></iframe></div>
</div>
<div class="spc w-col w-col-6">
<h5 class="home-header">Contact</h5>
<p class="home-body left-align">We'd love to hear from you. Get in touch at <a href="mailto:hello@openactive.io">hello@openactive.io</a>.<br><br>Want to be kept informed of all that's happening? <a href="subscribe.html">Subscribe to our monthly update</a>.</p>
<div class="w-hidden-main w-hidden-medium w-hidden-small w-hidden-tiny">
<p class="home-body">Want to be kept up to date on all that's happening?</p>
<div class="email-form-wrapper w-form">
<form id="email-form" name="email-form" data-name="Email Form" class="email-form">
<div class="w-row">
<div class="w-col w-col-9"><input type="email" id="email" name="email" data-name="Email" placeholder="Enter your email address" maxlength="256" required="" class="inputfield w-input"></div>
<div class="button-column w-col w-col-3"><input type="submit" value="Submit" data-wait="Please wait..." class="buttonsubmit w-button"></div>
</div>
</form>
<div class="w-form-done">
<p>Thank you! Your submission has been received!</p>
</div>
<div class="w-form-fail">
<p>Oops! Something went wrong while submitting the form</p>
</div>
</div>
</div>
</div>
</div><a href="join.html" class="button button-left footer-joinus">Join us</a></div>
</div>
<div alt="Creative Commons License" class="center footer">
<div class="w-container">
<div class="footer-text">
<p>Supported by the <a href="http://theodi.org/" class="footer-link-2">Open Data Institute</a> and <a href="https://www.sportengland.org/" class="footer-link-2">Sport England</a></p>
</div><img src="images/odi_logo_white.png" class="odi-logo"><img src="images/Sport-England-Logo-White-RGB.png" height="64" class="odi-logo"></div>
<div class="w-container">
<div class="footer-text">
<p class="icon-attribution">With the exception of icons and images, this work is licensed under a <a href="http://creativecommons.org/licenses/by-sa/4.0/" target="_blank" class="footer-link-2">Creative Commons Attribution-ShareAlike 4.0 International Licence</a>. All source code is licensed under
<a target="_blank" href="http://www.gnu.org/licenses/gpl-3.0.en.html" class="footer-link-2">GNU GPL v3</a>.<span class="hidden"> <a xmlns="http://www.w3.org/1999/xhtml" href="http://www.flaticon.com" class="footer-link-2">Icons made by Freepik</a> and are licensed under CC BY 3.0.</span> Photography by <a href="https://www.flickr.com/photos/astronomyblog/" class="footer-link-2">Stuart Lowe</a> (CC-BY-SA 4.0), London Sport/Greg Keegan, <a href="https://www.flickr.com/photos/pigpilot/7575753458/" class="footer-link-2">Stuart Grout</a> (CC-BY 2.0), <a href="https://www.flickr.com/photos/footfun/2469722745/" class="footer-link-2">Evan Lovely</a> (CC-BY 2.0). Icons made by <a href="http://www.flaticon.com/authors/pixel-buddha" target="_blank" class="footer-link-2">Pixel Buddha</a> from <a href="http://www.flaticon.com" target="_blank" class="footer-link-2">www.flaticon.com</a> is licensed by <a target="_blank" href="http://creativecommons.org/licenses/by/3.0/" class="footer-link-2">CC 3.0 BY</a>.<br><br><a href="privacy-policy.html" class="footer-link-2">Privacy and Cookie Policy</a></p>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js" type="text/javascript"></script>
<script src="js/webflow.js" type="text/javascript"></script>
<!-- [if lte IE 9]><script src="https://cdnjs.cloudflare.com/ajax/libs/placeholders/3.0.2/placeholders.min.js"></script><![endif] -->
<script>
var scroller;
function loadJSON(url, cb) {
$.support.cors = true;
$.getJSON(url, function(data) {
cb(data);
}).fail(function( jqxhr, textStatus, error ) {
var err = textStatus + ", " + error;
console.log( "Error accessing GitHub: " + err );
});
}
function gitHubGetForks(success) {
var url = 'https://api.github.com/repos/openactive/dataset-site-generator/forks?sort=stargazers';
loadJSON(url, function (jsonBody) {
success(jsonBody);
});
}
function addRow(metadata) {
console.log("Metadata for!: " + metadata["dataset-site-url"] );
createRow("#data-user-section-list",
metadata["dataset-site-url"] + "images/logo.png",
metadata["dataset-site-url"],
metadata["title"],
metadata["description"]);
}
function createRow(appendId,image,link,title,description) {
var newRow = $( "#row-template" ).clone();
newRow.removeAttr("id");
newRow.find( "[data-field='image']" ).attr("src", image);
newRow.find( "[data-field~='link']" ).attr("href", link);
newRow.find( "[data-field~='title']" ).text(title);
newRow.find( "[data-field='description']" ).text(description);
//Add row to list
newRow.appendTo( appendId );
newRow.show();
}
function updateCommunityList(data) {
if (data["community"]) {
var map = data.community;
var keys = Object.keys(map);
var len = keys.length;
keys.sort();
for (var i = 0; i < len; i++) {
var k = keys[i];
var v = map[k];
createRow("#pioneers-section-list",
"/community-members/logos/" + v.image,
v.url,
v.name,
v.description);
}
$( "#metric-community" ).text(len);
}
}
function setupScrolling() {
if ( $( "#scrolltoggle" ).length ) {
// Now that logos are created, add scrolling logo code
function ScrollingList(el){
if(el.length == 1){
this.el = el;
this.el.find('#row-template').remove();
this.logos = this.el.find('.promo-box');
this.n = this.logos.length;
this.w = 255;
this.h = this.logos.outerHeight(true);
// Get the container of the list
this.container = this.el.parent();
// Full width (all the logos in a line)
this.fw = (this.w*this.n);
this.ani;
this.scrolling = false;
this.l2r = true;
this.container.on('mouseover',{me:this},function(e){ e.data.me.pause(); } );
this.container.on('mouseout',{me:this},function(e){ e.data.me.scroll(); } );
this.on();
}
return this;
}
ScrollingList.prototype.on = function(){
// Explicitly define the logo width
this.logos.css({'width':this.w+'px'});
// Set the logo block width
this.el.css({'width':this.fw+'px'});
this.container.css({'width':'100%','max-width':'100%','height':this.h+'px','overflow':'hidden'});
this.logos.css({'float':'none','display':'inline-block'});
// The list width
this.lw = parseInt(this.container.css('width'));
this.scroll();
return this;
}
ScrollingList.prototype.off = function(){
this.container.stop();
this.container.scrollLeft(0);
// Zap all set styles
this.container.css({'width':'','max-width':'','height':'','overflow':''});
this.el.css({'width':''});
this.logos.css({'float':'','display':'','width':''});
return this;
}
ScrollingList.prototype.pause = function(){
if(this.scrolling){
this.container.stop();
this.scrolling = false;
}
return this;
}
ScrollingList.prototype.reverse = function(){
this.l2r = !this.l2r;
return this;
}
ScrollingList.prototype.scroll = function(){
if(!this.scrolling){
this.scrolling = true;
var t = 1200 * this.n;
var f = (this.l2r) ? (1 - (this.container.scrollLeft()/this.fw)) : (this.container.scrollLeft()/this.fw);
var left = (this.l2r) ? (this.w*this.n - this.lw) : 0;
var _obj = this;
this.ani = this.container.animate({ scrollLeft: left+'px'}, t*f, "linear",function(){ _obj.reverse(); _obj.scroll(); });
return this;
}
}
scroller = new ScrollingList($('#pioneers-section-list'));
$('#scrolltoggle').clickToggle(function() {
scroller.off();
},
function() {
scroller.on();
});
if($('#pioneers-section-list').length == 1){
// Get the logos
var logos = $('#pioneers-section-list .promo-box');
var n = logos.length;
// Get width of an individual logo
var w = 255;//parseInt(logos.css('width'));
// Get height of an individual logo
var h = parseInt(logos.css('height'));
logos.css({'float':'none','display':'inline-block'});
var list = $('#pioneers-section-list').parent();
// Full width
var fw = (w*n);
var lw = parseInt(list.css('width'));
// Explicitly define the list width
list.css({'width':lw+'px','height':h+'px','overflow':'hidden'});
// Explicitly define the logo width
logos.css({'width':w+'px'});
// Set the logo block height
$('#pioneers .w-dyn-items').css({'width':fw+'px'});
var ani;
var l2r = true;
list.on('mouseover',function(e){ list.stop(); } );
list.on('mouseout',function(e){ scroll(); } );
function scroll(){
var t = 1200 * n;
var f = (l2r) ? (1 - (list.scrollLeft()/fw)) : (list.scrollLeft()/fw);
var left = (l2r) ? (w*n - lw) : 0;
ani = list.animate({ scrollLeft: left+'px'}, t*f, "linear",function(){
l2r = !l2r;
scroll();
});
}
scroll();
}
}
}
/*
* On Page Load
*/
$(function() {
$.fn.clickToggle = function(func1, func2) {
var funcs = [func1, func2];
this.data('toggleclicked', 0);
this.click(function() {
var data = $(this).data();
var tc = data.toggleclicked;
$.proxy(funcs[tc], this)();
data.toggleclicked = (tc + 1) % 2;
});
return this;
};
$( "#data-user-section-list" ).each(function() {
$( "#row-template" ).hide();
$.getJSON( "/datasets/directory.json", function( body ) {
for(var i = 0; i < body.length; i++) {
var metadata = body[i];
console.log("Metadata for: " + metadata["dataset-site-url"] + " (Publish: " + metadata["publish"] + ")");
if (metadata["publish"]) {
addRow(metadata);
}
}
});
});
$( "#pioneers-section-list" ).each(function() {
$( "#row-template" ).hide();
$.getJSON("/community-members/community.json", function (data) {
//Only continue if load successful, ignore failure
console.log("Got community list!");
updateCommunityList(data);
setupScrolling();
});
});
$( "#slide-button" ).contextmenu(function (e) {
window.location.href = '/participate.html';
return false;
});
});
$(function() {
$(".marked").each(function() {
var element = $( this );
var id = element.attr('id');
console.log("HI " + id);
$.get( "https://raw.githubusercontent.com/openactive/" + id + "/master/README.md", function( data ) {
var dataSansHeader = data.replace(/[\s\S]*?\(\_SNIP\_\)[\s\S][\s\S]/,"");
element.html( marked(dataSansHeader) );
});
});
});
$(function() {
$( "#metric-impl" ).each(function() {
$.getJSON( "https://api.github.com/repos/openactive/users/milestones?state=all", function( data ) {
$( "#metric-impl" ).text(data.length)
});
});
});
$(function() {
$( "#metric-live" ).each(function() {
$.getJSON( "/datasets/directory.json", function( data ) {
$( "#metric-live" ).text(data.length)
});
});
});
</script>
<script>
/******************************************************
* #### jQuery-Youtube-Channels-Playlist v05 ####
* Coded by Ican Bachors 2014.
* http://ibacor.com/labs/jquery-youtube-channels-playlist/
* Updates will be posted to this site.
******************************************************/
$.fn.ycp = function(opt) {
var defaultopt = {
playlist : 10,
autoplay : false,
related : false
};
opt.playlist = (opt.playlist == undefined ? defaultopt.playlist : opt.playlist);
opt.autoplay = (opt.autoplay == undefined ? defaultopt.autoplay : opt.autoplay);
opt.related = (opt.related == undefined ? defaultopt.related : opt.related);
$(this).each(function(i, a) {
var b = ($(this).attr('id') != null && $(this).attr('id') != undefined ? '#' + $(this).attr('id') : '.' + $(this).attr('class')),
channel = $(this).data('ycp'),
html = '<div class="ycp">' + '<div class="unit kenca">' + '<div class="ycp_vid_play" title="Play video"></div>' + '</div>' + '<div class = "unit katuhu">' + '<div id="ycp_youtube_channels' + i + '"></div>' + '</div>' + '</div>';
$(this).html(html);
if(channel.substring(0, 2) == 'PL' || channel.substring(0, 2) == 'UU'){
var pageToken = '';
ycp_list(channel, pageToken, i, b);
}else{
var tipe = (channel.substring(0, 2) == 'UC' ? 'id' : 'forUsername');
ycp_play(channel, tipe, i, b);
}
});
function ycp_play(c, d, e, f) {
$.ajax({
url: 'https://www.googleapis.com/youtube/v3/channels?part=contentDetails&' + d + '=' + c + '&key=' + opt.apikey,
crossDomain: true,
dataType: 'json'
}).done(function(a) {
var b = a.items[0].contentDetails.relatedPlaylists.uploads,
pageToken = '';
ycp_list(b, pageToken, e, f)
})
}
function ycp_list(f, g, k, l) {
$.ajax({
url: 'https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&maxResults=' + opt.playlist + '&playlistId=' + f + '&key=' + opt.apikey + '&pageToken=' + g,
dataType: 'json'
}).done(function(c) {
var d = '';
d += '<div class="vid-top">';
d += '</div><div class="vid-bottom">';
$.each(c.items, function(i, a) {
var b = c.items[i].snippet.resourceId.videoId;
ycp_part(b, i, k, l);
d += '<div class="play" data-vvv="' + b + '" data-img="' + c.items[i].snippet.thumbnails.high.url + '" title="' + c.items[i].snippet.title + '"><div class="thumb"><img src="' + c.items[i].snippet.thumbnails.default.url + '" alt=" "><span class="tm' + i + '"></span></div>';
d += '<div class="title">' + c.items[i].snippet.title.replace("OpenActive W3C Community Group Meeting / ", "Group Meeting ") + '</div><span class="mute by' + i + '"></span><br> <!-- <span class="mute views' + i + '"></span><span class="mute">-</span> --> <span class="mute date' + i + '"></span></div>'
});
d += '</div>';
$(l + ' .ycp div#ycp_youtube_channels' + k).html(d);
if (c.prevPageToken == null || c.prevPageToken == undefined) {
var e = $(l + ' .ycp div#ycp_youtube_channels' + k + ' div.play').attr("data-vvv"),
imag = $(l + ' .ycp div#ycp_youtube_channels' + k + ' div.play').attr("data-img");
if(opt.autoplay == false){
$(l + ' .ycp div.ycp_vid_play:eq(' + k + ')').html('<img src=" ' + imag + '">');
}else{
$(l + ' .ycp div.ycp_vid_play:eq(' + k + ')').html('<iframe src="https://www.youtube.com/embed/' + e + '?rel=' + (opt.related == true ? 1 : 0) + '&autoplay=1" allowfullscreen="" frameborder="0" class="vid-iframe"></iframe>');
}
$(l + ' .ycp div#ycp_youtube_channels' + k + ' div').removeClass('vid-active');
$(l + ' .ycp div#ycp_youtube_channels' + k + ' div.play:eq(0)').addClass('vid-active')
} else {
$(l + ' .ycp div#ycp_youtube_channels' + k + ' span.vid-prev').click(function() {
g = c.prevPageToken;
ycp_list(f, g, k, l);
return false
})
}
$(l + ' .ycp div#ycp_youtube_channels' + k + ' span.vid-next').click(function() {
g = c.nextPageToken;
ycp_list(f, g, k, l);
return false
});
$(l + ' .ycp div#ycp_youtube_channels' + k + ' div.play').each(function() {
$(this).click(function() {
var a = $(this).attr("data-vvv"),
m = $(this).attr("data-img");
$(l + ' .ycp div#ycp_youtube_channels' + k + ' div').removeClass('vid-active');
$(this).addClass('vid-active');
if(opt.autoplay == false){
$(l + ' .ycp div.ycp_vid_play:eq(' + k + ')').html('<img src=" ' + m + '">');
}else{
$(l + ' .ycp div.ycp_vid_play:eq(' + k + ')').html('<iframe id="mainplayer" src="https://www.youtube.com/embed/' + a + '?rel=' + (opt.related == true ? 1 : 0) + '&autoplay=1" allowfullscreen="" frameborder="0" class="vid-iframe"></iframe>');
var myVideo = iframe.getElementById('mainplayer');
myVideo.mute();
}
return false
})
});
$(l + ' .ycp div.ycp_vid_play:eq(' + k + ')').click(function() {
var a = $(l + ' .ycp div#ycp_youtube_channels' + k + ' div.play.vid-active').attr("data-vvv");
$(this).html('<iframe src="https://www.youtube.com/embed/' + a + '?rel=' + (opt.related == true ? 1 : 0) + '&autoplay=1" allowfullscreen="" frameborder="0" class="vid-iframe"></iframe>');
return false
});
})
}
function ycp_part(c, i, d, e) {
$.ajax({
url: 'https://www.googleapis.com/youtube/v3/videos?id=' + c + '&key=' + opt.apikey + '&part=contentDetails,snippet,statistics',
dataType: 'json'
}).done(function(a) {
var b = a.items[0].contentDetails.duration,
dataw = '',
menit = '',
detik = '';
if (b.match(/M/g)) {
dataw = b.split('M');
menit = dataw[0].replace('PT', '');
if (dataw[1] != '') {
detik = dataw[1].replace('S', '')
} else {
detik = '00'
}
} else {
dataw = b.split('PT');
menit = '00';
detik = dataw[1].replace('S', '')
}
$(e + ' .ycp div#ycp_youtube_channels' + d + ' span.tm' + i).html(menit + ':' + detik);
$(e + ' .ycp div#ycp_youtube_channels' + d + ' span.by' + i).html('by ' + a.items[0].snippet.channelTitle);
//$(e + ' .ycp div#ycp_youtube_channels' + d + ' span.views' + i).html(addCommas(a.items[0].statistics.viewCount) + ' views');
$(e + ' .ycp div#ycp_youtube_channels' + d + ' span.date' + i).html(_timeSince(new Date(a.items[0].snippet.publishedAt).getTime()))
})
}
function _timeSince(a) {
var s = Math.floor((new Date() - a) / 1000),
i = Math.floor(s / 31536000);
if (i > 1) {
return i + " years ago"
}
i = Math.floor(s / 2592000);
if (i > 1) {
return i + " months ago"
}
i = Math.floor(s / 86400);
if (i > 1) {
return i + " days ago"
}
i = Math.floor(s / 3600);
if (i > 1) {
return i + " hours ago"
}
i = Math.floor(s / 60);
if (i > 1) {
return i + " minutes ago"
}
return Math.floor(s) + " seconds ago"
}
function addCommas(a) {
a += '';
x = a.split('.');
x1 = x[0];
x2 = x.length > 1 ? '.' + x[1] : '';
var b = /(\d+)(\d{3})/;
while (b.test(x1)) {
x1 = x1.replace(b, '$1' + ',' + '$2')
}
return x1 + x2
}
}
</script>
<script>
$(function() {
$(".demo").ycp({
apikey : 'AIzaSyAsiDuPedi4rHrCYvXXbCYGxFY3K9_dK_o',
autoplay : false,
related : false
});
});
</script>
</body>
</html>