Files
libretro/website/src/components/Footer.astro
T
Abdessamad Derraz 24d7db0ab3 feat: guide AI agents to the fewest files
llms.txt and an ARD manifest name the pages and the JSON API, and lead
an agent setting up a device to --for-games --required-only. Every page
registers four read-only WebMCP tools: the setup command, a hash lookup,
an emulator's files and the site search.
2026-11-06 19:58:42 +01:00

81 lines
3.0 KiB
Plaintext

---
// Starlight's footer (edit link, previous and next), who keeps the project
// and where to report a problem, the release the packs come from, and the
// licence line, and "Did this page help?" (src/scripts/count.ts, shown
// only where the answer is counted). The release is read from release.json, written when the
// packs were published: the site may be newer than the packs. None of it
// is in the search index: "MIT for the tooling" was the excerpt of short
// pages, and "bios", "release" and "problem" matched every page.
import Default from '@astrojs/starlight/components/Footer.astro';
import release from '../../../release.json';
const REPO = 'https://github.com/Abdess/retrobios';
const MONTHS = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
// A release tag is its date, vYYYY.MM.DD.
const releaseDate = (tag: string): string | undefined => {
const match = /^v(\d{4})\.(\d{2})\.(\d{2})$/.exec(tag);
return match ? `${Number(match[3])} ${MONTHS[Number(match[2]) - 1]} ${match[1]}` : undefined;
};
const tag: string = release.tag;
const date = releaseDate(tag);
---
<div class="rb-footer-root" data-pagefind-ignore>
<Default />
<div class="rb-footer">
<p class="rb-helpful" data-rb-helpful-box hidden>
Did this page help?
<button type="button" data-rb-helpful="yes">Yes</button>
<button type="button" data-rb-helpful="no">No</button>
<span data-rb-helpful-thanks hidden>Thanks, counted.</span>
</p>
<p>
Maintained by <a href="https://github.com/Abdess">Abdess on GitHub</a>.{' '}
<a href={`${REPO}/issues/new`}>Report a problem</a>.
<a href={`${import.meta.env.BASE_URL.replace(/\/?$/, '/')}wiki/privacy/`}>Privacy</a>.
</p>
<p>
Packs from release <a href={`${REPO}/releases/tag/${tag}`}>{tag}</a>{date && <>, <time datetime={tag.slice(1).replaceAll('.', '-')}>{date}</time></>}.
</p>
<p class="rb-copyright">
MIT for the tooling and metadata. BIOS and firmware files are third-party system software, preserved for personal backup,
archival and interoperability.
</p>
</div>
</div>
<script>
import '../scripts/count.ts';
import '../scripts/agent-tools.ts';
</script>
<style>
/* The wrapper only keeps the footer out of the search index: it adds no box. */
.rb-footer-root { display: contents; }
.rb-footer {
margin-top: 1.5rem;
padding-top: 1rem;
border-top: 1px solid var(--sl-color-hairline-light);
font-size: var(--sl-text-xs);
color: var(--sl-color-gray-3);
}
.rb-footer p { margin: 0.25rem 0 0; }
.rb-footer a { color: inherit; }
.rb-footer a:hover { color: var(--sl-color-white); }
.rb-footer .rb-copyright { margin-top: 0.75rem; }
.rb-helpful button {
margin-left: 0.4rem;
padding: 0.1rem 0.6rem;
font: inherit;
color: var(--sl-color-white);
background: transparent;
border: 1px solid var(--sl-color-gray-4);
border-radius: 0.25rem;
cursor: pointer;
}
.rb-helpful button:hover { border-color: var(--sl-color-accent); }
.rb-helpful span { margin-left: 0.4rem; }
</style>