forked from najlepsiwebdesigner/foundation-datepicker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
executable file
·610 lines (495 loc) · 22.2 KB
/
example.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Foundation datepicker</title>
<meta name="description" content="Port of bootstrap datepicker to Zurb Foundation framework">
<meta name="author" content="Peter Beno, najlepsiwebdesigner@gmail.com">
<link href="http://cdnjs.cloudflare.com/ajax/libs/prettify/r224/prettify.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,400,300,600,700&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="foundation/css/foundation.min.css">
<!-- <link rel="stylesheet" href="foundation/fonts/foundation-icons.css"> -->
<!-- foundation datepicker start -->
<!-- DEPS -->
<script src="foundation/js/vendor/jquery.js"></script>
<!-- CDN - you can use font awesome or fonudation icon via this, or use your own version: -->
<link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<!-- <link href="https://cdnjs.cloudflare.com/ajax/libs/foundicons/3.0.0/foundation-icons.css" rel="stylesheet"> -->
<!-- DATEPICKER FILES -->
<script src="js/foundation-datepicker.js"></script>
<script src="js/locales/foundation-datepicker.vi.js"></script>
<link rel="stylesheet" href="css/foundation-datepicker.min.css">
<!-- foundation datepicker end -->
<link rel="stylesheet" href="css/example.css">
<script src="foundation/js/foundation.min.js"></script>
<script src="foundation/js/foundation/foundation.magellan.js"></script>
<!--[if lt IE 9]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div class="container" style="background:#13a7c7;">
<header class="row">
<div class="small-12 columns">
<h1>Foundation-datepicker.js <span style="color:#000;font-size:60%;">Examples & Docs</span></h1>
</div>
</header>
</div>
</div>
<div class="container" style="background:#000;">
<div class="row">
<div class="small-12 columns" >
<div data-magellan-expedition="fixed" >
<dl class="sub-nav">
<dd data-magellan-arrival="basic-example"><a href="#basic-example">Basic example</a></dd>
<dd data-magellan-arrival="advanced-example"><a href="#advanced-example">Data tags</a></dd>
<dd data-magellan-arrival="time-example"><a href="#time-example">Timepicker</a></dd>
<dd data-magellan-arrival="limited-example"><a href="#limited-example">Limited picker</a></dd>
<dd data-magellan-arrival="no-inputs-example"><a href="#no-inputs-example">Without inputs</a></dd>
<dd data-magellan-arrival="deps-example"><a href="#deps-example">Dependent</a></dd>
<dd data-magellan-arrival="iconfont-example"><a href="#iconfont-example">Icon fonts</a></dd>
<dd data-magellan-arrival="docs"><a href="#docs">Docs</a></dd>
</dl>
</div>
</div>
</div>
</div>
<br><br>
<div class="container">
<div class="row">
<div class="small-9 columns">
<h4 data-magellan-destination="basic-example">Basic</h4>
<a name="basic-example"></a>
<p>Attached to a field with the format specified via options. Initial date is set with initialDate option or with value attribute on the input tag.</p>
<input type="text" class="span2" id="dp1">
<hr>
<script src="https://gist.github.com/najlepsiwebdesigner/b71a309d6fe893486c6a.js"></script>
<hr>
<h4 data-magellan-destination="advanced-example">Close button and data tags</h4>
<a name="advanced-example"></a>
<p>Attached to a field with the format specified via data tag and close button enabled. See source of </p>
<input type="text" class="span2" value="02/16/12" data-date-format="mm/dd/yy" id="dp2">
<hr>
<script src="https://gist.github.com/najlepsiwebdesigner/b94d0c1d908892d10444.js"></script>
<hr>
<h4 data-magellan-destination="time-example">Time picker</h4>
<a name="time-example"></a>
<p>With time picking enabled and vietnamese language used.</p>
<input type="text" class="span2" value="02-12-1989 12:05" id="dpt">
<hr>
<script src="https://gist.github.com/najlepsiwebdesigner/f921f23f5bf3e9286acf.js"></script>
<hr>
<h4 data-magellan-destination="limited-example">Limited picker</h4>
<a name="limited-example"></a>
<p>Limit the view mode to months</p>
<div class="row collapse date" id="dpMonths" data-date-format="mm/yyyy" data-start-view="year" data-min-view="year" style="max-width:200px;">
<div class="small-2 columns">
<span class="prefix"><i class="fa fa-calendar"></i></span>
</div>
<div class="small-10 columns">
<input size="16" type="text" value="02/2012" readonly>
</div>
</div>
<hr>
<script src="https://gist.github.com/najlepsiwebdesigner/32fed5dc2fe2df9a5f6b.js"></script>
<hr>
<h4 data-magellan-destination="no-inputs-example">No inputs</h4>
<a name="no-inputs-example"></a>
<p>Attached to other element then field and using events to work with the date values.</p>
<table class="table">
<thead>
<tr>
<th>Start date
<a href="#" class="button tiny" id="dp4" data-date-format="yyyy-mm-dd" data-date="2012-02-20">Change</a>
</th>
<th>End date
<a href="#" class="button tiny" id="dp5" data-date-format="yyyy-mm-dd" data-date="2012-02-25">Change</a>
</th>
</tr>
</thead>
<tbody>
<tr>
<td id="startDate">2012-02-20</td>
<td id="endDate">2012-02-25</td>
</tr>
</tbody>
</table>
<div class="alert alert-box" style="display:none;" id="alert"> <strong>Oh snap!</strong>
</div>
<hr>
<script src="https://gist.github.com/najlepsiwebdesigner/f00af2b2dfbca6494d0a.js"></script>
<hr>
<h4 data-magellan-destination="deps-example">Dependent pickers</h4>
<a name="deps-example"></a>
<p>Disabling dates in the past and dependent disabling.</p>
<table class="table">
<thead>
<tr>
<th>Check in:
<input type="text" class="span2" value="" id="dpd1">
</th>
<th>Check out:
<input type="text" class="span2" value="" id="dpd2">
</th>
</tr>
</thead>
</table>
<script src="https://gist.github.com/najlepsiwebdesigner/4970984.js"></script>
<h4 data-magellan-destination="iconfont-example">Change icon font</h4>
<a name="iconfont-example"></a>
<p>Set another icons or icon font (Material Icons in this example)</p>
<input type="text" class="span2" id="dpi">
<hr>
<script src="https://gist.github.com/KonZee/b50fba4a52934ba22483bb1f527ad52d.js"></script>
<hr>
<br><br>
<h1 id="docs">
<a id="user-content-foundation-datepicker" class="anchor" href="#foundation-datepicker" aria-hidden="true"><span class="octicon octicon-link"></span></a>Docs</h1>
<p><strong>Feel free to contribute! Fork, modify, and send me a pull request.</strong></p>
<h4>
<a id="user-content-foundation-version-support" class="anchor" href="#foundation-version-support" aria-hidden="true"><span class="octicon octicon-link"></span></a>Foundation version support</h4>
<p>Foundation 6 and 5 is fully supported. For Foundation 4 version, check out last compatible version:
<a href="https://github.com/najlepsiwebdesigner/foundation-datepicker/releases/tag/1.2.0">https://github.com/najlepsiwebdesigner/foundation-datepicker/releases/tag/1.2.0</a></p>
<p>How to include this in your project:</p>
<h4>
<a id="user-content-install-via-bower-or-npm" class="anchor" href="#install-via-bower-or-npm" aria-hidden="true"><span class="octicon octicon-link"></span></a>Install via Bower or NPM</h4>
<p><code>bower install foundation-datepicker</code></p>
<p><code>npm install foundation-datepicker</code></p>
<p>after running continue with step 3 from manual instalation. Files you should use are mentioned in step 2.</p>
<h4>
<a id="user-content-manual-installation-and-setup" class="anchor" href="#manual-installation-and-setup" aria-hidden="true"><span class="octicon octicon-link"></span></a>Manual Installation and Setup</h4>
<ol>
<li><p>download & unzip source from GitHub repository:
<a href="http://foundation-datepicker.peterbeno.com/example.html">http://foundation-datepicker.peterbeno.com/example.html</a></p></li>
<li><p>copy the files <code>/js/foundation-datepicker.js</code> and <code>/stylesheets/foundation-datepicker.css</code>
somewhere into your project. Minified versions are also available.</p></li>
<li><p><link> and <script> them into your page</p></li>
<li>
<p>to see the arrows and icons, please include <strong>font-awesome</strong> or <strong>foundation icons</strong>:</p>
<p><a href="http://zurb.com/playground/foundation-icons">http://zurb.com/playground/foundation-icons</a></p>
<p><code><link href="//cdnjs.cloudflare.com/ajax/libs/foundicons/3.0.0/foundation-icons.css" rel="stylesheet"></code></p>
<p><a href="http://fortawesome.github.io/Font-Awesome/">http://fortawesome.github.io/Font-Awesome/</a></p>
<p><code><link href="//netdna.bootstrapcdn.com/font-awesome/3.0.2/css/font-awesome.css" rel="stylesheet"></code></p>
</li>
</ol>
<h4>
<a id="user-content-language-translations" class="anchor" href="#language-translations" aria-hidden="true"><span class="octicon octicon-link"></span></a>Language translations</h4>
<p>Foundation datepicker uses external files to store translation data.
To use language, you have to include correct file from <strong>js/locales</strong> directory, then correctly initalize fdatepicker with iso code of language included. </p>
<p>Example of using slovak language:</p>
<pre><code><!-- somewhere in header -->
<script src="js/foundation-datepicker.js"></script>
<script src="js/locales/foundation-datepicker.sk.js"></script>
<!-- ... -->
<script>
$('.fdatepicker').fdatepicker({
language: 'sk'
});
</script>
</code></pre>
<p>65 languages are available, thanks community and bootstrap-datepicker project. For complete list, see <strong>js/locales</strong> directory.</p>
<h4>
<a id="user-content-icons" class="anchor" href="#icons" aria-hidden="true"><span class="octicon octicon-link"></span></a>Icons</h4>
<p>Datepicker uses three icons. It works with foundation font and font awesome out-of-the box. If you dont want to use iconic font, you can customize buttons via classes:</p>
<ul>
<li>
<code>fa-chevron-right fi-arrow-right</code> - right arrow</li>
<li>
<code>fa-remove fa-times fi-x</code> - close sign</li>
<li>
<code>fa fa-chevron-left fi-arrow-left</code> - left arrow</li>
</ul>
<p><em>Version without Font Awesome</em> (behind master) can be found in separate branch:
<a href="https://github.com/najlepsiwebdesigner/foundation-datepicker/tree/no-font-awesome">https://github.com/najlepsiwebdesigner/foundation-datepicker/tree/no-font-awesome</a></p>
<p>to use foundation icon font, include:<br>
<code><link rel="stylesheet" href="foundation/fonts/foundation-icons.css"></code></p>
<p>to use font-awesome, use include:<br>
<code><link href="https://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet"></code></p>
<h4>
<a id="user-content-build-system" class="anchor" href="#build-system" aria-hidden="true"><span class="octicon octicon-link"></span></a>Build system</h4>
<p>Grunt is used.
<code>grunt build</code> compiles scss & minifies js and css.
Before running, you must install local grunt and npm deps via:
<code>npm install</code></p>
<h4>
<a id="user-content-angular" class="anchor" href="#angular" aria-hidden="true"><span class="octicon octicon-link"></span></a>Angular</h4>
<p>For integration with Angular, please see <a href="https://github.com/najlepsiwebdesigner/foundation-datepicker/issues/55#issuecomment-138681504">https://github.com/najlepsiwebdesigner/foundation-datepicker/issues/55#issuecomment-138681504</a></p>
<p>Foundation datepicker is jQuery plugin, so you <strong>have to</strong> use jQuery.</p>
<h4>
<a id="user-content-methods" class="anchor" href="#methods" aria-hidden="true"><span class="octicon octicon-link"></span></a>Methods</h4>
<table>
<tbody><tr>
<th>Method</th>
<th>Description</th>
</tr>
<tr>
<td>.fdatepicker(options)</td>
<td>Initializes a datepicker.</td>
</tr>
<tr>
<td>.fdatepicker('show')</td>
<td>Show the datepicker.</td>
</tr>
<tr>
<td>.fdatepicker('hide')</td>
<td>Hide the datepicker.</td>
</tr>
<tr>
<td>.fdatepicker('place')</td>
<td>Updates the date picker's position relative to the element</td>
</tr>
<tr>
<td>.fdatepicker('update', value)</td>
<td>Updates the date picker's value. It can be a string in the specified format or a Date object.</td>
</tr>
</tbody></table>
<h4>
<a id="user-content-options" class="anchor" href="#options" aria-hidden="true"><span class="octicon octicon-link"></span></a>Options</h4>
<table>
<thead>
<tr>
<th>Name</th>
<th>type</th>
<th>default</th>
<th>description</th>
</tr>
</thead>
<tbody>
<tr>
<td>format</td>
<td>string</td>
<td>'mm/dd/yyyy'</td>
<td>the date format, combination of d, dd, m, mm, yy, yyyy, hh, ii.</td>
</tr>
<tr>
<td>language</td>
<td>string</td>
<td>'en'</td>
<td>two-char iso shortcut of language you want to use</td>
</tr>
<tr>
<td>weekStart</td>
<td>integer</td>
<td>0</td>
<td>day of the week start. 0 for Sunday - 6 for Saturday</td>
</tr>
<tr>
<td>startView</td>
<td>string|integer</td>
<td>month</td>
<td>set the start view mode. Accepts: 'decade' = 4, 'year' = 3, 'month' = 2, 'day' = 1, 'hour' = 0</td>
</tr>
<tr>
<td>minView|maxView</td>
<td>string|integer</td>
<td></td>
<td>set a limit for view mode. Accepts: 'decade' = 4, 'year' = 3, 'month' = 2, 'day' = 1, 'hour' = 0</td>
</tr>
<tr>
<td>pickTime</td>
<td>boolean</td>
<td>false</td>
<td>enables hour and minute selection views, equivalent of minView = 0, else minView = 2</td>
</tr>
<tr>
<td>initialDate</td>
<td>date string</td>
<td>null</td>
<td>sets initial date. The same effect can be achieved with value attribute on input element.</td>
</tr>
<tr>
<td>startDate</td>
<td>date</td>
<td>-Infinity</td>
<td>disables all dates before given date</td>
</tr>
<tr>
<td>endDate</td>
<td>date</td>
<td>Infinity</td>
<td>disables all dates after given date</td>
</tr>
<tr>
<td>keyboardNavigation</td>
<td>boolean</td>
<td>true</td>
<td>with input fields, allows to navigate the datepicker with arrows. However, it disables navigation inside the input itself, too</td>
</tr>
<tr>
<td>daysOfWeekDisabled</td>
<td>Array of integers</td>
<td>[]</td>
<td>disables all dates matching the given days of week (0 = Sunday, 6 = Saturday)</td>
</tr>
<tr>
<td>datesDisabled</td>
<td>Array of date strings</td>
<td>[]</td>
<td>disables the specified dates</td>
</tr>
</tbody>
</table>
<h4>
<a id="user-content-events" class="anchor" href="#events" aria-hidden="true"><span class="octicon octicon-link"></span></a>Events</h4>
<table>
<thead>
<tr>
<th>Event</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>show</td>
<td>This event fires immediately when the date picker is displayed.</td>
</tr>
<tr>
<td>hide</td>
<td>This event is fired immediately when the date picker is hidden.</td>
</tr>
<tr>
<td>changeDate</td>
<td>This event is fired when the date is changed.</td>
</tr>
<tr>
<td>outOfRange</td>
<td>This event is fired when user tries to select disabled date.</td>
</tr>
</tbody>
</table>
<h4>
<a id="user-content-a-note-on-forking" class="anchor" href="#a-note-on-forking" aria-hidden="true"><span class="octicon octicon-link"></span></a>A note on forking:</h4>
<p><strong>By forking this project you hereby grant permission for any commits to your fork to be merged back into this repository and, with attribution, be released under the terms of the Apache License.</strong></p>
<h4>
<a id="user-content-issues" class="anchor" href="#issues" aria-hidden="true"><span class="octicon octicon-link"></span></a>Issues</h4>
<p>Before you submit a new issue, please check closed (maybe also open) issues <a href="https://github.com/najlepsiwebdesigner/foundation-datepicker/issues?q=is%3Aissue+is%3Aclosed">here</a>, maybe your problem was solved already. Thanks!</p>
</div>
<div class="small-3 columns" id="sidebar-wrap">
<a href="https://github.com/najlepsiwebdesigner/foundation-datepicker" style="font-size:35px;text-decoration:none;display:block" class="button small"><i class="fa fa-github-alt"></i> Github</a>
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top" style="text-align:center;">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="WARN3JGTYSUP8">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
<script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- Foundation datepicker -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-5373512362092122"
data-ad-slot="3211306696"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</div>
</section>
</div>
<script>
$(function () {
$(document).foundation({
"magellan-expedition": {
active_class: 'active', // specify the class used for active sections
threshold: 0, // how many pixels until the magellan bar sticks, 0 = auto
destination_threshold: 20, // pixels from the top of destination for it to be considered active
throttle_delay: 50, // calculation throttling to increase framerate
fixed_top: 0, // top distance in pixels assigend to the fixed element on scroll
offset_by_height: true // whether to offset the destination by the expedition height. Usually you want this to be true, unless your expedition is on the side.
}
});
window.prettyPrint && prettyPrint();
$('#dp1').fdatepicker({
initialDate: '02-12-1989',
format: 'mm-dd-yyyy',
// keyboardNavigation: false,
disableDblClickSelection: true
// autoShow: false
});
$('#dp2').fdatepicker({
closeButton: true
});
// $('#dp3').fdatepicker();
$('#dpt').fdatepicker({
format: 'mm-dd-yyyy hh:ii',
disableDblClickSelection: true,
language: 'vi',
pickTime: true
});
// datepicker limited to months
$('#dpMonths').fdatepicker();
// Icon font datapicker
$('#dpi').fdatepicker({
leftArrow: '<i class="material-icons">keyboard_arrow_left</i>',
rightArrow: '<i class="material-icons">keyboard_arrow_right</i>',
closeButton: true,
closeIcon: '<i class="material-icons">close</i>',
});
// implementation of custom elements instead of inputs
var startDate = new Date(2012, 1, 20);
var endDate = new Date(2012, 1, 25);
$('#dp4').fdatepicker()
.on('changeDate', function (ev) {
if (ev.date.valueOf() > endDate.valueOf()) {
$('#alert').show().find('strong').text('The start date can not be greater then the end date');
} else {
$('#alert').hide();
startDate = new Date(ev.date);
$('#startDate').text($('#dp4').data('date'));
}
$('#dp4').fdatepicker('hide');
});
$('#dp5').fdatepicker()
.on('changeDate', function (ev) {
if (ev.date.valueOf() < startDate.valueOf()) {
$('#alert').show().find('strong').text('The end date can not be less then the start date');
} else {
$('#alert').hide();
endDate = new Date(ev.date);
$('#endDate').text($('#dp5').data('date'));
}
$('#dp5').fdatepicker('hide');
});
// implementation of disabled form fields
var nowTemp = new Date();
var now = new Date(nowTemp.getFullYear(), nowTemp.getMonth(), nowTemp.getDate(), 0, 0, 0, 0);
var checkin = $('#dpd1').fdatepicker({
onRender: function (date) {
return date.valueOf() < now.valueOf() ? 'disabled' : '';
}
}).on('changeDate', function (ev) {
if (ev.date.valueOf() > checkout.date.valueOf()) {
var newDate = new Date(ev.date)
newDate.setDate(newDate.getDate() + 1);
checkout.update(newDate);
}
checkin.hide();
$('#dpd2')[0].focus();
}).data('datepicker');
var checkout = $('#dpd2').fdatepicker({
onRender: function (date) {
return date.valueOf() <= checkin.date.valueOf() ? 'disabled' : '';
}
}).on('changeDate', function (ev) {
checkout.hide();
}).data('datepicker');
});
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-30989810-2']);
_gaq.push(['_trackPageview']);
(function () {
var ga = document.createElement('script');
ga.type = 'text/javascript';
ga.async = true;
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="http://cdnjs.cloudflare.com/ajax/libs/prettify/r224/prettify.js"></script>
</body>
</html>