-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display LTS and Stable on the download page.
Duplicated the download page to have two separate pages for each release line: LTS and Stable. Two links in the upper right corner will appear as soon as the https://nodejs.org/dist/index.json contains *both* an LTS and a Stable v5.x release. Until then, no extra links will be visible.
- Loading branch information
Showing
8 changed files
with
224 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<!DOCTYPE html> | ||
<html lang="{{site.locale}}"> | ||
{{> html-head }} | ||
|
||
<body> | ||
{{> header }} | ||
|
||
<div id="main"> | ||
<div class="container"> | ||
<article> | ||
<div class="download-header"> | ||
<h1>{{downloads.headline}}</h1> | ||
<ul class="list-divider-pipe"> | ||
<li> | ||
<a href="/{{site.locale}}/{{site.download.link}}" title="{{downloads.display-hint}} {{downloads.lts}}">{{downloads.lts}}</a> | ||
</li> | ||
<li> | ||
<a href="/{{site.locale}}/{{site.download.link}}/stable" title="{{downloads.display-hint}} {{downloads.stable}}"><strong>{{downloads.stable}}</strong></a> | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
{{> download-matrix version=project.currentVersions.stable}} | ||
|
||
<section> | ||
<h2>{{additional.headline}}</h2> | ||
<p>{{additional.intro}}</p> | ||
|
||
<table class="download-matrix full-width"> | ||
<tbody> | ||
<tr> | ||
<th>{{additional.platform}}</th> | ||
<th>{{additional.provider}}</th> | ||
<th></th> | ||
</tr> | ||
<tr> | ||
<th>AIX on Power Systems</th> | ||
<td><span>IBM</span></td> | ||
<td><a href="http://www.ibm.com/developerworks/web/nodesdk/">{{download}}</a></td> | ||
</tr> | ||
<tr> | ||
<th>Linux on Power Systems</th> | ||
<td><span>IBM</span></td> | ||
<td><a href="http://www.ibm.com/developerworks/web/nodesdk/">{{download}}</a></td> | ||
</tr> | ||
<tr> | ||
<th>Linux on System z</th> | ||
<td><span>IBM</span></td> | ||
<td><a href="http://www.ibm.com/developerworks/web/nodesdk/">{{download}}</a></td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
</section> | ||
|
||
</article> | ||
|
||
</div> | ||
</div> | ||
|
||
{{> footer }} | ||
<script src="/static/js/download.js" async defer></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<section> | ||
<p>{{downloads.intro}}</p> | ||
|
||
<div class="download-hero full-width"> | ||
<ul class="no-padding"> | ||
<li> | ||
<a href="https://nodejs.org/dist/{{version}}/node-{{version}}-x86.msi" id="windows-downloadbutton" data-version="{{version}}"> | ||
<img src="/static/images/platform-icon-win.png" height="50" width="45" alt=""> | ||
Windows Installer | ||
<p class="small color-lightgray pad-bottom-small">node-{{version}}-x86.msi</p> | ||
</a> | ||
</li> | ||
<li> | ||
<a href="https://nodejs.org/dist/{{version}}/node-{{version}}.pkg"> | ||
<img src="/static/images/platform-icon-osx.png" height="50" width="45" alt=""> | ||
Macintosh Installer | ||
<p class="small color-lightgray pad-bottom-small">node-{{version}}.pkg</p> | ||
</a> | ||
</li> | ||
<li> | ||
<a href="https://nodejs.org/dist/{{version}}/node-{{version}}.tar.gz"> | ||
<img src="/static/images/platform-icon-generic.png" height="50" width="45" alt=""> | ||
Source Code | ||
<p class="small color-lightgray pad-bottom-small">node-{{version}}.tar.gz</p> | ||
</a> | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
<table class="download-matrix full-width"> | ||
<tbody> | ||
<tr> | ||
<th>Windows Installer (.msi)</th> | ||
<td colspan="3"><a href="https://nodejs.org/dist/{{version}}/node-{{version}}-x86.msi">32-bit</a></td> | ||
<td colspan="3"><a href="https://nodejs.org/dist/{{version}}/node-{{version}}-x64.msi">64-bit</a></td> | ||
</tr> | ||
|
||
<tr> | ||
<th>Windows Binary (.exe)</th> | ||
<td colspan="3"><a href="https://nodejs.org/dist/{{version}}/win-x86/node.exe">32-bit</a></td> | ||
<td colspan="3"><a href="https://nodejs.org/dist/{{version}}/win-x64/node.exe">64-bit</a></td> | ||
</tr> | ||
|
||
<tr> | ||
<th>Mac OS X Installer (.pkg)</th> | ||
<td colspan="6"><a href="https://nodejs.org/dist/{{version}}/node-{{version}}.pkg">64-bit</a></td> | ||
</tr> | ||
|
||
<tr> | ||
<th>Mac OS X Binaries (.tar.gz)</th> | ||
<td colspan="6"><a href="https://nodejs.org/dist/{{version}}/node-{{version}}-darwin-x64.tar.gz">64-bit</a></td> | ||
</tr> | ||
|
||
<tr> | ||
<th>Linux Binaries (.tar.gz)</th> | ||
<td colspan="3"><a href="https://nodejs.org/dist/{{version}}/node-{{version}}-linux-x86.tar.gz">32-bit</a></td> | ||
<td colspan="3"><a href="https://nodejs.org/dist/{{version}}/node-{{version}}-linux-x64.tar.gz">64-bit</a></td> | ||
</tr> | ||
|
||
<tr> | ||
<th>SunOS Binaries (.tar.gz)</th> | ||
<td colspan="3"><a href="https://nodejs.org/dist/{{version}}/node-{{version}}-sunos-x86.tar.gz">32-bit</a></td> | ||
<td colspan="3"><a href="https://nodejs.org/dist/{{version}}/node-{{version}}-sunos-x64.tar.gz">64-bit</a></td> | ||
</tr> | ||
|
||
<tr> | ||
<th>ARM Binaries (.tar.gz)</th> | ||
<td colspan="2"><a href="https://nodejs.org/dist/{{version}}/node-{{version}}-linux-armv6l.tar.gz">ARMv6</a></td> | ||
<td colspan="2"><a href="https://nodejs.org/dist/{{version}}/node-{{version}}-linux-armv7l.tar.gz">ARMv7</a></td> | ||
<td colspan="2"><a href="https://nodejs.org/dist/{{version}}/node-{{version}}-linux-arm64.tar.gz">ARMv8</a></td> | ||
</tr> | ||
|
||
<tr> | ||
<th>Source Code</th> | ||
<td colspan="6"> | ||
<a href="https://nodejs.org/dist/{{version}}/node-{{version}}.tar.gz">node-{{version}}.tar.gz</a> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
{{downloads.currentVersion}}: <strong>{{version}}</strong> | ||
<ul> | ||
<li><a href="https://nodejs.org/dist/{{version}}">{{site.all-downloads}}</a></li> | ||
<li><a href="/{{site.locale}}/{{site.download.package-manager.link}}">{{site.download.package-manager.text}}</a></li> | ||
<li><a href="/{{site.locale}}/{{site.download.releases.link}}/">{{site.download.releases.text}}</a></li> | ||
</ul> | ||
<p>{{downloads.buildDisclaimer}}</p> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
layout: download-stable.hbs | ||
title: Download | ||
download: Download | ||
downloads: | ||
headline: Downloads | ||
lts: LTS | ||
stable: Stable | ||
display-hint: Display downloads for | ||
intro: > | ||
Download the Node.js source code or a pre-built installer for your platform, and start developing today. | ||
currentVersion: Current stable version | ||
buildDisclaimer: "Note: Python 2.6 or 2.7 is required to build from source tarballs." | ||
additional: | ||
headline: Additional Platforms | ||
intro: > | ||
Members of the Node.js community maintain unofficial builds of Node.js for additional platforms. Note that such builds are not supported by the Node.js core team and may not yet be at the same build level as current Node.js release. | ||
platform: Platform | ||
provider: Provider | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
'use strict' | ||
|
||
const semver = require('semver') | ||
|
||
exports.stable = (versions) => { | ||
const matched = versions.find((version) => typeof version.lts === 'undefined').version | ||
return semver.gte(matched, '5.0.0') ? matched : undefined | ||
} | ||
|
||
exports.lts = (versions) => versions.find((version) => typeof version.lts !== 'undefined').version |