Skip to content

Commit fe6265f

Browse files
author
George Adams
authored
Merge pull request #112 from Joe-Brady/latest-redesign
Latest page - full redesign
2 parents a9d22e0 + 9d1a6c0 commit fe6265f

12 files changed

+305
-125
lines changed

src/handlebars/archive.handlebars

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
<h1 class="large-title">Archive</h1>
77
<a href="./releases.html" id="latest-button" class="blue-button a-button">
88
<div>
9-
<span>See the latest build</span>
9+
<span>Latest build</span>
1010
<i class="fa fa-arrow-circle-o-right" aria-hidden="true"></i>
1111
</div>
1212
</a>
1313
<a href="./nightly.html" id="nightly-button" class="grey-button a-button">
1414
<div>
15-
<span>See the nightly builds</span>
15+
<span>Nightly builds</span>
1616
<i class="fa fa-arrow-circle-o-right" aria-hidden="true"></i>
1717
</div>
1818
</a>

src/handlebars/getinvolved.handlebars

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,6 @@
7272
</p>
7373
</div>
7474

75-
<!--<p><asciinema-player autoplay=true loop=true preload=true src="dist/assets/asciicast-107176.json" cols="70" rows="15"></asciinema-player></p>-->
76-
7775
</main>
7876

7977
{{> footer }}

src/handlebars/nightly.handlebars

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<a href="./releases.html" id="latest-button" class="blue-button a-button">
99
<div>
10-
<span>See the latest build</span>
10+
<span>Latest build</span>
1111
<i class="fa fa-arrow-circle-o-right" aria-hidden="true"></i>
1212
</div>
1313
</a>
@@ -19,21 +19,21 @@
1919
</div>
2020
</a>
2121

22-
<h3 id="scroll-text" class="hide" style="margin: 2rem 0 0 0;">Scroll horizontally to see all information <i class="fa fa-arrow-circle-o-right" aria-hidden="true"></i></h3>
23-
24-
<input type="text" style="margin-top: 2rem;" class="block margin-auto" id="search" placeholder="Type to search">
22+
<input type="text" style="margin-top: 2rem;" class="block margin-auto" id="search" placeholder="Type to search">
23+
24+
<div style="margin-top: 1rem;">
25+
<span>View</span>
26+
<select id="numberpicker">
27+
<option value="10">10</option>
28+
<option value="20" selected="selected">20</option>
29+
<option value="50">50</option>
30+
<option value="100">100</option>
31+
</select>
32+
<span>builds prior to: </span>
33+
<input type="text" id="datepicker" style="margin-top: 0.5rem;">
34+
</div>
2535

26-
<div style="margin-top: 1rem;">
27-
<span>View</span>
28-
<select id="numberpicker">
29-
<option value="10">10</option>
30-
<option value="20" selected="selected">20</option>
31-
<option value="50">50</option>
32-
<option value="100">100</option>
33-
</select>
34-
<span>builds prior to: </span>
35-
<input type="text" id="datepicker" style="margin-top: 0.5rem;">
36-
</div>
36+
<h3 id="scroll-text" class="hide" style="margin: 2rem 0 0 0;">Scroll horizontally <i class="fa fa-arrow-circle-o-right" aria-hidden="true"></i></h3>
3737

3838
<div id="search-error" class="hide">No search results</div>
3939

src/handlebars/releases.handlebars

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,45 @@
44

55
<div id="latest-page">
66
<h1 class="large-title">Latest build</h1>
7-
<div id="loading"><img src="dist/assets/loading_dots.gif" width="40" height="40"></div>
87

98
<div style="margin-bottom: 2rem;">
10-
<a href="./archive.html" class="grey-button a-button">
9+
<a href="./archive.html" class="blue-button a-button">
1110
<div>
1211
<span>Build archive</span>
1312
<i class="fa fa-arrow-circle-o-right" aria-hidden="true"></i>
1413
</div>
1514
</a>
15+
<a href="./nightly.html" id="nightly-button" class="grey-button a-button">
16+
<div>
17+
<span>Nightly builds</span>
18+
<i class="fa fa-arrow-circle-o-right" aria-hidden="true"></i>
19+
</div>
20+
</a>
21+
22+
<div id="loading"><img src="dist/assets/loading_dots.gif" width="40" height="40"></div>
1623
</div>
1724

1825
<div id="latest-container" class="invisible">
1926

