Add a basic ASCII page
This commit is contained in:
32
ascii/index.php
Normal file
32
ascii/index.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<?php include $_SERVER['DOCUMENT_ROOT'].'/src/common-meta.php';?>
|
||||
<title>ASCII Art - Desu, Ltd.</title>
|
||||
<style>.content pre {font-size:60%;text-align:center;margin:1em;padding:1em;background:rgba(0,0,0,0.10);}</style>
|
||||
</head>
|
||||
<body>
|
||||
<?php include $_SERVER['DOCUMENT_ROOT'].'/src/common-header.php';?>
|
||||
<div class="content">
|
||||
<div class="section">
|
||||
<h1>ASCII Art</h1>
|
||||
<p>Where known, artists are attributed. Sadly, I don't know the artists for most of these.</p>
|
||||
<?php
|
||||
$dir = new DirectoryIterator(".");
|
||||
foreach ($dir as $fileinfo) {
|
||||
if (!$fileinfo->isDot() && $fileinfo->isDir()) {
|
||||
printf("<h2 id=%s>%s</h2>", $fileinfo->getFilename(), $fileinfo->getFilename());
|
||||
$dir2 = new DirectoryIterator($fileinfo->getFilename());
|
||||
foreach ($dir2 as $fileinfo2) {
|
||||
if (!$fileinfo2->isDot()) {
|
||||
printf("<pre id=%s>%s</pre>", $fileinfo2->getFilename(), file_get_contents($fileinfo2->getPathname()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php include $_SERVER['DOCUMENT_ROOT'].'/src/common-footer.php';?>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user