(site) Add download page

This commit is contained in:
Brandon Tilley 2013-12-25 17:06:35 -08:00
parent 4a8860ec1e
commit 7db6071812
9 changed files with 114 additions and 7 deletions

View File

@ -18,7 +18,7 @@ Requirements
Download Download
-------- --------
Download Planetary.js from the [GitHub releases page](https://github.com/BinaryMuse/planetary.js/releases). Download Planetary.js from the [Planetary.js web site](http://planetaryjs.com/download/).
Quick Start Quick Start
----------- -----------

View File

@ -4,7 +4,7 @@
<i class='globe icon'></i>Planetary.js <i class='globe icon'></i>Planetary.js
</a> </a>
<span class='spacer hide-on-mobile'></span> <span class='spacer hide-on-mobile'></span>
<a class='item minor' href='https://github.com/BinaryMuse/planetary.js/releases'> <a class='item minor' href='/download/'>
<i class='download icon'></i><span class='hide-on-mobile'>Download</span> <i class='download icon'></i><span class='hide-on-mobile'>Download</span>
</a> </a>
<a class='item minor <%- current.path[0] == 'examples' ? 'active' : '' %>' href='/examples/'> <a class='item minor <%- current.path[0] == 'examples' ? 'active' : '' %>' href='/examples/'>

View File

@ -35,7 +35,7 @@ h1.title-header, h2.title-header {
text-align: center; text-align: center;
} }
.feature-list { .feature-list, .download-list {
font-size: 17px; font-size: 17px;
.icon { .icon {

View File

@ -13,7 +13,7 @@ API
Valid keys for `config` are: Valid keys for `config` are:
* `world`: a JavaScript object representing TopoJSON data (not JSON data); defaults to no value, which will cause the plugin to load data from the `file` configuration option * `world`: a JavaScript object representing TopoJSON data (not JSON data); defaults to no value, which will cause the plugin to load data from the `file` configuration option
* `file`: the path to a TopoJSON data file to be loaded via Ajax; defaults to `"world-110m.json"`, which can be downloaded with the Planetary.js library from the [download page](https://github.com/BinaryMuse/planetary.js/releases). * `file`: the path to a TopoJSON data file to be loaded via Ajax; defaults to `"world-110m.json"`, which can be downloaded with the Planetary.js library from the [download page](/download/).
If you plan on creating more than one planet from the same TopoJSON data, you can load the data once before loading the plugin and pass the parsed data to the plugin via the `world` property rather than letting the plugin load the data via Ajax each time a new planet is created. If you plan on creating more than one planet from the same TopoJSON data, you can load the data once before loading the plugin and pass the parsed data to the plugin via the `world` property rather than letting the plugin load the data via Ajax each time a new planet is created.

View File

@ -4,7 +4,7 @@ Core API
Installation Installation
------------ ------------
Once you've [downloaded Planetary.js](https://github.com/BinaryMuse/planetary.js/releases), you can include it via a `script` tag on your page *after* the inclusion of D3 and TopoJSON. This example uses the CDN URLs for those libraries: Once you've [downloaded Planetary.js](/download/), you can include it via a `script` tag on your page *after* the inclusion of D3 and TopoJSON. This example uses the CDN URLs for those libraries:
<div class='ui raised segment'> <div class='ui raised segment'>
<div class='ui blue ribbon label'>HTML</div> <div class='ui blue ribbon label'>HTML</div>
@ -21,7 +21,7 @@ Once you've [downloaded Planetary.js](https://github.com/BinaryMuse/planetary.js
``` ```
</div> </div>
If you use the default `topojson` plugin (most people will), you'll also need to make sure `world-110m.json` (or some other TopoJSON data file) is available on your server. This file is also available from [the download page](https://github.com/BinaryMuse/planetary.js/releases). See the [TopoJSON Plugin](/documentation/builtin_topojson.html) documentation for more information. If you use the default `topojson` plugin (most people will), you'll also need to make sure `world-110m.json` (or some other TopoJSON data file) is available on your server. This file is also available from [the download page](/download/). See the [TopoJSON Plugin](/documentation/builtin_topojson.html) documentation for more information.
Core API Core API
-------- --------

View File

@ -0,0 +1,11 @@
{
"stable": {
"latest": null
},
"unstable": {
"latest": {
"version": "v1.0.0-rc.1",
"name": null
}
}
}

View File

@ -0,0 +1,19 @@
<!doctype html>
<html>
<head>
<%- partial("../_header") %>
<link href="/css/prism.css" rel="stylesheet">
</head>
<body>
<%- partial("../_menu") %>
<div class='content container'>
<div class='page ui slim stackable grid'>
<div class='sixteen wide column'>
<%- yield %>
</div>
</div>
</div>
<%- partial("../_ga") %>
</body>
</html>

View File

@ -0,0 +1,77 @@
<% data = public.download._data %>
<% dl = function(version, file) { %>
<% return "https://github.com/BinaryMuse/planetary.js/releases/download/" + version + "/" + file; %>
<% } %>
<h1>Download Planetary.js</h1>
<p>Download the core Planetary.js library and supporting files here.</p>
<p>Up-to-the-minute releases, archived versions, and full release notes can be found <a href='https://github.com/BinaryMuse/planetary.js/releases'>on the GitHub releases page</a>.</p>
<% if (data.stable.latest) { %>
<h2>Latest Stable Build: <%= data.stable.latest.version %> (<%= data.stable.latest.name %>)</h2>
<div class='ui list download-list'>
<div class='item'>
<i class='icon download'></i>
Core library: [
<a href='<%= dl(data.stable.latest.version, 'planetaryjs.min.js') %>'>minified</a>
|
<a href='<%= dl(data.stable.latest.version, 'planetaryjs.js') %>'>unminified</a>
]
</div>
<div class='item'>
<i class='icon download'></i>
Core library (no plugins): [
<a href='<%= dl(data.stable.latest.version, 'planetaryjs-noplugins.min.js') %>'>minified</a>
|
<a href='<%= dl(data.stable.latest.version, 'planetaryjs-noplugins.js') %>'>unminified</a>
]
</div>
<div class='item'>
<i class='icon download'></i>
Earth TopoJSON data: [
<a href='<%= dl(data.stable.latest.version, 'world-110m.json') %>'>minified</a>
]
</div>
</div>
<% } else { %>
<h2>No stable builds yet</h2>
<% } %>
<% if (data.unstable.latest) { %>
<h2>Latest Unstable Build: <%= data.unstable.latest.version %></h2>
<div class='ui list download-list'>
<div class='item'>
<i class='icon download'></i>
Core library: [
<a href='<%= dl(data.unstable.latest.version, 'planetaryjs.min.js') %>'>minified</a>
|
<a href='<%= dl(data.unstable.latest.version, 'planetaryjs.js') %>'>unminified</a>
]
</div>
<div class='item'>
<i class='icon download'></i>
Core library (no plugins): [
<a href='<%= dl(data.unstable.latest.version, 'planetaryjs-noplugins.min.js') %>'>minified</a>
|
<a href='<%= dl(data.unstable.latest.version, 'planetaryjs-noplugins.js') %>'>unminified</a>
]
</div>
<div class='item'>
<i class='icon download'></i>
Earth TopoJSON data: [
<a href='<%= dl(data.unstable.latest.version, 'world-110m.json') %>'>minified</a>
]
</div>
</div>
<% } else { %>
<h2>No unstable builds yet</h2>
<% } %>

View File

@ -31,7 +31,7 @@
</div> </div>
<div class='ui buttons'> <div class='ui buttons'>
<a class='ui green labeled icon button' href='https://github.com/BinaryMuse/planetary.js/releases'><i class='icon download'></i>Download</a> <a class='ui green labeled icon button' href='/download/'><i class='icon download'></i>Download</a>
<div class='or'></div> <div class='or'></div>
<a class='ui labeled button' href='https://github.com/BinaryMuse/planetary.js'>View Source</a> <a class='ui labeled button' href='https://github.com/BinaryMuse/planetary.js'>View Source</a>
</div> </div>