27+
<h2 style="margin-bottom: 0.6rem;">Build <strong><a href="" id="latest-build-name" target="_blank"></a></strong></h2>
28+
2029
<table id="latest-metadata-table" cellspacing="0" cellpadding="0">
2130
<tr>
22-
<td><strong>Name: </strong><a href="" id="latest-build-name" class="dark-link no-underline" target="_blank"></a></td>
2331
<td><strong>Date: </strong><span id="latest-date"></span></td>
24-
<!--<td><a href="" class="light-link" id="latest-changelog" target="_blank"><strong>Changelog</strong></a></td>-->
2532
<td><strong>Timestamp: </strong><span id="latest-timestamp"></span></td>
26-
<!--<td><strong>Build number: </strong><span id="latest-buildnumber"></span></td>-->
27-
<!--<td><strong>Commit ref: </strong><a href="" class="light-link" id="latest-commitref" target="_blank"></a></td>-->
2833
</tr>
2934
</table>
3035

31-
<div id="latest-downloads-container"></div>
36+
<div id="latest-downloads-container">
37+
<h2 style="margin-bottom: 0.5rem;">Select a platform</h2>
38+
<h3 id="latest-scroll-text" class="hide">(Scroll horizontally)</h3>
39+
40+
<table id="latest-table">
41+
<tr id="latest-selector"></tr>
42+
<tr id="latest-info"></tr>
43+
</table>
44+
45+
</div>
3246

3347
</div>
3448

src/js/0-global.js

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -3,58 +3,64 @@
33
// officialName: The 'legal name' or official name for the OS. This is displayed on most pages.
44
// searchableName: a string that appears in the name of the binaries and checksums, that can be used to identify the platform.
55
// logo: examplefilename.png. The path to the logo folder is set below (the 'logoPath' var).
6-
// fileExtension: should include the dot at the beginning of the extension, e.g .tar.gz or .zip
6+
// binaryExtension: should include the dot at the beginning of the extension, e.g .tar.gz or .zip
77
// requirements: currently just displayed on the 'latest build' page. Should be a short string identifying the most important min. requirement of a machine to run the latest build.
88
// architecture: 64 or 32. May be required for differentiation between future builds.
99
// osDetectionString: this string is searched by the OS detection library platform.js to find a match. Include as many words as you like, separated by spaces.
1010
var platforms = [
1111
{
12-
officialName: "Linux x86-64",
12+
officialName: "Linux x64",
1313
searchableName: "X64_LINUX",
1414
logo: "linux.png",
15-
fileExtension: ".tar.gz",
15+
binaryExtension: ".tar.gz",
16+
installerExtension: "no-installer-available",
1617
architecture: "64",
1718
osDetectionString: "Linux Mint Debian Fedora FreeBSD Gentoo Haiku Kubuntu OpenBSD Red Hat RHEL SuSE Ubuntu Xubuntu hpwOS webOS Tizen"
1819
},
20+
{
21+
officialName: "Windows x64",
22+
searchableName: "X64_WIN",
23+
logo: "windows.png",
24+
binaryExtension: ".zip",
25+
installerExtension: ".exe",
26+
architecture: "64",
27+
osDetectionString: "Windows Win Cygwin"
28+
},
29+
{
30+
officialName: "macOS x64",
31+
searchableName: "X64_MAC",
32+
logo: "mac.png",
33+
binaryExtension: ".tar.gz",
34+
installerExtension: ".dmg",
35+
architecture: "64",
36+
osDetectionString: "Mac OS X OSX macOS Macintosh"
37+
},
1938
{
2039
officialName: "Linux s390x",
2140
searchableName: "S390X_LINUX",
2241
logo: "s390x.png",
23-
fileExtension: ".tar.gz",
42+
binaryExtension: ".tar.gz",
43+
installerExtension: "no-installer-available",
2444
architecture: "64",
2545
osDetectionString: "not-to-be-detected"
2646
},
2747
{
2848
officialName: "Linux ppc64le",
2949
searchableName: "PPC64LE_LINUX",
3050
logo: "ppc64le.png",
31-
fileExtension: ".tar.gz",
51+
binaryExtension: ".tar.gz",
52+
installerExtension: "no-installer-available",
3253
architecture: "64",
3354
osDetectionString: "not-to-be-detected"
3455
},
3556
{
3657
officialName: "Linux aarch64",
3758
searchableName: "AARCH64_LINUX",
3859
logo: "arm.png",
39-
fileExtension: ".tar.gz",
60+
binaryExtension: ".tar.gz",
61+
installerExtension: "no-installer-available",
4062
architecture: "64",
4163
osDetectionString: "not-to-be-detected"
42-
},
43-
{
44-
officialName: "Windows x86-64",
45-
searchableName: "X64_WIN",
46-
logo: "windows.png",
47-
fileExtension: ".zip",
48-
architecture: "64",
49-
osDetectionString: "Windows Win Cygwin"
50-
},
51-
{
52-
officialName: "macOS x86-64",
53-
searchableName: "X64_MAC",
54-
logo: "mac.png",
55-
fileExtension: ".tar.gz",
56-
architecture: "64",
57-
osDetectionString: "Mac OS X OSX macOS Macintosh"
5864
}
5965
];
6066

