Revamping the examples area.

This commit is contained in:
photonstorm
2013-10-22 03:58:20 +01:00
parent 82df8c9f54
commit 07724e5001
380 changed files with 8619 additions and 10707 deletions
+12 -63
View File
@@ -1,63 +1,19 @@
<?php
function dirToArray($dir) {
$ignore = array('.', '..', 'Tests.csproj', 'Tests.csproj.user', 'bin', 'html', 'index.php', 'phaser.css', 'obj', 'assets', 'states', 'Phaser Tests.sublime-project');
$result = array();
$root = scandir($dir);
$dirs = array_diff($root, $ignore);
foreach ($dirs as $key => $value)
{
if (is_dir($dir . DIRECTORY_SEPARATOR . $value))
{
$result[$value] = dirToArray($dir . DIRECTORY_SEPARATOR . $value);
}
else
{
if (substr($value, -4) == '.php')
{
$result[] = $value;
}
}
}
return $result;
}
function printJSLinks($dir, $files) {
foreach ($files as $key => $value)
{
$value2 = substr($value, 0, -4);
echo " <li><a href=\"$dir/$value\">$value2</a></li>\n";
}
}
$files = dirToArray(dirname(__FILE__));
$total = 0;
foreach ($files as $key => $value)
{
if (is_array($value) && count($value) > 0)
{
$total += count($value);
}
}
require('funcs.php');
?>
<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<script src='http://code.jquery.com/jquery-latest.min.js' type='text/javascript'></script>
<script src='html/js/application.js' type='text/javascript'></script>
<link href='html/css/stylesheet.css' media='screen' rel='stylesheet' type='text/css'>
<script src='assets/html/application.js' type='text/javascript'></script>
<link href='stylesheet.css' media='screen' rel='stylesheet' type='text/css'>
</head>
<body>
<div class="header">
<div class="box100 no-padding">
<div class="phaser-version">
<span>Phaser Version: 1.0.6</span>
<a href="#" class="version-button">Update to 1.1</a>
<span>Phaser Version: 1.1</span>
<!--<a href="#" class="version-button">Update to 1.2</a>-->
</div>
</div>
<div class="clear"></div>
@@ -113,7 +69,7 @@
<div class="box80">
<ul class="group-items">
<?php
printJSLinks($key, $value);
echo printJSLinks($key, $value, false);
$i++;
@@ -130,21 +86,14 @@
}
?>
<div class="clear5"></div>
<div class="gradient">
<div class="clear"></div>
<div id="footer" class="footer">
<div class="main-container centered">
<div class="prize-bg">
<a href="#" class="prize-button">View details &amp; submit</a>
</div>
</div>
</div>
<div class="clear"></div>
<div class="footer">
<div class="main-container centered">
<div class="clear25"></div>
<div class="line">
<div class="box20 helvetica">
<div class="box20">
<a href="http://www.photonstorm.com" class="photonstorm-logo"></a>
&copy; 2013 Photon Storm Ltd.<br/>
All rights reserved.
@@ -152,11 +101,11 @@
<div class="box5">
<div class="flixel-logo"></div>
</div>
<div class="box15 helvetica">
<div class="box15">
Looking for a flash game framework?<br/>
<a href="http://flixel.org">Try Flixel!</a>
<a href="http://flixel.org">Try Flixel</a>
</div>
<div class="box55 helvetica float-right">
<div class="box55 float-right">
<ul class="footer-links">
<li><a class="github-icon" href="https://github.com/photonstorm/phaser">Phaser on Github</a></li>
<li><a class="twitter-icon" href="https://twitter.com/photonstorm">@photonstorm</a></li>