New downloads page with NodeCDN hosted files

This commit is contained in:
David Vierra 2015-04-08 19:07:58 -10:00
parent 5d07f06564
commit 0fffc02365
10 changed files with 133 additions and 16 deletions

View File

@ -1,2 +1,3 @@
source 'http://rubygems.org/'
gem 'github-pages'
gem 'wdm', '>= 0.1.0'

View File

@ -1,12 +1,3 @@
<div class="container-fluid">
<div class="row-fluid">
<div class="span12 footer navbar-inverse navbar-fixed-bottom">
<p class="copyright">&copy;{{ site.time | date: '%Y' }} {{ site.name }}. Powered by <a href="http://jekyllrb.com">Jekyll</a>, theme by <a href="https://github.com/scotte/jekyll-clean">Scott Emmons</a>
under
<a href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution</a></p>
</div>
</div>
</div>
{% include disqus-counts.html %}
{% include analytics.html %}

View File

@ -7,6 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="{{ site.baseurl }}/js/jquery.min.js"></script>
<script src="{{ site.baseurl }}/js/bootstrap.min.js"></script>
<link href="{{ site.baseurl }}/css/bootstrap.min.css" rel="stylesheet">
<link href="{{ site.baseurl }}/css/theme.css" rel="stylesheet">
<link href="{{ site.baseurl }}/css/mcedit.css" rel="stylesheet">
@ -33,11 +34,10 @@
<li><a href="{{ site.baseurl }}/">Home</a></li>
<li class="visible-xs-block"><a href="{{ site.baseurl }}/links.html">Links</a></li>
<li><a href="{{ site.baseurl }}/about.html">About</a></li>
<li><a href="{{ site.baseurl }}/downloads.html">Download</a></li>
<li><a href="https://github.com/{{ site.github }}/issues">Report Issue</a></li>
{% if site.github != '' %}
<li><a href="https://github.com/{{ site.github }}">Develop</a></li>
{% endif %}
<li><a href="http://khroki.github.io/MCEdit-Unified/">MCEdit 1.x</a></li>
<li><a href="https://github.com/{{ site.github }}">Source Code</a></li>
<li><a href="http://khroki.github.io/MCEdit-Unified/">MCEdit 1.0</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li>

View File

@ -1,6 +1,6 @@
<div class="sidebar well">
<a href="http://github.com/mcedit/mcedit2/releases" class="btn btn-default btn-download">
<a href="/downloads.html" class="btn btn-default btn-download">
<span class="glyphicon glyphicon-download-alt" aria-hidden="true"
style="margin-right:10px"></span>Download MCEdit</a>

View File

@ -28,7 +28,7 @@ a.btn-download {
color: white;
}
/* --- download links --- */
/* --- sidebar download links --- */
.latest-version {
margin: 12px;
}
@ -40,6 +40,38 @@ a.btn-download {
line-height: 26px;
padding-left: 26px;
}
/* --- downloads page table --- */
.download-list {
width: 100%;
}
.download-list tr.infos {
border-top: 1px solid #CCC;
}
.download-list .infos td {
padding: 0.6em 0.25em 0.5em;
}
.download-list .infos td.rev {
width: 18%;
font-weight:bold;
text-align: center;
}
.download-list .infos td.date {
width: 18%;
text-align: center;
}
.download-list .infos .description {
font-style:italic;
}
.download-list .links td {
padding: 0.6em 0.25em 0.5em;
}
/* --- icons --- */
.li-icon-windows {
@ -53,3 +85,13 @@ a.btn-download {
.li-icon-apple {
background-image: url("/images/icon-apple.png")
}
/* --- bootstrap.css theming --- */
.alert {
border-color: #EEE;
}
.page-header {
margin-top:10px;
}

View File

@ -4,7 +4,7 @@ body {
}
.copyright {
color: #ffffff;
color: #777777;
}
.footer {

57
downloads.html Normal file
View File

@ -0,0 +1,57 @@
---
layout: default
---
{% raw %}
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.js"></script>
<script src="/js/moment.min.js"></script>
<script src="/js/ng/dl-control.js"></script>
<div class="page-header">
<h1>Downloads</h1>
</div>
<h1>Release Versions
</h1>
<div class="alert">
As MCEdit 2.0 is currently in alpha, no release versions are available.
</div>
<h1>Development Versions</h1>
<div class="alert">
Development Versions are released once per day, if there have been any changes to the source code. These versions are
not well-tested and are not recommended for serious use.
</div>
<div ng-app="dlApp">
<div ng-controller="DownloadListCtrl">
<table class="download-list">
<tr class="infos" ng-repeat-start="download in downloads">
<td class="rev">{{download.rev}}</td>
<td class="date" title="{{download.rev_date | date : 'medium' }}">{{download.rev_date | fromNow}}</td>
<td class="description">
<a href="https://github.com/mcedit/mcedit2/commits/{{download.rev_hash}}">{{download.rev_desc}}</a>
</td>
</tr>
<tr class="links" ng-repeat-end>
<td></td>
<td colspan="2">
<a class="btn btn-default always-ltr x64"
href="http://download.nodecdn.net/containers/mcedit/download/dev/mcedit2-win64-{{download.rev}}.exe">
<span class="glyphicon glyphicon-download-alt" aria-hidden="true"
style="margin-right:10px"></span>Windows (64-bit)</a>
<a class="btn btn-default always-ltr x32"
href="http://download.nodecdn.net/containers/mcedit/download/dev/mcedit2-win32-{{download.rev}}.exe">
<span class="glyphicon glyphicon-download-alt" aria-hidden="true"
style="margin-right:10px"></span>Windows (32-bit)</a>
</td>
</tr>
</table>
</div>
</div>
<div align="center" style="margin-top:8em">Content hosting for development versions provided by:<br>
<a href="https://nodecraft.com/">
<img src="/images/nodecraft_237_65.png">
</a>
</div>
{% endraw %}

BIN
images/nodecraft_237_65.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

6
js/moment.min.js vendored Normal file

File diff suppressed because one or more lines are too long

20
js/ng/dl-control.js Normal file
View File

@ -0,0 +1,20 @@
var dlApp = angular.module('dlApp', []);
var MODEL_URL = 'http://download.nodecdn.net/containers/mcedit/downloads.jsonp';
var DL_SCOPE;
function MCEDIT2_DOWNLOADS(data) {
DL_SCOPE.downloads = data;
}
dlApp.controller('DownloadListCtrl', function ($scope, $http) {
DL_SCOPE=$scope;
$http.jsonp(MODEL_URL);
});
dlApp.filter('fromNow', function() {
return function(date) {
return moment(date).fromNow();
}
});