@@ -90,9 +96,14 @@ function getOfficialName(searchableName) {
9096
return (lookup[searchableName].officialName);
9197
}
9298

93-
// gets the FILE EXTENSION when you pass in 'searchableName'
94-
function getFileExt(searchableName) {
95-
return (lookup[searchableName].fileExtension);
99+
// gets the BINARY EXTENSION when you pass in 'searchableName'
100+
function getBinaryExt(searchableName) {
101+
return (lookup[searchableName].binaryExtension);
102+
}
103+
104+
// gets the INSTALLER EXTENSION when you pass in 'searchableName'
105+
function getInstallerExt(searchableName) {
106+
return (lookup[searchableName].installerExtension);
96107
}
97108

98109
// gets the LOGO WITH PATH when you pass in 'searchableName'

src/js/archive.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,23 +63,23 @@ function buildArchiveHTML(releasesJson) {
6363

6464
// secondly, check if the file has the expected file extension for that platform...
6565
// (this filters out all non-binary attachments, e.g. SHA checksums - these contain the platform name, but are not binaries)
66-
var thisFileExtension = getFileExt(thisPlatform); // get the file extension associated with this platform
67-
if(uppercaseFilename.indexOf((thisFileExtension.toUpperCase())) >= 0) {
66+
var thisBinaryExtension = getBinaryExt(thisPlatform); // get the file extension associated with this platform
67+
if(uppercaseFilename.indexOf(thisBinaryExtension.toUpperCase()) >= 0) {
6868

6969
// set values ready to be injected into the HTML
7070
var thisOfficialName = getOfficialName(thisPlatform);
7171
var thisBinaryLink = (eachAsset.browser_download_url);
7272
var thisBinarySize = Math.floor((eachAsset.size)/1024/1024);
73-
var thisChecksumLink = (eachAsset.browser_download_url).replace(thisFileExtension, ".sha256.txt");
73+
var thisChecksumLink = (eachAsset.browser_download_url).replace(thisBinaryExtension, ".sha256.txt");
7474

7575
// prepare a fully-populated table row for this platform
76-
platformTableRows += ("<tr class='platform-row "+ thisPlatform +"'><td>"+ thisOfficialName +"</td><td class='download-td'><a class='grey-button no-underline' href='"+ thisBinaryLink +"'>"+ thisFileExtension +" ("+ thisBinarySize +" MB)</a></td><td><a href='"+ thisChecksumLink +"' class='dark-link'>Checksum</a></td></tr>");
76+
platformTableRows += ("<tr class='platform-row "+ thisPlatform +"'><td>"+ thisOfficialName +"</td><td class='download-td'><a class='grey-button no-underline' href='"+ thisBinaryLink +"'>"+ thisBinaryExtension +" ("+ thisBinarySize +" MB)</a></td><td><a href='"+ thisChecksumLink +"' class='dark-link'>Checksum</a></td></tr>");
7777
}
7878
}
7979
});
8080

8181
// create a new table row containing all release information, and the completed platform/binary table
82-
var newArchiveContent = ("<tr class='release-row'><td class='blue-bg'><div><h1><a href='"+ thisGitLink +"' class='light-link' target='_blank'>"+ thisReleaseName +"</a></h1><h4>"+ thisReleaseDate +"</h4></div></td><td><table class='archive-platforms'>"+ platformTableRows +"</table></td><td class='archive-details'><!--<div><strong><a href='' class='dark-link'>Changelog</a></strong></div>--><div><strong>Timestamp: </strong>"+ thisTimestamp +"</div><!--<div><strong>Build number: </strong></div>--><!--<div><strong>Commit: </strong><a href='' class='dark-link'></a></div>--></td></tr>");
82+
var newArchiveContent = ("<tr class='release-row'><td class='blue-bg'><div><h1><a href='"+ thisGitLink +"' class='light-link' target='_blank'>"+ thisReleaseName +"</a></h1><h4>"+ thisReleaseDate +"</h4></div></td><td><table class='archive-platforms'>"+ platformTableRows +"</table></td><td class='archive-details'><div><strong>Timestamp: </strong>"+ thisTimestamp +"</div></td></tr>");
8383

8484
archiveTableBody.innerHTML += newArchiveContent;
8585

