filemtime($b) <=> filemtime($a)); echo ''; echo ''; echo 'Generated Seed Pages'; echo ''; echo ''; echo '
'; echo '
'; echo '

Generated Seeds

'; echo 'Generate New'; echo '
'; if ($pageFiles === []) { echo '

No generated seed pages found yet.

'; } else { echo '
'; foreach ($pageFiles as $pageFile) { $seed = basename($pageFile, '.html'); $previewWebPath = '/previews/' . $seed . '.jpg'; $previewFsPath = __DIR__ . '/previews/' . $seed . '.jpg'; $hasPreview = file_exists($previewFsPath); $title = $seed; $rawHtml = file_get_contents($pageFile); if ($rawHtml !== false && preg_match('/(.*?)<\/title>/is', $rawHtml, $matches) === 1) { $title = trim(strip_tags($matches[1])); } $updated = date('Y-m-d H:i:s', filemtime($pageFile)); echo '<a href="/' . htmlspecialchars($seed, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8') . '" class="block rounded-xl overflow-hidden border border-zinc-800 bg-zinc-900/70 hover:border-emerald-500 transition">'; echo '<div class="aspect-[16/10] bg-zinc-800">'; if ($hasPreview) { echo '<img loading="lazy" src="' . htmlspecialchars($previewWebPath, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8') . '" alt="Preview for ' . htmlspecialchars($seed, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8') . '" class="w-full h-full object-cover">'; } else { echo '<div class="w-full h-full grid place-items-center text-zinc-400 text-sm">Preview not available yet</div>'; } echo '</div>'; echo '<div class="p-4">'; echo '<h2 class="text-lg font-semibold mb-1 line-clamp-2">' . htmlspecialchars($title, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8') . '</h2>'; echo '<p class="text-xs text-zinc-400 mb-1">' . htmlspecialchars($seed, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8') . '</p>'; echo '<p class="text-xs text-zinc-500">Updated: ' . htmlspecialchars($updated, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8') . '</p>'; echo '</div></a>'; } echo '</div>'; } echo '</div></body></html>'; exit; } ?> <!doctype html> <html> <head> <meta charset="UTF-8"> <title>Generation Error

Page being generated, please wait

Generating content... this should complete in about 30 seconds.

0%