forked from adobe/brackets.io
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
574 lines (516 loc) · 28.5 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
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
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" ><![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="en">
<!--<![endif]-->
<!--
[[[[[[[[[[[[[[[ ]]]]]]]]]]]]]]]
[:::::::::::::: ::::::::::::::]
[:::::::::::::: ::::::::::::::]
[::::::[[[[[[[: :]]]]]]]::::::]
[:::::[ ]:::::]
[:::::[ ]:::::]
[:::::[ ]:::::]
[:::::[ ]:::::]
[:::::[ CODE THE WEB ]:::::]
[:::::[ http://brackets.io ]:::::]
[:::::[ ]:::::]
[:::::[ ]:::::]
[:::::[ ]:::::]
[:::::[ ]:::::]
[::::::[[[[[[[: :]]]]]]]::::::]
[:::::::::::::: ::::::::::::::]
[:::::::::::::: ::::::::::::::]
[[[[[[[[[[[[[[[ ]]]]]]]]]]]]]]]
-->
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title data-i18n="index.head.title">Brackets - A modern, open source code editor that understands web design.</title>
<link rel="stylesheet" href="css/normalize.css" />
<link rel="stylesheet" href="css/foundation.min.css" />
<link rel="stylesheet" href="css/reveal.css">
<link rel="shortcut icon" href="favicon.ico" />
<!-- social media images -->
<!-- Facebook: https://developers.facebook.com/docs/sharing/webmasters#markup -->
<meta property="og:url" content="http://brackets.io" />
<meta property="og:title" content="A modern, open source code editor that understands web design" />
<meta property="og:description" content="Brackets is a lightweight, yet powerful, modern text editor. We blend visual tools into the editor so you get the right amount of help when you want it. With new features and extensions released every 3-4 weeks, it's like getting presents all year long." />
<meta property="og:site_name" content="Brackets" />
<meta property="og:image" content="http://brackets.io/img/[email protected]" />
<!-- Twitter Cards: https://dev.twitter.com/cards/overview -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:site" content="@brackets">
<meta name="twitter:creator" content="@brackets">
<meta name="twitter:title" content="Brackets - A modern code editor that understands web design">
<meta name="twitter:description" content="Brackets is a lightweight, yet powerful, modern text editor. We blend visual tools into the editor so you get the right amount of help when you want it. With new features and extensions released every 3-4 weeks, it's like getting presents all year long.">
<meta name="twitter:image" content="http://brackets.io/img/[email protected]">
<!-- Only Edit brackets.io.css -->
<link rel="stylesheet" href="css/brackets.io.css" />
<!-- This needs to be at the top, not at the bottom like the other JS. Source Sans Pro - Light, Regular, Italic, Semibold -->
<script src="//use.edgefonts.net/source-sans-pro:n3,n4,n6,i3,i4;source-code-pro:n4.js"></script>
<!-- These stop FOUT -->
<style type="text/css">
.wf-loading h1, .wf-loading h2, .wf-loading h3, .wf-loading h4,
.wf-loading h5, .wf-loading h6, .wf-loading p, .wf-loading a {
visibility: hidden;
}
</style>
<link rel="stylesheet" href="css/spinner.css" />
<!-- SEO for internationalization: https://support.google.com/webmasters/answer/189077 -->
<link rel="alternate" href="?" hreflang="x-default" />
<link rel="alternate" href="?lang=en" hreflang="en" />
<link rel="alternate" href="?lang=de" hreflang="de" />
<link rel="alternate" href="?lang=it" hreflang="it" />
<link rel="alternate" href="?lang=pt-br" hreflang="pt-br" />
</head>
<body id="home">
<div id="header-wrapper">
<div id="header" class="row">
<div class="large-12 columns clearfix">
<h1 class="brackets-logo">
<a href="index.html">
<i></i>Brackets</a>
</h1>
<div class="mobile-nav">
<a id="hamburger" href="#">Menu</a>
</div>
<div class="nav clearfix">
<div class="nav-links">
<a href="contribute.html" class="contribute" data-i18n="nav.contribute">Contribute</a>
<a href="docs/current/modules/brackets.html" data-i18n="nav.apidocs">API Docs</a>
<a href="http://blog.brackets.io" data-i18n="nav.blog">Blog</a>
<a href="https://github.com/adobe/brackets/wiki/Troubleshooting" data-i18n="nav.support">Support</a>
</div>
<div class="social-links">
<a class="social-links-item github-icon" href="https://www.github.com/adobe/brackets" title="GitHub">GitHub</a>
<a class="social-links-item twitter-icon" href="https://twitter.com/brackets" title="Twitter">Twitter</a>
</div>
</div>
</div>
</div>
</div>
<!-- this is for special occasions
<div id="banner-wrapper">
<div id="banner" class="row">
<div class="large-12 columns">
<span class="banner-text"></span> <a id="banner-button" href="#" class="rounded radius button"></a>
</div>
</div>
</div>
-->
<div id="hero-wrapper">
<div id="hero" class="row">
<div class="large-12 columns">
<h1><span data-i18n="index.page.hero.description">A modern, open source text editor that understands web design.</span></h1>
<div id="download">
<a id="hero-cta-button" href="https://github.com/adobe/brackets/releases/latest" class="large rounded radius button"><div data-i18n="[html]index.page.hero.download">Download Brackets <d id="download-brackets-version">1.5</d></div>
<span id="download-version" class="nowrap" data-i18n="index.page.hero.bundle-info">+ Extract (Preview) by Adobe</span>
</a>
<div id="os-alert" class="alert-box radius" data-alert>
</div>
<p>
<a id="download-plain-brackets" class="nobr" href="#" data-i18n="index.page.hero.non-bundle-download">Download Brackets without Extract</a>
<a id="other-downloads" class="nobr" href="https://github.com/adobe/brackets/releases" data-i18n="index.page.hero.other-downloads">Other Downloads</a>
</p>
<!--
This <img> tag will be added when NOT on mobile
<img src="img/hero.png" srcset="img/[email protected] 2x" height="370" width="1059" alt="Screenshot of Brackets">
-->
</div>
</div>
</div>
</div>
<div id="sub-hero-wrapper">
<div class="intro row">
<div class="large-10 large-centered columns">
<p data-i18n="index.page.content.blurb">With focused visual tools and preprocessor support, Brackets is a modern text editor that makes it easy to design in the browser. Try Creative Cloud Extract (preview) for Brackets for an easy way to get clean, minimal CSS straight from a PSD with no generated code.</p>
</div>
</div>
<div class="sub-intro row">
<div class="large-6 columns">
<h2 data-i18n="index.page.content.why.header">Why Use Brackets?</h2>
<p data-i18n="index.page.content.why.content">Brackets is a lightweight, yet powerful, modern text editor. We blend visual tools into the editor so you get the right amount of help when you want it. With new features and extensions released every 3-4 weeks, it's like getting presents all year long.</p>
</div>
<div class="large-6 columns">
<h2>
<svg id="extract" width="20px" height="23px">
<g>
<path d="M0,11.917 L8.34,7.255 L8.34,8.412 L2.07,11.918 L10,16.352 L17.931,11.918 L11.66,8.412 L11.66,7.255 L20,11.917 L10,17.509 L0,11.917 Z M4.387,16.113 L2.07,17.408 L10,21.843 L17.931,17.408 L15.613,16.113 L16.648,15.535 L20,17.408 L10,23 L0,17.408 L3.352,15.535 L4.387,16.113 Z" id="layers" fill="#2098F5"></path>
<path d="M10.553,1.973 L10.553,12.113 L9.454,12.113 L9.454,1.972 L6.526,5.07 L5.744,4.374 L10.008,0 L14.256,4.374 L13.474,5.07 L10.553,1.973 L10.553,1.973 Z" id="arrow" fill="#2098F5"></path>
</g>
</svg>
<span data-i18n="index.page.content.extract.header">Get Code Hints from a PSD</span>
</h2>
<p><span data-i18n="index.page.content.extract.content">The Extract for Brackets (Preview) extension lets you pull out design information from a PSD including colors, fonts, gradients, and measurement information as clean, minimal CSS via contextual code hints. You can also extract layers as images, use information from the PSD to define preprocessor variables, and easily get dimensions between objects. All in the context of your code.</span> <a href="http://blog.brackets.io/2014/11/04/brackets-1-0-and-extract-for-brackets-preview-now-available/" data-i18n="index.page.content.extract.more">Learn more…</a></p>
<p id="secondary-download">
<a id="e4b-secondary-download" href="https://github.com/adobe/brackets/releases/latest" class="button radius small secondary" data-i18n="index.page.content.extract.download">Download Brackets + Extract (Preview) by Adobe</a>
<!-- <a href="https://github.com/adobe/brackets/releases/latest" class="link-beside-button">Download Brackets<br>without PSD Support</a>-->
</p>
</div>
</div>
<div class="last-row on-white row">
<div class="medium-4 large-4 columns">
<div class="float-obj">
<img width="50px" height="50px" src="img/graphics.svg#inline-editor">
</div>
<h3 data-i18n="index.page.content.feature-highlights.inline-editor.header">Inline Editors</h3>
<p data-i18n="[html]index.page.content.feature-highlights.inline-editor.content">Instead of jumping between file tabs, Brackets lets you open a window into the code you care about most. Want to work on the CSS that applies to a specific ID? Put your mouse cursor on that ID, push <kbd>Command</kbd> / <kbd>Ctrl+E</kbd> and Brackets will show you all the CSS selectors with that ID in an inline window so you can work on your code side-by-side without any popups.</p>
</div>
<div class="medium-4 large-4 columns">
<div class="float-obj">
<img width="50px" height="50px" src="img/graphics.svg#live-preview">
</div>
<h3 data-i18n="index.page.content.feature-highlights.live-preview.header">Live Preview</h3>
<p data-i18n="index.page.content.feature-highlights.live-preview.content">Get a real-time connection to your browser. Make changes to CSS and HTML and you'll instantly see those changes on screen. Also see where your CSS selector is being applied in the browser by simply putting your cursor on it. It's the power of a code editor with the convenience of in-browser dev tools.</p>
</div>
<div class="medium-4 large-4 columns">
<div class="float-obj">
<img width="50px" height="50px" src="img/graphics.svg#preprocessors">
</div>
<h3 data-i18n="index.page.content.feature-highlights.preprocessor.header">Preprocessor Support</h3>
<p data-i18n="index.page.content.feature-highlights.preprocessor.content">Work with preprocessors in a whole new way. We know how important preprocessors are to your workflow. That’s why we want to make Brackets the best code editor for preprocessors out there. With Brackets you can use Quick Edit and Live Highlight with your LESS and SCSS files which will make working with them easier than ever.
</p>
</div>
</div>
</div>
<div id="content-wrapper">
<div id="content" class="row">
<div class="medium-4 large-4 columns" id="features">
<h2 data-i18n="index.page.content.new-features.new-features">New Features</h2>
<div class="spinner">
</div>
<!-- JS generated content -->
</div>
<div class="medium-4 large-4 columns">
<h2 data-i18n="index.page.content.popular-extensions.header">Popular Extensions</h2>
<h3><a href="https://github.com/Jacse/themes-for-brackets">Themes for Brackets</a></h3>
<p>A theme-pack that styles the whole editor.</p>
<h3><a href="https://github.com/thehogfather/brackets-code-folding">Code Folding</a></h3>
<p>Brace folding, tag folding, indent folding and multi-line comment folding.</p>
<h3><a href="https://github.com/drewhamlett/brackets-beautify">Beautify</a></h3>
<p>Format JavaScript, HTML, and CSS files.</p>
<h3><a href="https://github.com/emmetio/brackets-emmet">Emmet</a></h3>
<p>High-speed HTML and CSS workflow.</p>
<h3><a href="https://github.com/zaggino/brackets-git">Brackets Git</a></h3>
<p>Git integration for Brackets</p>
<h3><a href="https://github.com/mikaeljorhult/brackets-autoprefixer">Autoprefixer</a></h3>
<p>Parse CSS and add vendor prefixes automatically.</p>
<h3><a href="https://github.com/cfjedimaster/brackets-jshint">JSHint</a></h3>
<p>JSHint support for Brackets</p>
<h3><a href="https://github.com/Wikunia/brackets-QuickDocsPHP">QuickDocsPHP</a></h3>
<p>Inline documentation for PHP functions, including a summary, syntax, return values and parameters.</p>
<p><a class="button radius secondary" href="https://ingorichter.github.io/BracketsExtensionTweetBot/" data-i18n="index.page.content.popular-extensions.check-out">Check Out New Extensions</a></p>
</div>
<div class="medium-4 large-4 columns">
<h2 data-i18n="index.page.content.blog.header">Recent Blog Posts</h2>
<div class="spinner" id="blogposts-spinner">
</div>
<div id="blogposts">
<!-- this will be filled dynamically -->
</div>
<p>
<a class="button radius secondary" href="http://blog.brackets.io" data-i18n="index.page.content.blog.more">Go to Blog</a>
</p>
</div>
</div>
</div>
<div id="footer-wrapper">
<div id="footer" class="row">
<div class="medium-6 large-3 columns">
<h5 data-i18n="footer.links.header">Quick Links</h5>
<ul>
<li>
<a href="https://github.com/adobe/brackets" data-i18n="footer.links.content.source">Source Code on Github</a>
</li>
<li>
<a href="docs/current/modules/brackets.html" data-i18n="footer.links.content.apidocs">API Documentation</a>
</li>
<li>
<a href="https://ingorichter.github.io/BracketsExtensionTweetBot/" data-i18n="footer.links.content.extension-updates">Weekly Extension Updates</a>
</li>
<li>
<a href="https://github.com/adobe/brackets/wiki/Troubleshooting" data-i18n="footer.links.content.troubleshooting">Troubleshooting Help</a>
</li>
<li>
<a href="https://github.com/adobe/brackets/wiki" data-i18n="footer.links.content.wiki">Wiki</a>
</li>
</ul>
</div>
<div class="medium-6 large-3 columns">
<h5 id="try-it" data-i18n="footer.videos.header">Videos</h5>
<ul>
<li>
<a href="http://youtu.be/rvo3Mv1Z4qU" data-i18n="footer.videos.content.intro" data-yt-id="rvo3Mv1Z4qU">Introducing Brackets</a>
</li>
<li>
<a href="http://youtu.be/Nhvj1NYC3Uc" data-i18n="footer.videos.content.livedev" data-yt-id="Nhvj1NYC3Uc">Live Development for HTML</a>
</li>
<li>
<a href="http://youtu.be/T6d5C3rLeFY" data-i18n="footer.videos.content.theseus" data-yt-id="T6d5C3rLeFY">JavaScript Debugger for Brackets</a>
</li>
<li>
<a href="http://tutsplus.com/courses/introduction-to-brackets?utm_source=Bracketsio&utm_medium=website&utm_campaign=BracketsWebsite" data-i18n="footer.videos.content.tutsplus">Tuts+ Introduction to Brackets</a>
</li>
<li>
<a href="https://www.youtube.com/user/CodeBrackets" data-i18n="footer.videos.content.youtube">Brackets Videos on Youtube</a>
</li>
</ul>
</div>
<div class="medium-6 large-3 columns">
<h5 id="contribute" data-i18n="footer.get-involved.header">Get Involved</h5>
<ul>
<li>
<a href="https://github.com/adobe/brackets/wiki/Suggest-a-Feature" data-i18n="footer.get-involved.content.suggest">Suggest a Feature</a>
</li>
<li>
<a href="http://bit.ly/BracketsBacklog" data-i18n="footer.get-involved.content.trello">View Backlog on Trello</a>
</li>
<li>
<a href="https://waffle.io/adobe/brackets" data-i18n="footer.get-involved.content.waffle">Track Our Progress on Waffle</a>
</li>
<li>
<a href="https://groups.google.com/forum/#!forum/brackets-dev" data-i18n="footer.get-involved.content.devlist">Discuss on Google Groups</a>
</li>
<li>
<a href="http://webchat.freenode.net?channels=brackets&uio=d4" data-i18n="footer.get-involved.content.irc">Chat on IRC at Freenode/#Brackets</a>
</li>
<li>
<a href="https://github.com/adobe/brackets/issues" data-i18n="footer.get-involved.content.issues">Checkout Current Issues on GitHub</a>
</li>
</ul>
</div>
<div class="medium-6 large-3 columns">
<h5 data-i18n="footer.in-touch.header">Keep in Touch</h5>
<ul>
<li>
<a href="https://twitter.com/brackets">Twitter</a>
</li>
<li>
<a href="https://www.facebook.com/codebrackets">Facebook</a>
</li>
<li>
<a href="https://plus.google.com/b/115365194873502050036/">Google+</a>
</li>
</ul>
</div>
</div>
<div id="about" class="row">
<div class="large-12 columns">
<p>Brackets was founded by Adobe as a community guided, open source project to push web development editors to the next level.<br>Brackets is released under the <a href="https://github.com/adobe/brackets/blob/master/LICENSE">MIT License</a>.</p>
</div>
</div>
</div>
<script src="js/vendor/custom.modernizr.js"></script>
<script src="js/vendor/jquery.js"></script>
<script src="js/i18next.min.js"></script>
<script src="js/foundation.min.js"></script>
<script src="js/nav.js"></script>
<script src="js/youtube-modal.js"></script>
<script>
$(document).foundation();
</script>
<script>
var ext = "";
var OS = "UNKNOWN";
if (/Windows|Win32|WOW64|Win64/.test(navigator.userAgent)) {
OS = "WIN";
ext = ".msi";
} else if (/Mac/.test(navigator.userAgent)) {
OS = "OSX";
ext = ".dmg";
} else if (/Linux|X11/.test(navigator.userAgent)) {
OS = "LINUX32";
ext = ".32-bit.deb";
if (/x86_64/.test(navigator.appVersion + navigator.userAgent)) {
OS = "LINUX64";
ext = ".64-bit.deb";
}
}
if (/iPad|iPod|iPhone|Android/.test(navigator.userAgent)) {
OS = "OTHER";
$("#download").hide();
$("#secondary-download").hide();
} else {
$("<img src='img/hero.png' srcset='img/[email protected] 2x' height='370' width='1059' alt='Screenshot of Brackets'>").appendTo("#download");
}
</script>
<script src="js/load.i18next.js"></script>
<script>
// Detect unsupported Operating Systems
function updateAlertContent(unsupported) {
var translatedText = i18n.t("index.page.hero.os-alert." + unsupported.i18nKey, { os: unsupported.os, defaultValue: unsupported.default, url: unsupported.url });
$("#os-alert")
.html(translatedText)
.show();
}
var unsupported = {
i18nKey: "general",
url: "https://github.com/adobe/brackets/wiki/Troubleshooting#requirements"
},
osMatch;
if (/NT ?5\.\d/.test(navigator.userAgent)) { // Windows XP
unsupported.os = "Windows XP";
unsupported.i18nKey = "win-xp";
unsupported.url = "http://blog.brackets.io/2014/04/18/windows-xp-support/";
unsupported.default = "Unfortunately, we don't support Windows XP any longer. <a href='" + unsupported.url + "'>Read our blog post</a> for further information.";
} else if (osMatch = navigator.userAgent.match(/Mac OS X 10[._](\d+)([._](\d+))?\D/i)) { // Mac OS X 10.*
osMatch = parseFloat(osMatch[1] + "." + (osMatch[3] || 0));
if (osMatch < 6.8 && osMatch !== 6.0) { // Firefox reports only the OS X major version (10.6), so we have to check for 6.0
// Mac OS X pre 10.6.8 is not supported
unsupported.os = "Mac OS X 10." + osMatch;
}
} else if (/Debian[ -_]7/i.test(navigator.userAgent)) { // Debian 7
unsupported.os = "Debian 7";
unsupported.i18nKey = "debian-7";
unsupported.url = "https://github.com/adobe/brackets/issues/4816";
unsupported.default = "Unfortunately, we currently don't support Debian 7. <a href='" + unsupported.url + "'>Take a look at the GitHub issue</a> for further information.";
} else if (osMatch = navigator.userAgent.match(/Ubuntu[ -_\/]?(\d+)[._](\d+)\D/i)) { // Ubuntu
if (parseInt(osMatch[1], 10) < 12) { // pre Ubuntu 12.04
unsupported.os = "Ubuntu " + osMatch[1] + "." + osMatch[2];
}
}
if (unsupported.os) {
if (!unsupported.default) {
unsupported.default = "Unfortunately, we don't support " + unsupported.os + " any longer. <a href='" + unsupported.url + "'>Take a look at the Requirements.</a>";
}
$("#hero-cta-button").hide();
$("#download-plain-brackets").hide();
updateAlertContent(unsupported);
if (!i18nLoaded.state() !== "resolved") {
i18nLoaded.done(function () {
updateAlertContent(unsupported);
});
}
}
var shortLocale = (requestedLang && requestedLang.split("/")[0].split("-")[0]) || "en",
versionInfoBaseUrl = "//s3.amazonaws.com/files.brackets.io/updates/stable/",
versionInfoUrl = versionInfoBaseUrl + shortLocale + ".json",
lookupPromise = new $.Deferred();
if (shortLocale !== "en") {
$.ajax({
url: versionInfoUrl,
type: "HEAD"
}).fail(function () {
shortLocale = "en";
versionInfoUrl = versionInfoBaseUrl + shortLocale + ".json";
}).always(function () {
lookupPromise.resolve();
});
} else {
lookupPromise.resolve();
}
lookupPromise.done(function () {
var ajaxRequest = $.ajax({
dataType: "json",
url: versionInfoUrl,
cache: false
});
$.when(ajaxRequest, i18nLoaded).done(function (data) {
data = data[0]; // get actual data
var build = data[0];
var buildName = build.versionString;
if (buildName) {
var buildNum = buildName.match(/([\d.]+)/);
if (buildNum) {
buildNum = buildNum[1];
}
// update button
if (OS != "OTHER" && buildNum) {
var tag = buildName.toLowerCase().split(" ").join("-"),
url = "https://github.com/adobe/brackets/releases/" + tag,
urlE4B = "https://github.com/adobe/brackets/releases/download/release-1.5%2Beb4/Brackets.1.5.Extract" + ext;
if (ext) {
url = "https://github.com/adobe/brackets/releases/download/" + tag + "/Brackets." + buildName.split(" ").join(".") + ext;
}
///if(OS=="WIN") url = "http://bit.ly/QrVHNc"; // (Temporary) TRACKING WIN
///else if(OS=="OSX") url = "http://bit.ly/1hQGEsh"; // (Temporary) TRACKING OSX
var version_label = buildName.match(/(\d+.*$)/)[1];
//if (OS != "UNKNOWN") version_label += " (" + OS + ")";
$("#download-brackets-version").text(version_label);
logAndGo("hero-cta-button", urlE4B, ['_trackEvent', 'E4BDownloads', buildNum, OS]);
logAndGo("e4b-secondary-download", urlE4B, ['_trackEvent', 'E4BDownloads', buildNum, OS]);
logAndGo("download-plain-brackets", url, ['_trackEvent', 'Downloads', buildNum, OS]);
}
// other-download track
logAndGo("other-downloads", $("#other-downloads").attr("href"), ['_trackEvent', 'Other-Downloads', buildNum, OS]);
}
// update features (limit 5)
var feature_content = "<h2>" + i18n.t("index.page.content.new-features.new-features-in", { defaultValue: "New in " + build.versionString, sprintNumber: build.versionString }) + "</h2>";
build.newFeatures.slice(0, Math.min(build.newFeatures.length, 5)).forEach(function (feature) {
feature_content += "<h3>" + $("<div/>").text(feature.name).html() + "</h3>";
feature_content += "<p>" + $("<div/>").text(feature.description).html() + "</p>";
});
feature_content += "<p><a class='button radius secondary' href='" + build.releaseNotesURL + "'>" + i18n.t("index.page.content.new-features.release-notes", { defaultValue: "Read More in the Release Notes" }) + "</a></p>";
$("#features").html(feature_content);
});
});
function logAndGo(elementID, _url, tagObj) {
var elem = document.getElementById(elementID);
elem.href = _url;
elem.onclick = function (e) {
e.preventDefault();
var downloadStarted = false;
setTimeout(function () { if (!downloadStarted) window.location.href = _url; }, 1200); // fallback
_gaq.push(tagObj, function () {
downloadStarted = true;
setTimeout(function () { window.location.href = _url; }, 1000); // short delay just in case it doesn't get logged
});
}
}
</script>
<script>
function recentBlogposts() {
var dateRegex = /(\d+)-(\d+)-(\d+)\s+(\d+):(\d+):(\d+)/,
$blogposts = $("#blogposts");
$.ajax({
url: "http://blog.brackets.io/feed/json",
dataType: "jsonp"
})
.always(function () {
$("#blogposts-spinner").remove();
$blogposts.hide();
$blogposts.fadeIn(1000);
})
.done(function (data) {
var options = {
year: "numeric",
month: "long",
day: "numeric"
};
data.slice(0, 8).forEach(function (item) { // only ever display 8 blog posts
var dateComponents = item.date.match(dateRegex),
postingDate = new Date(dateComponents[1],
dateComponents[2] - 1, // zero based month
dateComponents[3],
dateComponents[4],
dateComponents[5],
dateComponents[6]);
$blogposts.append('<h3><a href="' + item.permalink + '">' +
item.title +
'</a></h3><p>' +
postingDate.toLocaleDateString(requestedLang, options) +
'</p>');
});
})
.fail(function () {
$blogposts.append("<p>Refresh page to load posts</p>");
});
}
$(recentBlogposts());
</script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-32881640-1']);
_gaq.push(['_setDomainName', 'brackets.io']);
_gaq.push(['_gat._anonymizeIp']);
_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>
</body>
</html>