src/js/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ function buildHomepageHTML(releasesJson) {
5858

5959
// secondly, check if the file has the expected file extension for that platform...
6060
// (this filters out all non-binary attachments, e.g. SHA checksums - these contain the platform name, but are not binaries)
61-
var thisFileExtension = getFileExt(thisPlatform); // get the file extension associated with this platform
62-
if(uppercaseFilename.indexOf((thisFileExtension.toUpperCase())) >= 0) {
61+
var thisBinaryExtension = getBinaryExt(thisPlatform); // get the file extension associated with this platform
62+
if(uppercaseFilename.indexOf(thisBinaryExtension.toUpperCase()) >= 0) {
6363
var uppercaseOSname = OS.searchableName.toUpperCase();
6464

6565
// thirdly, check if the user's OS searchableName string matches part of this binary's name (e.g. ...X64_LINUX...)

src/js/nightly.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ function buildNightlyHTML(releasesJson) {
7676

7777
// secondly, check if the file has the expected file extension for that platform...
7878
// (this filters out all non-binary attachments, e.g. SHA checksums - these contain the platform name, but are not binaries)
79-
var thisFileExtension = getFileExt(thisPlatform); // get the file extension associated with this platform
80-
if(uppercaseFilename.indexOf((thisFileExtension.toUpperCase())) >= 0) {
79+
var thisBinaryExtension = getBinaryExt(thisPlatform); // get the file extension associated with this platform
80+
if(uppercaseFilename.indexOf(thisBinaryExtension.toUpperCase()) >= 0) {
8181

8282
// set values ready to be injected into the HTML
8383
var publishedAt = eachRelease.published_at;
@@ -87,14 +87,14 @@ function buildNightlyHTML(releasesJson) {
8787
var thisOfficialName = getOfficialName(thisPlatform);
8888
var thisBinaryLink = (eachAsset.browser_download_url);
8989
var thisBinarySize = Math.floor((eachAsset.size)/1024/1024);
90-
var thisChecksumLink = (eachAsset.browser_download_url).replace(thisFileExtension, ".sha256.txt");
90+
var thisChecksumLink = (eachAsset.browser_download_url).replace(thisBinaryExtension, ".sha256.txt");
9191
var thisTimestamp = (publishedAt.slice(0, 4) + publishedAt.slice(8, 10) + publishedAt.slice(5, 7) + publishedAt.slice(11, 13) + publishedAt.slice(14, 16));
9292

9393
var currentNightlyContent = nightlyList.innerHTML;
9494

9595
// prepare a fully-populated HTML block for this release
9696
// to change the HTML of the nightly table rows/cells, you must change this template.
97-
var newNightlyContent = currentNightlyContent += ("<tr class='nightly-container'><td class='nightly-header'><div><strong><a href='"+thisGitLink+"' class='dark-link' target='_blank'>"+thisReleaseName+"</a></strong></div><div class='divider'> | </div><div class='nightly-release-date'>"+thisReleaseDate+"</div></td><td class='nightly-platform-block'>"+thisOfficialName+"</td><td class='nightly-downloads-block'><div><a class='dark-link' href='"+thisBinaryLink+"'>"+thisFileExtension+" ("+thisBinarySize+" MB)</a><div class='divider'> | </div><a href='"+thisChecksumLink+"' class='dark-link'>Checksum</a></div></td><td class='nightly-details'><!--<div><strong><a href='put-changelog-link-here' class='dark-link'>Changelog</a></strong></div> <div class='divider'> | </div>--><div><strong>Timestamp: </strong>"+thisTimestamp+"</div><!--<div class='divider'> | </div> <div><strong>Commit: </strong><a href='put-commit-ref-link-here' class='dark-link'>put-commit-ref-here</a></div>--></td></tr>");
97+
var newNightlyContent = currentNightlyContent += ("<tr class='nightly-container'><td class='nightly-header'><div><strong><a href='"+thisGitLink+"' class='dark-link' target='_blank'>"+thisReleaseName+"</a></strong></div><div class='divider'> | </div><div class='nightly-release-date'>"+thisReleaseDate+"</div></td><td class='nightly-platform-block'>"+thisOfficialName+"</td><td class='nightly-downloads-block'><div><a class='dark-link' href='"+thisBinaryLink+"'>"+thisBinaryExtension+" ("+thisBinarySize+" MB)</a><div class='divider'> | </div><a href='"+thisChecksumLink+"' class='dark-link'>Checksum</a></div></td><td class='nightly-details'><div><strong>Timestamp: </strong>"+thisTimestamp+"</div></td></tr>");
9898

9999
// update the HTML container element with this new, blank, template row (hidden at this stage)
100100
nightlyList.innerHTML = newNightlyContent;

0 commit comments

Comments
 (0)