🎨 starts cleaning code before adding labyrinth generation

This commit is contained in:
2024-04-25 17:52:58 +02:00
parent 69b6cafb28
commit f7754632de
4 changed files with 74 additions and 89 deletions

View File

@@ -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/>';
}
}