---
import Window from "../layouts/Window.astro";
import { allPages, crumbsFor } from "../lib/site";
import { icon } from "../lib/icons";
// netpositive, beos's browser, told you about a missing page in a haiku. so does this one,
// a different one each time with js, the first one without
const HAIKU = [
["the page you followed", "ran dry somewhere far upstream", "the hydrant still flows"],
["you asked the firehose", "for one drop. it wasn't there", "try the search above"],
["no record here, just", "a tombstone in history", "keyed by its death rev"],
];
---
<Window title="not found" crumbs={crumbsFor()} pages={allPages()} layout="solo">
<div class="pane solo">
<div class="paper prose lost">
<Fragment set:html={icon("hydrant", 48)} />
<div>
<h2>nothing here</h2>
<div class="haiku" data-haiku>
{HAIKU.map((h, i) => <p hidden={i > 0}>{h.map((line, j) => <>{line}{j < 2 && <br />}</>)}</p>)}
</div>
<script is:inline>
{
const all = document.currentScript.previousElementSibling.children;
const pick = Math.floor(Math.random() * all.length);
[...all].forEach((p, i) => (p.hidden = i !== pick));
}
</script>
<p>this page doesn't exist, or it moved. search for it in the address bar above, or go back to <a href="/">all pages</a>.</p>
</div>
</div>
</div>
</Window>