🎨 starts cleaning code before adding labyrinth generation
This commit is contained in:
@@ -3,7 +3,7 @@ session_start();
|
||||
$currentFile = !empty($_SESSION['file']) ? $_SESSION['file'] : null;
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<link rel="stylesheet" type="text/css" href="index.css" />
|
||||
<style>
|
||||
@@ -11,16 +11,17 @@ $currentFile = !empty($_SESSION['file']) ? $_SESSION['file'] : null;
|
||||
#start{display:block;}
|
||||
.current{background-color:yellow;}
|
||||
</style>
|
||||
<title>Blind Laby - Create your own</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="board">
|
||||
<?php
|
||||
$folder =new DirectoryIterator('../custom/');
|
||||
$folder = new DirectoryIterator('../custom/');
|
||||
|
||||
foreach($folder as $file){
|
||||
if(!$file->isDir()){
|
||||
if (!$file->isDir() && $file->getExtension() === 'js') {
|
||||
echo '<a href="http://labs.shikiryu.com/experimental-games/2/?level='.substr($file->getFileName(), 0, -3).'" title="laby '.substr($file->getFileName(), 0, -3).'"';
|
||||
if($currentFile !== null && $currentFile == $file->getFileName()) echo ' class="current"';
|
||||
if($currentFile !== null && $currentFile === $file->getFileName()) echo ' class="current"';
|
||||
echo '>laby '.substr($file->getFileName(), 0, -3).'</a><br/>';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user