From e7d593cf078eaac4f1af82fc39d9fdf0ae8a37f8 Mon Sep 17 00:00:00 2001 From: Ada Isopods Date: Mon, 9 Jan 2023 21:57:46 -0700 Subject: Initial commit of website contents --- art/index.php | 131 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 131 insertions(+) create mode 100644 art/index.php (limited to 'art') diff --git a/art/index.php b/art/index.php new file mode 100644 index 0000000..ae7da21 --- /dev/null +++ b/art/index.php @@ -0,0 +1,131 @@ + + + + + + deep twisty official NFTs'; + } elseif($siteurl == "isopod.cool") { + echo 'niceopod official NFTs'; + } + ?> + + + +
+ 0 or strpos($name, ".gif") > 0); + } + + $images = array_filter(scandir("."), "test_image"); // Generate array of every image in the directory by filename + + usort($images, function($a, $b) { // Sort images by modification date of the files + return filemtime("$b") - filemtime("$a"); + }); + + $datecounts = array(); + foreach($images as $im) { // Generate list of dates and how many images have them + $mt = date("Y-m-d", filemtime("$im")); // File modification date in ISO format + if($datecounts[$mt]) { + $datecounts[$mt]++; + } else { + $datecounts[$mt] = 1; + } + } + + $pmt = $mt; + foreach($images as $im) { // Loops through each image and echoes it to the page + + $no = substr($im, 0, strpos($im, ".")); // Filename with extension stripped + $mt = date("Y-m-d", filemtime("$im")); // File modification date in ISO format + $is = getimagesize("$im"); + $ist = $is[0] . "×" . $is[1] . "px"; // Image size formatted as X×Ypx + + $cl = ""; + if($datecounts[$mt] > 1) { // If there's more than one image published on the same date, merge them into a single thumbnail that can be clicked to reveal the full set. Would have done this based on names, but that would have been much harder. Might do that later. + if($pmt != $mt) { + echo ""; + $tn = $no; + if(file_exists("thumbs/$mt.png")) { // Use the same image for the group thumbnail as the first image in the group. If there's a thumbnail named with the date in question, use that instead. + $tn = $mt; + } + echo ""; + $pmt = $mt; + } + $cl = " class='d$mt'"; + } + + echo "$im
$mt • $ist
"; + } + ?> +
+ + -- cgit v1.2.3