Skip to content

Commit

Permalink
Merge pull request phaserjs#121 from ooflorent/examples-order
Browse files Browse the repository at this point in the history
Fix order of examples
  • Loading branch information
photonstorm committed Oct 24, 2013
2 parents f522cda + 708a144 commit 03054c1
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
12 changes: 10 additions & 2 deletions examples/_site/js/phaser-examples.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,16 @@ $(document).ready(function(){
var node = '';
var laser = '';

$.each(data, function(dir, files)
var directories = Object.keys(data);

directories.splice(directories.indexOf('basics'), 1);
directories.splice(directories.indexOf('games'), 1);
directories.sort();
directories.unshift('basics', 'games');

directories.forEach(function(dir)
{
var files = data[dir];
len = Math.floor(files.length / 4) + 1;

if ((files.length / 4) % 1 == 0)
Expand Down Expand Up @@ -75,7 +83,7 @@ $(document).ready(function(){
node += '<p>Did you open this html file locally?</p>';
node += '<p>It needs to be opened via a web server, or due to browser security permissions<br />it will be unable to load local resources such as images and json data.</p>';
node += '<p>Please see our <a href="#">Getting Started guide</a> for details.</p>';

node += '</div>';
node += '</div>';

Expand Down
10 changes: 9 additions & 1 deletion examples/_site/js/phaser-sideview.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,16 @@ $(document).ready(function(){
var i = 0;
var node = '';

$.each(data, function(dir, files)
var directories = Object.keys(data);

directories.splice(directories.indexOf('basics'), 1);
directories.splice(directories.indexOf('games'), 1);
directories.sort();
directories.unshift('basics', 'games');

directories.forEach(function(dir)
{
var files = data[dir];
node = '<h2>' + dir + '</h2>';

for (var e = 0; e < files.length; e++)
Expand Down

0 comments on commit 03054c1

Please sign in to comment.