Add API explorer section to the page

Lists every /api endpoint, fetches the picked one live with highlighted
output and a copy-curl button; nav API link now scrolls to it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-19 21:51:24 +00:00
co-authored by Claude Opus 5.5
parent 6040e3c2a5
commit ae08800643
4 changed files with 62 additions and 3 deletions
+12 -1
View File
@@ -22,7 +22,7 @@
<body>
<header class="top wrap">
<a class="brand" href="/"><span class="orb"></span>PRT</a>
<nav><a href="/api">API</a><a href="https://www.npmjs.com/package/ortus">ortus ↗</a><a href="https://github.com/planetrenox/ortus">GitHub ↗</a></nav>
<nav><a href="#api">API</a><a href="https://www.npmjs.com/package/ortus">ortus ↗</a><a href="https://github.com/planetrenox/ortus">GitHub ↗</a></nav>
</header>
<main class="wrap" role="timer">
@@ -62,6 +62,17 @@
</div>
</div>
</article>
<article class="card wide" id="api">
<h2>API</h2>
<p class="m">Free JSON over HTTPS. No key, CORS open. Pick an endpoint to try it live.</p>
<div class="api">
<ul id="eps"></ul>
<div class="res">
<div class="rq"><code id="rq"></code><button id="curl">copy curl</button></div>
<pre id="rs"></pre>
</div>
</div>
</article>
</section>
</main>